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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
211 changed files with 1825 additions and 1624 deletions

View file

@ -13,7 +13,6 @@ import { Context, ObjectContext } from 'cafy';
import * as glob from 'glob';
import * as yaml from 'js-yaml';
import config from '../../config';
import I18n from '../../misc/i18n';
import { licenseHtml } from '../../misc/license';
const constants = require('../../const.json');
import endpoints from '../api/endpoints';
@ -54,8 +53,8 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> {
vars['license'] = licenseHtml;
const i18n = new I18n(lang);
vars['i18n'] = (key: string) => i18n.get(null, key);
//const i18n = new I18n(lang);
//vars['i18n'] = (key: string) => i18n.get(null, key);
return vars;
}