fixed:解决安装其他显示语言,重启后不生效.
This commit is contained in:
parent
3af3ef081c
commit
e3e4607fce
|
@ -111,6 +111,9 @@
|
|||
async function getLanguagePackConfigurations(userDataPath, locale) {
|
||||
const configFile = path.join(userDataPath, 'languagepacks.json');
|
||||
try {
|
||||
if (locale !== 'zh-cn') {
|
||||
return JSON.parse(await readFile(configFile));
|
||||
}
|
||||
if (!fs.existsSync(configFile)) {
|
||||
console.log('languagepacks.json not exist');
|
||||
let languagePack = generateLanguagePacks();
|
||||
|
@ -118,7 +121,7 @@
|
|||
} else {
|
||||
let config = require(configFile);
|
||||
if (!config) {
|
||||
return JSON.parse(await readFile(configFile));;
|
||||
return JSON.parse(await readFile(configFile));
|
||||
}
|
||||
locale = resolveLanguagePackLocale(config, locale);
|
||||
if (!locale) {
|
||||
|
|
Loading…
Reference in New Issue