core: problem.del, ignore upgrade on fresh install

This commit is contained in:
undefined committed 2021-01-12 23:24:54 +08:00
1 parent 1543a374e3
commit 1d3bdacde9
12 files changed
+66 -119

No files matched your search

+2 -6
View File
@@ -46,12 +46,8 @@ String.prototype.translate = function translate(...languages: string[]) {
languages.push(global.Hydro.model.system.get('server.language'));
for (const language of languages) {
if (!language) continue;
if (locales[language]) {
if (locales[language][this] !== undefined) return locales[language][this];
}
if (locales[language.split('_')[0]]) {
if (locales[language.split('_')[0]][this] !== undefined) return locales[language.split('_')[0]][this];
}
const curr = (locales[language] || {})[this] || (locales[language.split('_')[0]] || {})[this];
if (curr) return curr;
}
return this;
};