From 976c57c0431f52396ff8783a493557d2d67ad138 Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Mon, 26 Aug 2019 02:57:06 +0200 Subject: [PATCH] i18n: rely less on exceptions --- lib/i18n.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/i18n.ts b/lib/i18n.ts index 247c28f..d9a9aa8 100644 --- a/lib/i18n.ts +++ b/lib/i18n.ts @@ -52,7 +52,12 @@ class Localization { continue; } try { - this.strings.set(id, new Entry(entry)); + if (entry.message.includes("$")) { + this.strings.set(id, new Entry(entry)); + } + else { + this.strings.set(id, entry.message); + } } catch (ex) { this.strings.set(id, entry.message);