Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra quotes around . in number abbreviations #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions src/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ const formats: {[key in SupportedLocale]: Format} = {
'1000-count-other': '0',
'10000-count-other': '0',
'100000-count-other': '0',
'1000000-count-other': "0 Mio'.'",
'10000000-count-other': "00 Mio'.'",
'100000000-count-other': "000 Mio'.'",
'1000000000-count-other': "0 Mrd'.'",
'10000000000-count-other': "00 Mrd'.'",
'100000000000-count-other': "000 Mrd'.'",
'1000000000000-count-other': "0 Bio'.'",
'10000000000000-count-other': "00 Bio'.'",
'100000000000000-count-other': "000 Bio'.'",
'1000000-count-other': '0 Mio.',
'10000000-count-other': '00 Mio.',
'100000000-count-other': '000 Mio.',
'1000000000-count-other': '0 Mrd.',
'10000000000-count-other': '00 Mrd.',
'100000000000-count-other': '000 Mrd.',
'1000000000000-count-other': '0 Bio.',
'10000000000000-count-other': '00 Bio.',
'100000000000000-count-other': '000 Bio.',
},
},
el: {
Expand Down Expand Up @@ -229,18 +229,18 @@ const formats: {[key in SupportedLocale]: Format} = {
},
},
condensePatterns: {
'1000-count-other': "0 χιλ'.'",
'10000-count-other': "00 χιλ'.'",
'100000-count-other': "000 χιλ'.'",
'1000000-count-other': "0 εκ'.'",
'10000000-count-other': "00 εκ'.'",
'100000000-count-other': "000 εκ'.'",
'1000000000-count-other': "0 δισ'.'",
'10000000000-count-other': "00 δισ'.'",
'100000000000-count-other': "000 δισ'.'",
'1000000000000-count-other': "0 τρισ'.'",
'10000000000000-count-other': "00 τρισ'.'",
'100000000000000-count-other': "000 τρισ'.'",
'1000-count-other': '0 χιλ.',
'10000-count-other': '00 χιλ.',
'100000-count-other': '000 χιλ.',
'1000000-count-other': '0 εκ.',
'10000000-count-other': '00 εκ.',
'100000000-count-other': '000 εκ.',
'1000000000-count-other': '0 δισ.',
'10000000000-count-other': '00 δισ.',
'100000000000-count-other': '000 δισ.',
'1000000000000-count-other': '0 τρισ.',
'10000000000000-count-other': '00 τρισ.',
'100000000000000-count-other': '000 τρισ.',
},
},
en: {
Expand Down Expand Up @@ -356,18 +356,18 @@ const formats: {[key in SupportedLocale]: Format} = {
},
},
condensePatterns: {
'1000-count-other': "0 t'.'",
'10000-count-other': "00 t'.'",
'100000-count-other': "000 t'.'",
'1000000-count-other': "0 milj'.'",
'10000000-count-other': "00 milj'.'",
'100000000-count-other': "000 milj'.'",
'1000000000-count-other': "0 mrd'.'",
'10000000000-count-other': "00 mrd'.'",
'100000000000-count-other': "000 mrd'.'",
'1000000000000-count-other': "0 bilj'.'",
'10000000000000-count-other': "00 bilj'.'",
'100000000000000-count-other': "000 bilj'.'",
'1000-count-other': '0 t.',
'10000-count-other': '00 t.',
'100000-count-other': '000 t.',
'1000000-count-other': '0 milj.',
'10000000-count-other': '00 milj.',
'100000000-count-other': '000 milj.',
'1000000000-count-other': '0 mrd.',
'10000000000-count-other': '00 mrd.',
'100000000000-count-other': '000 mrd.',
'1000000000000-count-other': '0 bilj.',
'10000000000000-count-other': '00 bilj.',
'100000000000000-count-other': '000 bilj.',
},
},
fr: {
Expand Down Expand Up @@ -717,15 +717,15 @@ const formats: {[key in SupportedLocale]: Format} = {
'1000-count-other': '0k',
'10000-count-other': '00k',
'100000-count-other': '000k',
'1000000-count-other': "0 mill'.'",
'10000000-count-other': "00 mill'.'",
'100000000-count-other': "000 mill'.'",
'1000000000-count-other': "0 mrd'.'",
'10000000000-count-other': "00 mrd'.'",
'100000000000-count-other': "000 mrd'.'",
'1000000000000-count-other': "0 bill'.'",
'10000000000000-count-other': "00 bill'.'",
'100000000000000-count-other': "000 bill'.'",
'1000000-count-other': '0 mill.',
'10000000-count-other': '00 mill.',
'100000000-count-other': '000 mill.',
'1000000000-count-other': '0 mrd.',
'10000000000-count-other': '00 mrd.',
'100000000000-count-other': '000 mrd.',
'1000000000000-count-other': '0 bill.',
'10000000000000-count-other': '00 bill.',
'100000000000000-count-other': '000 bill.',
},
},
nl: {
Expand Down Expand Up @@ -805,9 +805,9 @@ const formats: {[key in SupportedLocale]: Format} = {
},
},
condensePatterns: {
'1000-count-other': "0 tys'.'",
'10000-count-other': "00 tys'.'",
'100000-count-other': "000 tys'.'",
'1000-count-other': '0 tys.',
'10000-count-other': '00 tys.',
'100000-count-other': '000 tys.',
'1000000-count-other': '0 mln',
'10000000-count-other': '00 mln',
'100000000-count-other': '000 mln',
Expand Down Expand Up @@ -895,15 +895,15 @@ const formats: {[key in SupportedLocale]: Format} = {
'1000-count-other': '0 K',
'10000-count-other': '00 K',
'100000-count-other': '000 K',
'1000000-count-other': "0 mil'.'",
'10000000-count-other': "00 mil'.'",
'100000000-count-other': "000 mil'.'",
'1000000000-count-other': "0 mld'.'",
'10000000000-count-other': "00 mld'.'",
'100000000000-count-other': "000 mld'.'",
'1000000000000-count-other': "0 tril'.'",
'10000000000000-count-other': "00 tril'.'",
'100000000000000-count-other': "000 tril'.'",
'1000000-count-other': '0 mil.',
'10000000-count-other': '00 mil.',
'100000000-count-other': '000 mil.',
'1000000000-count-other': '0 mld.',
'10000000000-count-other': '00 mld.',
'100000000000-count-other': '000 mld.',
'1000000000000-count-other': '0 tril.',
'10000000000000-count-other': '00 tril.',
'100000000000000-count-other': '000 tril.',
},
},
ru: {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/condense-number.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('condenseNumber()', () => {
});

it('condenses numbers in locales other than English', () => {
expect(condenseNumber(1500000, 'de')).toBe(`1 Mio'.'`);
expect(condenseNumber(1500000, 'de')).toBe(`1 Mio.`);
});

it('rounds down by default', () => {
Expand Down