From 0afb0e127265575eb52b245f7d552d0a2a2d77e5 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Thu, 27 Jun 2019 09:59:54 +0200 Subject: [PATCH] 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". --- packages/localize/src/number/normalizeIntl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/localize/src/number/normalizeIntl.js b/packages/localize/src/number/normalizeIntl.js index d63ea9b8d..cabd6a143 100644 --- a/packages/localize/src/number/normalizeIntl.js +++ b/packages/localize/src/number/normalizeIntl.js @@ -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