This commit is contained in:
syuilo
2018-06-18 09:54:53 +09:00
parent a766faeae9
commit 80e5645a84
150 changed files with 305 additions and 2334 deletions

View File

@ -6,15 +6,14 @@ import * as fs from 'fs';
import * as yaml from 'js-yaml';
export type LangKey = 'de' | 'en' | 'fr' | 'ja' | 'pl';
export type LocaleObjectChildren = LocaleObject | string | undefined;
export type LocaleObject = {[key: string]: LocaleObjectChildren };
export type LocaleObject = { [key: string]: any };
const loadLang = (lang: LangKey) => yaml.safeLoad(
fs.readFileSync(`./locales/${lang}.yml`, 'utf-8')) as LocaleObject;
const native = loadLang('ja');
const langs: {[key in LangKey]: LocaleObject} = {
const langs: { [key: string]: LocaleObject } = {
'de': loadLang('de'),
'en': loadLang('en'),
'fr': loadLang('fr'),