mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
Fix bug
This commit is contained in:
parent
ef5bc4d62b
commit
c8e8093346
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,8 @@ import config from '../../config';
|
||||||
import { licenseHtml } from '../../misc/license';
|
import { licenseHtml } from '../../misc/license';
|
||||||
const constants = require('../../const.json');
|
const constants = require('../../const.json');
|
||||||
import endpoints from '../api/endpoints';
|
import endpoints from '../api/endpoints';
|
||||||
|
const locales = require('../../../locales');
|
||||||
|
const nestedProperty = require('nested-property');
|
||||||
|
|
||||||
async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
||||||
const vars = {} as { [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;
|
vars['license'] = licenseHtml;
|
||||||
|
|
||||||
//const i18n = new I18n(lang);
|
vars['i18n'] = (key: string) => nestedProperty.get(locales[lang], key);
|
||||||
//vars['i18n'] = (key: string) => i18n.get(null, key);
|
|
||||||
|
|
||||||
return vars;
|
return vars;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue