diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-01-27 12:40:31 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-27 20:30:52 +0000 |
commit | 2d2f713426cee6da2fe6ffe3fbc94abc313c7d4c (patch) | |
tree | 560a4df9640cc91d30a3b4458ae35c0cfe5bb04c /Userland/Libraries/LibUnicode/NumberFormat.h | |
parent | 236025df193a4841ea0984eaaca8b88b1ea1bb55 (diff) | |
download | serenity-2d2f713426cee6da2fe6ffe3fbc94abc313c7d4c.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibUnicode/NumberFormat.h')
-rw-r--r-- | Userland/Libraries/LibUnicode/NumberFormat.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibUnicode/NumberFormat.h b/Userland/Libraries/LibUnicode/NumberFormat.h index 72108fc2dd..2f3fcfac13 100644 --- a/Userland/Libraries/LibUnicode/NumberFormat.h +++ b/Userland/Libraries/LibUnicode/NumberFormat.h @@ -15,6 +15,7 @@ namespace Unicode { struct NumberGroupings { + u8 minimum_grouping_digits { 0 }; u8 primary_grouping_size { 0 }; u8 secondary_grouping_size { 0 }; }; |