From 1b9c69f7939391afb536abe10b02572584ed564f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 23 Aug 2018 01:55:39 +0900 Subject: Fix bug --- src/misc/i18n.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/misc') diff --git a/src/misc/i18n.ts b/src/misc/i18n.ts index a07af3e939..8379b2f538 100644 --- a/src/misc/i18n.ts +++ b/src/misc/i18n.ts @@ -30,7 +30,7 @@ export default class Replacer { 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 +46,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; -- cgit v1.2.3-freya From d129151fdf32de7134cdcee57d255fef82caf796 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 23 Aug 2018 02:28:58 +0900 Subject: Fix #2410 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit なぜか .ts という拡張子で来るのかは不明 --- src/misc/i18n.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/misc') diff --git a/src/misc/i18n.ts b/src/misc/i18n.ts index 8379b2f538..3dbfd7fe7b 100644 --- a/src/misc/i18n.ts +++ b/src/misc/i18n.ts @@ -27,6 +27,8 @@ export default class Replacer { let text = texts; if (path) { + path = path.replace('.ts', ''); + if (text.hasOwnProperty(path)) { text = text[path]; } else { -- cgit v1.2.3-freya