diff --git a/js/modules/i18n.js b/js/modules/i18n.js index 9cd8ef2d3..5dd495690 100644 --- a/js/modules/i18n.js +++ b/js/modules/i18n.js @@ -17,10 +17,14 @@ exports.setup = (locale, messages) => { } if (Array.isArray(substitutions)) { - return substitutions.reduce( - (result, substitution) => result.replace(/\$.+?\$/, substitution), - message + const replacedNameDollarSign = message.replaceAll('$', 'ᅲ'); + + const substituted = substitutions.reduce( + (result, substitution) => result.replace(/ᅲ.+?ᅲ/, substitution), + replacedNameDollarSign ); + + return substituted.replaceAll('ᅲ', '$'); } else if (substitutions) { return message.replace(/\$.+?\$/, substitutions); }