diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-04-27 20:54:58 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-04-27 20:54:58 +0200 |
commit | c2eb30bba7451d16e1de37411624b2bcc449c037 (patch) | |
tree | 2ddd65f54a09bc286a68ef772bcb80499dbdfb4e /modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js | |
parent | 1ae142d7d11862b11a6e0cea06562875cc778ae7 (diff) |
luci-mod-system: enforce availability of english as language choice
Always offer english, regardless of whether a dummy language pack for it
is installed or not.
Fixes: #5783
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js')
-rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js index d207a5c994..082a923c81 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js @@ -227,10 +227,11 @@ return view.extend({ o.ucioption = 'lang'; o.value('auto'); - var k = Object.keys(uci.get('luci', 'languages') || {}).sort(); + var l = Object.assign({ en: 'English' }, uci.get('luci', 'languages')), + k = Object.keys(l).sort(); for (var i = 0; i < k.length; i++) if (k[i].charAt(0) != '.') - o.value(k[i], uci.get('luci', 'languages', k[i])); + o.value(k[i], l[k[i]]); o = s.taboption('language', form.ListValue, '_mediaurlbase', _('Design')) o.uciconfig = 'luci'; |