1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 09:44:58 +00:00

LibUnicode: Generate per-locale minimum grouping digit values

Previously, we were breaking up digits into groups without regard for
the locale's minimumGroupingDigits value in the CLDR. This value is 1 in
most locales, but is 2 in locales such as pl-PL. What this means is that
in those locales, the group separator should only be inserted if the
thousands group has at least 2 digits. So 1000 is formatted as "1,000"
in en-US, but "1000" in pl-PL. And 10000 is "10,000" in en-US and
"10 000" in pl-PL.
This commit is contained in:
Timothy Flynn 2022-01-27 12:40:31 -05:00 committed by Linus Groh
parent 236025df19
commit 2d2f713426
2 changed files with 26 additions and 1 deletions

View file

@ -15,6 +15,7 @@
namespace Unicode {
struct NumberGroupings {
u8 minimum_grouping_digits { 0 };
u8 primary_grouping_size { 0 };
u8 secondary_grouping_size { 0 };
};