Localization: Fix "0" variables (#5177)
This commit is contained in:
parent
516061a553
commit
8040cee2d2
@ -367,7 +367,7 @@ function processTranslation(
|
||||
|
||||
const variableEntries = variables ? Object.entries(variables) : [];
|
||||
const finalString = variableEntries.reduce((result, [key, value]) => {
|
||||
if (!value) return result;
|
||||
if (value === undefined) return result;
|
||||
|
||||
const valueAsString = Number.isInteger(value) ? formatters!.number.format(value as number) : String(value);
|
||||
return result.replace(`{${key}}`, valueAsString);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user