fix i18n messages when token is 0
This commit is contained in:
parent
5c4e841ac3
commit
c9fd7f032c
2 changed files with 2 additions and 2 deletions
|
@ -59,6 +59,6 @@ export function __(message, tokens) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) {
|
return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) {
|
||||||
return tokens[$2] || $2;
|
return tokens.hasOwnProperty($2) ? tokens[$2] : $2;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue