save sentry from this
This commit is contained in:
parent
b4b6b0f988
commit
a99dd1b17d
1 changed files with 4 additions and 2 deletions
|
@ -90,7 +90,8 @@ export class utils {
|
||||||
|
|
||||||
if (language !== "en_US" && fs.existsSync(path.join(this.paths.i18nPath, `${language}.json`))) {
|
if (language !== "en_US" && fs.existsSync(path.join(this.paths.i18nPath, `${language}.json`))) {
|
||||||
i18n = Object.assign(i18n, JSON.parse(fs.readFileSync(path.join(this.paths.i18nPath, `${language}.json`), "utf8")));
|
i18n = Object.assign(i18n, JSON.parse(fs.readFileSync(path.join(this.paths.i18nPath, `${language}.json`), "utf8")));
|
||||||
} else if (!fs.existsSync(path.join(this.paths.i18nPath, `${language}.json`))) {
|
}
|
||||||
|
/* else if (!fs.existsSync(path.join(this.paths.i18nPath, `${language}.json`))) {
|
||||||
fetch(`https://raw.githubusercontent.com/ciderapp/Cider/main/src/i18n/${language}.json`)
|
fetch(`https://raw.githubusercontent.com/ciderapp/Cider/main/src/i18n/${language}.json`)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
@ -101,7 +102,8 @@ export class utils {
|
||||||
i18n = Object.assign(i18n, JSON.parse(fs.readFileSync(path.join(this.paths.i18nPath, `en_US.json`), "utf8")));
|
i18n = Object.assign(i18n, JSON.parse(fs.readFileSync(path.join(this.paths.i18nPath, `en_US.json`), "utf8")));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
} */
|
||||||
|
|
||||||
if (key) {
|
if (key) {
|
||||||
return i18n[key]
|
return i18n[key]
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue