mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: enhance language selection
This commit is contained in:
1 parent
377ef55d49
commit
80ac44d98e
17 files changed
+201
-70
No files matched your search
@@ -39,7 +39,7 @@ async function postInit() {
|
||||
if (!global.Hydro.isFirstWorker) return;
|
||||
const judge = require('./judge');
|
||||
|
||||
const { task, system } = global.Hydro.model;
|
||||
const { task, system, setting } = global.Hydro.model;
|
||||
const { storage } = global.Hydro.service;
|
||||
const _judge = global.Hydro.handler.judge as any;
|
||||
|
||||
@@ -154,7 +154,7 @@ async function postInit() {
|
||||
}
|
||||
|
||||
function getLang(lang: string) {
|
||||
if (system.lang[lang]) return system.lang[lang];
|
||||
if (setting.langs[lang]) return setting.langs[lang];
|
||||
throw new SystemError('Unsupported language {0}.', [lang]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user