Skip to content
Snippets Groups Projects
Commit 435cd804 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch '3-download-as-default-en_us-then-install-languages-then-apply-locale' into 'master'

Resolve "Languages and locale"

Closes #3

See merge request openappstack/wordpress-helm!14
parents f2a2d788 f236e6aa
No related branches found
No related tags found
1 merge request!14Resolve "Languages and locale"
Pipeline #5100 passed with stage
in 3 minutes and 36 seconds
......@@ -27,7 +27,7 @@ wordpress:
# NOTE: Use a theme *slug* here
theme: twentynineteen
# NOTE: Make sure you use underscore and that the localisation is in full caps
locale: en_US
default_language: en_US
# NOTE: Optionally set a Wordpress version number to override the default
# version: LOCAL-WORDPRESS-VERSION-NUMBER-OR-DELETE-THIS-LINE
# NOTE: This is the URL that points to your WordPress installation. If this
......
......@@ -92,8 +92,12 @@ wordpress:
# NOTE: Use a theme *slug* here
theme: twentytwenty
theme_fallback: twentytwenty
# NOTE: Make sure you use underscore and that the localisation is in full caps
locale: en_US
#
# NOTE: Languages are ALL available languages. en_US is always installed but it is shown explicitly
# EXAMPLE: `languages: "[en_US,fi_FI,wo]"` would install US English, Finnish and Wolof
# EXAMPLE: `default_language: fi_FI` would set Finnish for the core language
languages: "[en_US]"
default_language: en_US
version: 5.4.2
url: "http://localhost"
title: "Wordpress Helm"
......@@ -282,7 +286,8 @@ ansibleSecrets: |
DB_PASS: {{ .Values.database.db.password }}
DB_PREFIX: {{ .Values.wordpress.config.db.prefix}}
DB_USER: {{ .Values.database.db.user }}
LOCALE: {{ .Values.wordpress.site.locale }}
LANGUAGES: {{ .Values.wordpress.site.languages }}
DEFAULT_LANG: {{ .Values.wordpress.site.default_language }}
WP_CONTENT_MOUNT: {{ .Values.wordpress.wp_content.mount_path }}
WP_CONTENT_REPO_CONTENT_DIR: {{ .Values.git_repo.wp_content_dir }}
WP_CONTENT_REPO_ENABLED: {{ .Values.git_repo.enabled }}
......
......@@ -21,7 +21,6 @@
- name: Download WordPress
shell: wp {{ cli_args }} core download
--locale="{{ LOCALE }}"
--version="{{ WP_VERSION }}"
--skip-content --force
......@@ -55,7 +54,6 @@
--dbpass="{{ DB_PASS }}"
--dbhost="{{ DB_HOST }}"
--dbprefix="{{ DB_PREFIX }}"
--locale="{{ LOCALE }}"
--dbcharset="{{ dbcharset }}"
--dbcollate="{{ dbcollate }}"
--skip-check
......@@ -94,8 +92,14 @@
- name: Files cannot be edited
shell: wp {{ cli_args }} config set DISALLOW_FILE_EDIT true --add --raw --type=constant
- name: Add WordPress language
shell: wp {{ cli_args }} core language install "{{ LOCALE }}" --activate
- name: Add WordPress site languages
shell: wp {{ cli_args }} core language install "{{ language }}"
loop: "{{ LANGUAGES }}"
loop_control:
loop_var: language
- name: Set WordPress site default language
shell: wp {{ cli_args }} site switch-language "{{ DEFAULT_LANG }}"
- name: Set key and salt values
shell: wp config {{ cli_args }} set {{ wp_salt.key }} {{ wp_salt.value }} --add --type=constant
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment