replace things multiple times

This commit is contained in:
Riley Davis
2016-12-06 14:34:27 -10:00
parent 31c87cb93f
commit f2ded3f2a7
+1 -1
View File
@@ -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 {