easy-locale: init

This commit is contained in:
undefined committed 2021-05-24 22:01:20 +08:00
1 parent b43a9e174a
commit 27ef93a1d0
3 files changed
+27

No files matched your search

+10
View File
@@ -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);
});