mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
easy-locale: init
This commit is contained in:
1 parent
b43a9e174a
commit
27ef93a1d0
3 files changed
+27
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import yaml from 'js-yaml';
|
||||
import * as bus from 'hydrooj/dist/service/bus';
|
||||
import * as system from 'hydrooj/dist/model/system';
|
||||
import i18n from 'hydrooj/dist/lib/i18n';
|
||||
|
||||
bus.once('app/started', () => {
|
||||
const langs = system.get('easy-locale.langs');
|
||||
const entries = yaml.load(langs);
|
||||
i18n(entries as any);
|
||||
});
|
||||
Reference in new issue
Block a user