diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 22:02:48 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 22:02:48 +0900 |
| commit | 460bb21c1ec7aa59ad0f94786e5353a8639b7ef7 (patch) | |
| tree | e9680036e24cd29ce73130c5dfecd00d52b13b51 /src/server/web | |
| parent | :art: (diff) | |
| download | sharkey-460bb21c1ec7aa59ad0f94786e5353a8639b7ef7.tar.gz sharkey-460bb21c1ec7aa59ad0f94786e5353a8639b7ef7.tar.bz2 sharkey-460bb21c1ec7aa59ad0f94786e5353a8639b7ef7.zip | |
Fix bug
Diffstat (limited to 'src/server/web')
| -rw-r--r-- | src/server/web/docs.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/web/docs.ts b/src/server/web/docs.ts index 292f3135b5..d91813c869 100644 --- a/src/server/web/docs.ts +++ b/src/server/web/docs.ts @@ -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; } |