From 926070ce264c023eaf7b4fb7075df091a1e1267f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Nj=C3=A5stad?= Date: Mon, 18 Mar 2024 16:17:03 +0100 Subject: [PATCH] Remove logging, simplify listing supported languages --- src/UI/UIDesktop.js | 1 - src/i18n/i18n.js | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/UI/UIDesktop.js b/src/UI/UIDesktop.js index 32a16cdf..642f0b45 100644 --- a/src/UI/UIDesktop.js +++ b/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', diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index 2002913d..d9967ced 100644 --- a/src/i18n/i18n.js +++ b/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){