From 24b1bd7cb3ee853e89c08e2877d5661bf7f1238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Nj=C3=A5stad?= Date: Mon, 18 Mar 2024 16:09:32 +0100 Subject: [PATCH] Fix listing languages Translate additional fields --- src/UI/UIDesktop.js | 5 +++-- src/i18n/i18n.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/UI/UIDesktop.js b/src/UI/UIDesktop.js index c2ee4c97..32a16cdf 100644 --- a/src/UI/UIDesktop.js +++ b/src/UI/UIDesktop.js @@ -1046,7 +1046,7 @@ $(document).on('click', '.user-options-menu-btn', async function(e){ if(window.user.is_temp){ items.push( { - html: `Save Session`, + html: i18n('save_session'), icon: ``, icon_active: ``, onClick: async function(){ @@ -1098,7 +1098,7 @@ $(document).on('click', '.user-options-menu-btn', async function(e){ items.push( { - html: 'Add existing account', + html: i18n('add_existing_account'), // icon: l_user.username === user.username ? '✓' : '', onClick: async function(val){ await UIWindowLogin({ @@ -1131,6 +1131,7 @@ $(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 9cb5af7b..2002913d 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -2,7 +2,7 @@ import translations from './translations/translations.js'; window.ListSupportedLanugages = function () { var result = []; - translations.keys.forEach(function (key) { + Object.keys(translations).forEach(function (key) { result.push(translations[key]); }); return result;