fix(localization): force TR currency code at the end (#641)
This commit is contained in:
parent
a451d4fc8a
commit
89a84a8b29
2 changed files with 7 additions and 4 deletions
|
|
@ -38,6 +38,9 @@ export function normalizeIntl(formattedParts, options, _locale) {
|
||||||
}
|
}
|
||||||
if (_locale === 'tr-TR') {
|
if (_locale === 'tr-TR') {
|
||||||
normalize = forceTryCurrencyCode(normalize, options);
|
normalize = forceTryCurrencyCode(normalize, options);
|
||||||
|
if (options.currencyDisplay === 'code') {
|
||||||
|
normalize = forceCurrencyToEnd(normalize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_locale === 'en-AU') {
|
if (_locale === 'en-AU') {
|
||||||
normalize = forceENAUSymbols(normalize, options);
|
normalize = forceENAUSymbols(normalize, options);
|
||||||
|
|
|
||||||
|
|
@ -311,10 +311,10 @@ describe('formatNumber', () => {
|
||||||
|
|
||||||
describe('tr-TR', () => {
|
describe('tr-TR', () => {
|
||||||
localize.locale = 'tr-TR';
|
localize.locale = 'tr-TR';
|
||||||
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('EUR 123.456,79');
|
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('123.456,79 EUR');
|
||||||
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('USD 123.456,79');
|
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('123.456,79 USD');
|
||||||
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('JPY 123.457');
|
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('123.457 JPY');
|
||||||
expect(formatNumber(123456.789, currencyCode('TRY'))).to.equal('TL 123.456,79');
|
expect(formatNumber(123456.789, currencyCode('TRY'))).to.equal('123.456,79 TL');
|
||||||
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('€123.456,79');
|
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('€123.456,79');
|
||||||
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$123.456,79');
|
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$123.456,79');
|
||||||
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥123.457');
|
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥123.457');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue