From 678e80bb8bab67c1791fef0d73dfe200f8aaaaf0 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 8 Jul 2018 04:34:47 +0900 Subject: [PATCH] Update warning message for missing locale --- src/misc/i18n.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/i18n.ts b/src/misc/i18n.ts index 4ed3c7a2df..a07af3e939 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 { - console.warn(`path '${path}' not found in '${this.lang}'`); + if (this.lang === 'ja') console.warn(`path '${path}' not found`); return key; // Fallback } } @@ -46,10 +46,10 @@ export default class Replacer { }); if (error) { - console.warn(`key '${key}' not found in '${path}' of '${this.lang}'`); + if (this.lang === 'ja') console.warn(`key '${key}' not found in '${path}'`); return key; // Fallback } else if (typeof text !== 'string') { - console.warn(`key '${key}' is not string in '${path}' of '${this.lang}'`); + if (this.lang === 'ja') console.warn(`key '${key}' is not string in '${path}'`); return key; // Fallback } else { return text;