From f2ded3f2a7daabbc6041671471cded0da57653cb Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Tue, 6 Dec 2016 14:34:27 -1000 Subject: [PATCH] replace things multiple times --- client/coral-framework/modules/i18n/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-framework/modules/i18n/i18n.js b/client/coral-framework/modules/i18n/i18n.js index 2bab752db..1d81e885c 100644 --- a/client/coral-framework/modules/i18n/i18n.js +++ b/client/coral-framework/modules/i18n/i18n.js @@ -57,7 +57,7 @@ class i18n { let translation = get(this.translations, key); // replace any {n} with the arguments passed to this method replacements.forEach((str, i) => { - translation = translation.replace(`{${i}}`, str); + translation = translation.replace(new RegExp(`\\{${i}\\}`, 'g'), str); }); return translation; } else {