fixed:解决安装其他显示语言,重启后不生效.

This commit is contained in:
chriswang521 2024-06-13 13:46:10 +08:00 committed by wangpenglong
parent 3af3ef081c
commit e3e4607fce
1 changed files with 4 additions and 1 deletions

View File

@ -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) {