Pārlūkot izejas kodu

Fixes profile panel translation.

Strings are not translated when opening the profile side panel on FF. It was that we were creating profile panel html after i18n library had loaded and had translated the rest of the html.
master
damencho 8 gadus atpakaļ
vecāks
revīzija
a26f7a1292
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3
    0
      modules/UI/side_pannels/profile/Profile.js

+ 3
- 0
modules/UI/side_pannels/profile/Profile.js Parādīt failu

36
 function initHTML() {
36
 function initHTML() {
37
     $(`#${sidePanelsContainerId}`)
37
     $(`#${sidePanelsContainerId}`)
38
         .append(htmlStr);
38
         .append(htmlStr);
39
+    // make sure we translate the panel, as adding it can be after i18n
40
+    // library had initialized and translated already present html
41
+    APP.translation.translateElement($(`#${sidePanelsContainerId}`));
39
 }
42
 }
40
 
43
 
41
 export default {
44
 export default {

Notiek ielāde…
Atcelt
Saglabāt