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

14
src/client/app/i18n.ts Normal file
View File

@@ -0,0 +1,14 @@
import { lang, locale } from './config';
export default function(scope?: string) {
const texts = scope ? locale[scope] || {} : {};
texts['@'] = locale['common'];
texts['@deck'] = locale['deck'];
return {
sync: false,
locale: lang,
messages: {
[lang]: texts
}
};
}