Commit c5f4687e authored by 20th (Victor Nikulshin)'s avatar 20th (Victor Nikulshin) Committed by Victor Nikulshin
Browse files

Remove `locale` config in favour of `site_languages`

Locale configuration during installation is done with two config parameters:
`locale` and `site_languages`, which is excessive. Given that the `locale`
parameter is a simple boolean, its value can be inferred from the value of
`site_languages` parameter.
parent 12720aef
...@@ -35,9 +35,6 @@ Those are global project parameters mandatory to Drupalizer. ...@@ -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. |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. |You can easily pass it to False, addinf --no-pty to your fab command line. Useful in Jenkins jobs.
|_locale_
|If True, install the site in French.
|=== |===
=== Site settings === Site settings
...@@ -88,7 +85,7 @@ Those are global project parameters mandatory to Drupalizer. ...@@ -88,7 +85,7 @@ Those are global project parameters mandatory to Drupalizer.
|The Drupal site directory (only for multisite). Default: _default_. |The Drupal site directory (only for multisite). Default: _default_.
|_site_languages_ |_site_languages_
|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 ...@@ -7,7 +7,6 @@ from fabric.api import env
env.project_name = 'drupalizer-default' env.project_name = 'drupalizer-default'
env.workspace = path.join(path.dirname(__file__), path.pardir) env.workspace = path.join(path.dirname(__file__), path.pardir)
env.locale = False
# Site # Site
......
...@@ -128,7 +128,10 @@ def site_install(): ...@@ -128,7 +128,10 @@ def site_install():
h.fab_run(role, 'chown {}:{} ./sites'.format(env.apache_user, env.apache_user)) 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)) 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)
else:
locale = ''
h.fab_run(role, 'sudo -u {} drush site-install {} {} --db-url=mysql://{}:{}@{}/{} --site-name="{}" ' 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, '--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