Skip to content

Commit 8fb70c2

Browse files
bverhoefMikhail Bashkirov
authored andcommitted
fix(localize): return sign to the front of the currency formatted value in Dutch
1 parent 0afb0e1 commit 8fb70c2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/localize/src/number/normalizeIntl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function normalizeIntl(formattedParts, options, _locale) {
1717
let normalize = forceNormalSpaces(formattedParts, options);
1818
// Dutch and Belgian currency must be moved to end of number
1919
if (options && options.style === 'currency') {
20-
if (_locale.slice(0, 2) === 'nl') {
20+
if (options.currencyDisplay === 'code' && _locale.slice(0, 2) === 'nl') {
2121
normalize = forceCurrencyToEnd(normalize);
2222
}
2323
// Add group separator for Bulgarian locale

packages/localize/test/number/formatNumber.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ describe('formatNumber', () => {
234234
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('123.456,79 EUR');
235235
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('123.456,79 USD');
236236
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('123.457 JPY');
237-
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79');
238-
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('123.456,79 $');
239-
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('123.457 ¥');
237+
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79');
238+
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$ 123.456,79');
239+
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥ 123.457');
240240
});
241241
});
242242

@@ -246,9 +246,9 @@ describe('formatNumber', () => {
246246
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('123.456,79 EUR');
247247
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('123.456,79 USD');
248248
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('123.457 JPY');
249-
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79');
250-
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('123.456,79 $');
251-
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('123.457 ¥');
249+
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79');
250+
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$ 123.456,79');
251+
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥ 123.457');
252252
});
253253
});
254254

0 commit comments

Comments
 (0)