mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-31 14:11:45 +00:00
Upgrade electron
This commit is contained in:
@@ -16,7 +16,7 @@ i18n.__ = function(name) {
|
||||
|
||||
let string = i18n.getLocaleData(cache.locale)[name] || i18n.getLocaleData(cache.defaultLocale)[name];
|
||||
if (!string) {
|
||||
let underscoreIndex = cache.locale.indexOf("_");
|
||||
let underscoreIndex = cache.locale.indexOf("-");
|
||||
if (underscoreIndex !== -1) {
|
||||
let localeBaseCode = cache.locale.substring(0, underscoreIndex);
|
||||
if (i18n.localeExists(localeBaseCode)) {
|
||||
@@ -98,12 +98,12 @@ i18n.getLocale = function() {
|
||||
let availableLocales = i18n.getAvailableLocales();
|
||||
if (availableLocales.indexOf(systemLocale) !== -1) {
|
||||
cache.locale = systemLocale;
|
||||
} else if (availableLocales.indexOf(systemLocale.split("_")[0]) !== -1) {
|
||||
cache.locale = systemLocale.split("_")[0];
|
||||
} else if (availableLocales.indexOf(systemLocale.split("-")[0]) !== -1) {
|
||||
cache.locale = systemLocale.split("-")[0];
|
||||
} else {
|
||||
var looseLocaleMatch;
|
||||
for (let i = 0, l = availableLocales.length; i < l; i++) {
|
||||
if (availableLocales[i].split("_")[0] === systemLocale.split("_")[0]) {
|
||||
if (availableLocales[i].split("-")[0] === systemLocale.split("-")[0]) {
|
||||
looseLocaleMatch = availableLocales[i];
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user