瀏覽代碼

fix(lang) fix default language selection

[0] introduced sorted language keys, but we had the assumption that the
first one meant to indicate the default language.

Break that assumption and be explicit about English being the default
language.

[0]: 7fe319d965
master
Saúl Ibarra Corretgé 3 年之前
父節點
當前提交
bd38df5d61
共有 1 個檔案被更改,包括 2 行新增4 行删除
  1. 2
    4
      react/features/base/i18n/i18next.js

+ 2
- 4
react/features/base/i18n/i18next.js 查看文件

@@ -15,8 +15,6 @@ import languageDetector from './languageDetector';
15 15
 /**
16 16
  * The available/supported languages.
17 17
  *
18
- * XXX The element at index zero is the default language.
19
- *
20 18
  * @public
21 19
  * @type {Array<string>}
22 20
  */
@@ -25,12 +23,12 @@ export const LANGUAGES: Array<string> = Object.keys(LANGUAGES_RESOURCES);
25 23
 /**
26 24
  * The default language.
27 25
  *
28
- * XXX The element at index zero of {@link LANGUAGES} is the default language.
26
+ * English is the default language.
29 27
  *
30 28
  * @public
31 29
  * @type {string} The default language.
32 30
  */
33
-export const DEFAULT_LANGUAGE = LANGUAGES[0];
31
+export const DEFAULT_LANGUAGE = 'en';
34 32
 
35 33
 /**
36 34
  * The options to initialize i18next with.

Loading…
取消
儲存