fix(localize): remove unnecessary normalization for Belgium

Belgium does not need to be normalized always (e.g. not in "fr-BE").
But Dutch language does need normalization always, because this is where Intl really makes it wrong, both for "nl-Nl" and "nl-BE".
This commit is contained in:
Mikhail Bashkirov 2019-06-27 09:59:54 +02:00
parent 86c9824f07
commit 0afb0e1272

View file

@ -17,7 +17,7 @@ export function normalizeIntl(formattedParts, options, _locale) {
let normalize = forceNormalSpaces(formattedParts, options);
// Dutch and Belgian currency must be moved to end of number
if (options && options.style === 'currency') {
if (_locale === 'nl-NL' || _locale.slice(-2) === 'BE') {
if (_locale.slice(0, 2) === 'nl') {
normalize = forceCurrencyToEnd(normalize);
}
// Add group separator for Bulgarian locale