Commit 669cfc07 authored by Victor Nikulshin's avatar Victor Nikulshin
Browse files

Merge branch 'feature/no-languages-install' into '2.x'

Regularize usage of locale and site_languages config

On n'a pas de besoin d'avoir deux parameters qui configure la locale d'installation. Seulement site_languages is suffisant.

See merge request !23
parents d4aa5137 1e1c056f
Pipeline #1333 failed with stages
in 9 seconds
......@@ -35,9 +35,6 @@ Those are global project parameters mandatory to Drupalizer.
|This env var is defined by Fabric itself, and it's defaut value is True.
|You can easily pass it to False, addinf --no-pty to your fab command line. Useful in Jenkins jobs.
|If True, install the site in French.
=== Site settings
......@@ -88,7 +85,7 @@ Those are global project parameters mandatory to Drupalizer.
|The Drupal site directory (only for multisite). Default: _default_.
|Translation files you need to download when building new Drupal installation (separate with comma). Default: _fr_.
|Translation files that must be downloaded when building Drupal and activated during installation (separate with comma). Default: _fr_.
......@@ -7,7 +7,6 @@ from fabric.api import env
env.project_name = 'drupalizer-default'
env.workspace = path.join(path.dirname(__file__), path.pardir)
env.locale = False
# Site
......@@ -49,6 +49,7 @@ def make(action='install'):
drush_opts += "--contrib-destination=profiles/{} ".format(env.site_profile)
if env.site_languages:
if not env.get('always_use_pty', True):
drush_opts += "--translations=" + env.site_languages + " "
elif confirm(red('Say [Y] to {} the site at {} with the specified translation(s): {}. If you say [n] '
......@@ -127,7 +128,10 @@ def site_install():
h.fab_run(role, 'chown {}:{} ./sites'.format(env.apache_user, env.apache_user))
h.fab_run(role, 'chmod ug+w ./sites/default'.format(env.docker_site_root))
locale = '--locale="fr"' if env.locale else ''
if env.site_languages:
locale = '--locale="{}"'.format(env.site_languages.split(',')[0])
locale = ''
h.fab_run(role, 'sudo -u {} drush site-install {} {} --db-url=mysql://{}:{}@{}/{} --site-name="{}" '
'--account-name={} --account-pass={} --sites-subdir={} -y'.format(apache, profile, locale,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment