浏览代码

Remove logging, simplify listing supported languages

Sondre Njåstad 1 年之前
父节点
当前提交
926070ce26
共有 2 个文件被更改,包括 1 次插入8 次删除
  1. 0 1
      src/UI/UIDesktop.js
  2. 1 7
      src/i18n/i18n.js

+ 0 - 1
src/UI/UIDesktop.js

@@ -1131,7 +1131,6 @@ $(document).on('click', '.user-options-menu-btn', async function(e){
             }
         }
     });
-    console.log(supoprtedLanguagesItems)
 
     UIContextMenu({
         id: 'user-options-menu',

+ 1 - 7
src/i18n/i18n.js

@@ -1,12 +1,6 @@
 import translations from './translations/translations.js';
 
-window.ListSupportedLanugages = function () {
-    var result = [];
-    Object.keys(translations).forEach(function (key) {
-        result.push(translations[key]);
-    });
-    return result;
-};
+window.ListSupportedLanugages = () => Object.keys(translations).map(lang => translations[lang]);
 
 window.i18n = function (key, replacements = [], encode_html = true) {
     if(typeof replacements === 'boolean' && encode_html === undefined){