From ca04ca9ffef0384e435b259d6e0131cfcdd21171 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 30 Mar 2020 17:04:56 +0300 Subject: [PATCH] Make it possible to change Jitsi web UI language Fixes #427 (Github Issue). --- roles/matrix-jitsi/defaults/main.yml | 3 +++ roles/matrix-jitsi/templates/web/config.js.j2 | 2 +- roles/matrix-jitsi/templates/web/interface_config.js.j2 | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index ae5dcb8f..6eb36577 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -51,6 +51,9 @@ matrix_jitsi_web_container_extra_arguments: [] # List of systemd services that matrix-jitsi-web.service depends on matrix_jitsi_web_systemd_required_services_list: ['docker.service'] +matrix_jitsi_web_config_defaultLanguage: 'en' +matrix_jitsi_web_interface_config_lang_detection: false + matrix_jitsi_prosody_docker_image: "jitsi/prosody:4101" matrix_jitsi_prosody_docker_image_force_pull: "{{ matrix_jitsi_prosody_docker_image.endswith(':latest') }}" diff --git a/roles/matrix-jitsi/templates/web/config.js.j2 b/roles/matrix-jitsi/templates/web/config.js.j2 index f18471e1..72bffbd5 100644 --- a/roles/matrix-jitsi/templates/web/config.js.j2 +++ b/roles/matrix-jitsi/templates/web/config.js.j2 @@ -263,7 +263,7 @@ hiddenDomain: {{ matrix_jitsi_recorder_domain|to_json }}, // disable1On1Mode: false, // Default language for the user interface. - // defaultLanguage: 'en', + defaultLanguage: {{ matrix_jitsi_web_config_defaultLanguage|to_json }}, // If true all users without a token will be considered guests and all users // with token will be considered non-guests. Only guests will be allowed to diff --git a/roles/matrix-jitsi/templates/web/interface_config.js.j2 b/roles/matrix-jitsi/templates/web/interface_config.js.j2 index dd5abc59..737b924e 100644 --- a/roles/matrix-jitsi/templates/web/interface_config.js.j2 +++ b/roles/matrix-jitsi/templates/web/interface_config.js.j2 @@ -30,7 +30,7 @@ var interfaceConfig = { APP_NAME: 'Jitsi Meet', NATIVE_APP_NAME: 'Jitsi Meet', PROVIDER_NAME: 'Jitsi', - LANG_DETECTION: false, // Allow i18n to detect the system language + LANG_DETECTION: {{ matrix_jitsi_web_interface_config_lang_detection|to_json }}, // Allow i18n to detect the system language INVITATION_POWERED_BY: true, /**