From c9fd7f032c0cc63a6a378030bc32cdaab9f41841 Mon Sep 17 00:00:00 2001 From: jessop Date: Mon, 16 Dec 2019 22:50:43 -0500 Subject: [PATCH] fix i18n messages when token is 0 --- static/app-strings.json | 2 +- ui/i18n.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 744f7bfcb..01532b8df 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -929,4 +929,4 @@ "Use custom wallet servers": "Use custom wallet servers", "Remove custom wallet server": "Remove custom wallet server", "Add": "Add" -} \ No newline at end of file +} diff --git a/ui/i18n.js b/ui/i18n.js index de217cc12..dde2402ce 100644 --- a/ui/i18n.js +++ b/ui/i18n.js @@ -59,6 +59,6 @@ export function __(message, tokens) { } return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) { - return tokens[$2] || $2; + return tokens.hasOwnProperty($2) ? tokens[$2] : $2; }); }