ui: adapt to fix of Korean language code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8c260fdbc5
commit
e1a0e868c7
2
debian/control
vendored
2
debian/control
vendored
@ -87,7 +87,7 @@ Depends: apt (>= 1.5~),
|
||||
pve-docs (>= 8.0~~),
|
||||
pve-firewall,
|
||||
pve-ha-manager,
|
||||
pve-i18n (>= 1.0-3),
|
||||
pve-i18n (>= 3.2.0~),
|
||||
pve-xtermjs (>= 4.7.0-1),
|
||||
qemu-server (>= 8.0.4),
|
||||
rsync,
|
||||
|
@ -1925,6 +1925,18 @@ Ext.define('PVE.Utils', {
|
||||
isStandaloneNode: function() {
|
||||
return PVE.data.ResourceStore.getNodes().length < 2;
|
||||
},
|
||||
|
||||
// main use case of this helper is the login window
|
||||
getUiLanguage: function() {
|
||||
let languageCookie = Ext.util.Cookies.get('PVELangCookie');
|
||||
if (languageCookie === 'kr') {
|
||||
// fix-up 'kr' being used for Korean by mistake FIXME: remove with PVE 9
|
||||
let dt = Ext.Date.add(new Date(), Ext.Date.YEAR, 10);
|
||||
languageCookie = 'ko';
|
||||
Ext.util.Cookies.set('PVELangCookie', languageCookie, dt);
|
||||
}
|
||||
return languageCookie || Proxmox.defaultLang || 'en';
|
||||
},
|
||||
},
|
||||
|
||||
singleton: true,
|
||||
|
@ -367,7 +367,7 @@ Ext.define('PVE.window.LoginWindow', {
|
||||
{
|
||||
xtype: 'proxmoxLanguageSelector',
|
||||
fieldLabel: gettext('Language'),
|
||||
value: Ext.util.Cookies.get('PVELangCookie') || Proxmox.defaultLang || 'en',
|
||||
value: PVE.Utils.getUiLanguage(),
|
||||
name: 'lang',
|
||||
reference: 'langField',
|
||||
submitValue: false,
|
||||
|
Loading…
Reference in New Issue
Block a user