fix(common): use correct currency format for locale de-AT (#24658)

Fixes #24609
PR Close #24658
This commit is contained in:
Olivier Combe 2018-06-25 16:49:46 +02:00 committed by Miško Hevery
parent 68814040e3
commit dcabb05102
4 changed files with 7 additions and 3 deletions

View File

@ -949,7 +949,7 @@ export const locale_de_AT = [
[['v. Chr.', 'n. Chr.'], u, u], 1, [6, 0], [['v. Chr.', 'n. Chr.'], u, u], 1, [6, 0],
['dd.MM.yy', 'dd.MM.y', 'd. MMMM y', 'EEEE, d. MMMM y'], ['dd.MM.yy', 'dd.MM.y', 'd. MMMM y', 'EEEE, d. MMMM y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'], ['{1}, {0}', u, '{1} \'um\' {0}', u], ['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'], ['{1}, {0}', u, '{1} \'um\' {0}', u],
[',', ' ', ';', '%', '+', '-', 'E', '·', '‰', '∞', 'NaN', ':', '.'], [',', ' ', ';', '%', '+', '-', 'E', '·', '‰', '∞', 'NaN', ':', u, '.'],
['#,##0.###', '#,##0 %', '¤ #,##0.00', '#E0'], '€', 'Euro', { ['#,##0.###', '#,##0 %', '¤ #,##0.00', '#E0'], '€', 'Euro', {
'ATS': ['öS'], 'ATS': ['öS'],
'AUD': ['AU$', '$'], 'AUD': ['AU$', '$'],

View File

@ -51,7 +51,7 @@ export default [
[['v. Chr.', 'n. Chr.'], u, u], 1, [6, 0], [['v. Chr.', 'n. Chr.'], u, u], 1, [6, 0],
['dd.MM.yy', 'dd.MM.y', 'd. MMMM y', 'EEEE, d. MMMM y'], ['dd.MM.yy', 'dd.MM.y', 'd. MMMM y', 'EEEE, d. MMMM y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'], ['{1}, {0}', u, '{1} \'um\' {0}', u], ['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'], ['{1}, {0}', u, '{1} \'um\' {0}', u],
[',', ' ', ';', '%', '+', '-', 'E', '·', '‰', '∞', 'NaN', ':', '.'], [',', ' ', ';', '%', '+', '-', 'E', '·', '‰', '∞', 'NaN', ':', u, '.'],
['#,##0.###', '#,##0 %', '¤ #,##0.00', '#E0'], '€', 'Euro', { ['#,##0.###', '#,##0 %', '¤ #,##0.00', '#E0'], '€', 'Euro', {
'ATS': ['öS'], 'ATS': ['öS'],
'AUD': ['AU$', '$'], 'AUD': ['AU$', '$'],

View File

@ -10,6 +10,7 @@ import localeEn from '@angular/common/locales/en';
import localeEsUS from '@angular/common/locales/es-US'; import localeEsUS from '@angular/common/locales/es-US';
import localeFr from '@angular/common/locales/fr'; import localeFr from '@angular/common/locales/fr';
import localeAr from '@angular/common/locales/ar'; import localeAr from '@angular/common/locales/ar';
import localeDeAt from '@angular/common/locales/de-AT';
import {registerLocaleData, CurrencyPipe, DecimalPipe, PercentPipe, formatNumber} from '@angular/common'; import {registerLocaleData, CurrencyPipe, DecimalPipe, PercentPipe, formatNumber} from '@angular/common';
import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testing_internal'; import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testing_internal';
@ -20,6 +21,7 @@ import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testin
registerLocaleData(localeEsUS); registerLocaleData(localeEsUS);
registerLocaleData(localeFr); registerLocaleData(localeFr);
registerLocaleData(localeAr); registerLocaleData(localeAr);
registerLocaleData(localeDeAt);
}); });
describe('DecimalPipe', () => { describe('DecimalPipe', () => {
@ -95,6 +97,8 @@ import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testin
expect(pipe.transform(5.1234, 'CAD', 'symbol-narrow', '5.2-2', 'fr')) expect(pipe.transform(5.1234, 'CAD', 'symbol-narrow', '5.2-2', 'fr'))
.toEqual('00 005,12 $'); .toEqual('00 005,12 $');
expect(pipe.transform(5, 'USD', 'symbol', '', 'fr')).toEqual('5,00 $US'); expect(pipe.transform(5, 'USD', 'symbol', '', 'fr')).toEqual('5,00 $US');
expect(pipe.transform(123456789, 'EUR', 'symbol', '', 'de-at'))
.toEqual('€ 123.456.789,00');
}); });
it('should support any currency code name', () => { it('should support any currency code name', () => {

View File

@ -444,7 +444,7 @@ function getNumberSettings(localeData) {
symbols.timeSeparator, symbols.timeSeparator,
]; ];
if (symbols.currencyDecimal) { if (symbols.currencyDecimal || symbols.currencyGroup) {
symbolValues.push(symbols.currencyDecimal); symbolValues.push(symbols.currencyDecimal);
} }