Refactoring of i18n (#3165)

Refactoring of i18n
This commit is contained in:
syuilo
2018-11-09 03:44:35 +09:00
committed by GitHub
parent 21303bd06a
commit 25a69ec1b6
211 changed files with 1825 additions and 1624 deletions

View File

@ -273,7 +273,14 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
Vue.mixin({
data() {
return {
os,
//os,
os: {
stream: os.stream,
getMeta: os.getMeta,
getMetaSync: os.getMetaSync,
new: os.new,
windows: os.windows
},
api: os.api,
apis: os.apis
};
@ -281,6 +288,13 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
});
const app = new Vue({
i18n: new VueI18n({
sync: false,
locale: lang,
messages: {
[lang]: {}
}
}),
store: os.store,
router,
render: createEl => createEl(App)