diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-08-23 03:23:31 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-23 03:23:31 +0900 |
| commit | fca7a9da94751e7f6a1205827dcd8067523f5703 (patch) | |
| tree | 4976df1d0dd755021bb44e7943c595c13d1b10b9 /src/misc | |
| parent | Merge pull request #2396 from Tosuke/fix-2354 (diff) | |
| parent | コントロールパネルから招待制のオンオフを切り替えら... (diff) | |
| download | misskey-fca7a9da94751e7f6a1205827dcd8067523f5703.tar.gz misskey-fca7a9da94751e7f6a1205827dcd8067523f5703.tar.bz2 misskey-fca7a9da94751e7f6a1205827dcd8067523f5703.zip | |
Merge pull request #2412 from syuilo/develop
update
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/i18n.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/misc/i18n.ts b/src/misc/i18n.ts index a07af3e939..3dbfd7fe7b 100644 --- a/src/misc/i18n.ts +++ b/src/misc/i18n.ts @@ -27,10 +27,12 @@ export default class Replacer { let text = texts; if (path) { + path = path.replace('.ts', ''); + if (text.hasOwnProperty(path)) { text = text[path]; } else { - if (this.lang === 'ja') console.warn(`path '${path}' not found`); + if (this.lang === 'ja-JP') console.warn(`path '${path}' not found`); return key; // Fallback } } @@ -46,10 +48,10 @@ export default class Replacer { }); if (error) { - if (this.lang === 'ja') console.warn(`key '${key}' not found in '${path}'`); + if (this.lang === 'ja-JP') console.warn(`key '${key}' not found in '${path}'`); return key; // Fallback } else if (typeof text !== 'string') { - if (this.lang === 'ja') console.warn(`key '${key}' is not string in '${path}'`); + if (this.lang === 'ja-JP') console.warn(`key '${key}' is not string in '${path}'`); return key; // Fallback } else { return text; |