feat: sync mixly root files and common folder
This commit is contained in:
16
mixly/common/modules/web-modules/monaco-i18n-loader.js
Normal file
16
mixly/common/modules/web-modules/monaco-i18n-loader.js
Normal file
@@ -0,0 +1,16 @@
|
||||
goog.loadJs('common', () => {
|
||||
|
||||
goog.require('path');
|
||||
goog.require('Mixly.Msg');
|
||||
goog.require('Mixly.Env');
|
||||
|
||||
const { Msg, Env } = Mixly;
|
||||
|
||||
if (['zh-hans', 'zh-hant'].includes(Msg.nowLang)) {
|
||||
const i18nFilePath = path.join(Env.templatePath, `json/monaco.i18n.${Msg.nowLang}.json`);
|
||||
window.monacoI18N = goog.readJsonSync(i18nFilePath);
|
||||
} else {
|
||||
window.monacoI18N = {};
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user