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

Plural Rules test: Node doesn't support legacy locales, e.g., "mo", "tl", "iw", "sh", etc. #306

Open
sven-oly opened this issue Sep 19, 2024 · 1 comment

Comments

@sven-oly
Copy link
Collaborator

Node JS tests for plural rules give "unsupported_locale" for legacy locales. The executor gets what locales are supported and adds it to the output, but does not use the actual supported locale in the test.

Example: NodeJS on ICU75.

Input:
{"test_type": "plural_rules", "locale":"mo","label":"5741","type":"ordinal","plural_type":"ordinal","sample":"1000","hexhash":"e46fa8ef9d6e9606ac1a9f64afe6af02519b41a9"}

Output:
{"test_type": "plural_rules", "unsupported_locale":"mo","supported_locals":["ro"],"test_options":{"type":"ordinal"}}

ICU4C and ICU4J seem to mostly support these locales, but not consistently, e.g., ICU4C on ICU75.

expect "few" but actual result is "other"{"locale":"mo","label":"3719","type":"cardinal","plural_type":"cardinal","sample":"100.0","hexhash":"70f44dcd8014753dd93bcb15a0dc1d1f9f434a7d"}

ICU4X seems to report "other" as the result for these tests in legacy locales, which gives failures in many cases where the expected result is not "other".

Possible solutions:

  1. Update the test generation to map old locales to modern ones, i.e., "iw" --> "he", "mo" --> "ro".
  2. In test generation, include a test for both the old locale and the modern one.
  3. Make the executors recognize legacy locales and perform this mapping.
  4. Don't change current behavior.
@sffc
Copy link
Member

sffc commented Nov 11, 2024

I think, catch this as a known_issue

@sffc sffc added this to the Priority ⟨P2⟩ milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants