Pārlūkot izejas kodu

Add detect translation freeze in interface config

j8
Ilya Daynatovich 8 gadus atpakaļ
vecāks
revīzija
209272f940
2 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 1
    0
      interface_config.js
  2. 6
    0
      modules/translation/translation.js

+ 1
- 0
interface_config.js Parādīt failu

@@ -16,6 +16,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
16 16
     SHOW_POWERED_BY: false,
17 17
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
18 18
     APP_NAME: "Jitsi Meet",
19
+    LANG_DETECTION: false,    // Allow i18n to detect the system language
19 20
     INVITATION_POWERED_BY: true,
20 21
     /**
21 22
      * If we should show authentication block in profile

+ 6
- 0
modules/translation/translation.js Parādīt failu

@@ -83,6 +83,12 @@ module.exports = {
83 83
         let options = defaultOptions;
84 84
 
85 85
         let lang = getLangFromQuery() || settingsLang || config.defaultLanguage;
86
+        let langDetection = interfaceConfig.LANG_DETECTION;
87
+
88
+        if (!langDetection && !lang) {
89
+            lang = DEFAULT_LANG;
90
+        }
91
+
86 92
         if (lang) {
87 93
             options.lng = lang;
88 94
         }

Notiek ielāde…
Atcelt
Saglabāt