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

Fix BCP 47 language tags for zh_Hant_LZH, zh_Hant_NAN, zh_Hant_YUE #89

Open
winstonsung opened this issue Nov 20, 2024 · 1 comment
Open
Labels
good first issue Good for newcomers l10n Localization related issue Waiting for response Waiting for customer's response

Comments

@winstonsung
Copy link

Describe the bug

These language tags (locale codes) used under lib/l10n/ were invalid:

  • zh_Hant_LZH
  • zh_Hant_NAN
  • zh_Hant_YUE

To Reproduce

Steps to reproduce the behavior:

  1. Go to lib/l10n/
  2. See incorrect language tags in file names
  3. Open these files
  4. See incorrect locale codes being used

Expected behavior

  • zh_Hant_LZHshould belzh(Hant is the main and only script, just like why we useeninstead ofen_Latn`)
  • zh_Hant_NAN should be nan_Hant
  • zh_Hant_YUE should be yue_Hant

Additional context

@Losses
Copy link
Owner

Losses commented Nov 21, 2024

Thank you for bringing this issue to our attention. We understand that the language tags used in lib/l10n/ do not fully align with the IANA standard.

Flutter's translation file naming follows its internal parsing standards, which can lead to discrepancies with IANA tags. For example, for Esperanto, we must use intl_en_EO.arb instead of intl_eo.arb, otherwise the software will crash.

The situation you mentioned is similar. After some exploration, we found that the current file naming is one of the few ways to ensure translations work correctly. We will continue to explore better solutions to achieve a balance between Flutter's implementation and the IANA standard.

If you have deep expertise in Flutter development, we welcome any suggestions and guidance to help us optimize this process. Thank you for your understanding and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers l10n Localization related issue Waiting for response Waiting for customer's response
Projects
None yet
Development

No branches or pull requests

2 participants