浏览代码

Merge pull request #1435 from jitsi/fix-settings-translation

Fixes settings panel translation.
master
yanas 8 年前
父节点
当前提交
d0171cf386
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      modules/UI/side_pannels/settings/SettingsMenu.js

+ 6
- 0
modules/UI/side_pannels/settings/SettingsMenu.js 查看文件

61
 function initHTML() {
61
 function initHTML() {
62
     $(`#${sidePanelsContainerId}`)
62
     $(`#${sidePanelsContainerId}`)
63
         .append(htmlStr);
63
         .append(htmlStr);
64
+    // make sure we translate the panel, as adding it can be after i18n
65
+    // library had initialized and translated already present html
66
+    APP.translation.translateElement($(`#${sidePanelsContainerId}`));
64
 }
67
 }
65
 
68
 
66
 /**
69
 /**
162
             selectInput[0].dataset.i18n =
165
             selectInput[0].dataset.i18n =
163
                 `languages:${APP.translation.getCurrentLanguage()}`;
166
                 `languages:${APP.translation.getCurrentLanguage()}`;
164
 
167
 
168
+            // translate selectInput, which is the currently selected language
169
+            // otherwise there will be no selected option
170
+            APP.translation.translateElement(selectInput);
165
             APP.translation.translateElement(selectEl);
171
             APP.translation.translateElement(selectEl);
166
 
172
 
167
             APP.translation.addLanguageChangedListener(
173
             APP.translation.addLanguageChangedListener(

正在加载...
取消
保存