Skip to content
Snippets Groups Projects
Unverified Commit 460bb21c authored by syuilo's avatar syuilo
Browse files

Fix bug

parent 251cef31
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ import config from '../../config';
import { licenseHtml } from '../../misc/license';
const constants = require('../../const.json');
import endpoints from '../api/endpoints';
const locales = require('../../../locales');
const nestedProperty = require('nested-property');
async function genVars(lang: string): Promise<{ [key: string]: any }> {
const vars = {} as { [key: string]: any };
......@@ -53,8 +55,7 @@ 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);
vars['i18n'] = (key: string) => nestedProperty.get(locales[lang], key);
return vars;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment