diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-07-07 13:59:46 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-07-08 11:51:54 +0200 |
commit | bf85bf2a9ec076a9bfa0ff0cfb2a97b2059818fc (patch) | |
tree | 1b62a97015cb19124d6f7ba505257b2622050fe0 /Meta | |
parent | 36abcd820d1a5b899f67469d418985863d68232a (diff) | |
download | serenity-bf85bf2a9ec076a9bfa0ff0cfb2a97b2059818fc.zip |
LibJS: Use Intl.PluralRules within Intl.RelativeFormat
The Polish test cases added here cover previous failures from test262,
due to the way that 0 is specified to be "many" in Polish.
Diffstat (limited to 'Meta')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeRelativeTimeFormat.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeRelativeTimeFormat.cpp b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeRelativeTimeFormat.cpp index 0516b2dc85..03ff6c7d36 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeRelativeTimeFormat.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeRelativeTimeFormat.cpp @@ -58,7 +58,7 @@ struct AK::Formatter<RelativeTimeFormat> : Formatter<FormatString> { ErrorOr<void> format(FormatBuilder& builder, RelativeTimeFormat const& format) { return Formatter<FormatString>::format(builder, - "{{ TimeUnit::{}, Style::{}, RelativeTimeFormat::Plurality::{}, {}, {} }}", + "{{ TimeUnit::{}, Style::{}, PluralCategory::{}, {}, {} }}", format.time_unit, format.style, format.plurality, @@ -204,6 +204,7 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer #include <AK/Vector.h> #include <LibUnicode/Locale.h> #include <LibUnicode/RelativeTimeFormat.h> +#include <LibUnicode/UnicodePluralRules.h> #include <LibUnicode/UnicodeRelativeTimeFormat.h> namespace Unicode { @@ -224,7 +225,7 @@ struct RelativeTimeFormatImpl { TimeUnit time_unit; Style style; - RelativeTimeFormat::Plurality plurality; + PluralCategory plurality; @string_index_type@ tense_or_number { 0 }; @string_index_type@ pattern { 0 }; }; |