Skip to content

Update translations from Weblate with app_zh.arb added, support zh-Hant-TW #1520

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PIG208
Copy link
Member

@PIG208 PIG208 commented May 20, 2025

This adds app_zh.arb so that locales like "zh-Hans" can have their
code generated.

This is because flutter gen-l10n requires a base locale to be present.
Only having "zh-Hans" gives us the following error.

  Arb file for a fallback, zh, does not exist, even though
  the following locale(s) exist: [zh_Hans].
  When locales specify a script code or country code, a
  base locale (without the script code or country code) should
  exist as the fallback. Please create a {fileName}_zh.arb
  file.

"zh" will not appear on Weblate, though, because we exclude it from
settings. This is intentional since it only makes sense to translate
the more specific locales like "zh-Hans" and "zh-Hant-TW".

CZO discussion:
https://chat.zulip.org/#narrow/channel/58-translation/topic/zh_*.20in.20Weblate/near/2174667

weblate and others added 2 commits May 20, 2025 17:06
This adds app_zh.arb so that locales like "zh-Hans" can have their
code generated.

This is because `flutter gen-l10n` requires a base locale to be present.
Only having "zh-Hans" gives us the following error.

  Arb file for a fallback, zh, does not exist, even though
  the following locale(s) exist: [zh_Hans].
  When locales specify a script code or country code, a
  base locale (without the script code or country code) should
  exist as the fallback. Please create a {fileName}_zh.arb
  file.

"zh" will not appear on Weblate, though, because we exclude it from
settings.  This is intentional since it only makes sense to translate
the more specific locales like "zh-Hans" and "zh-Hant-TW".

CZO discussion:
  https://chat.zulip.org/#narrow/channel/58-translation/topic/zh_*.20in.20Weblate/near/2174667
Normally, instead of doing it manually, we would add new languages
from Weblate's UI.  This one is not offered there.

See CZO discussion on how we picked this locale identifier:
  https://chat.zulip.org/#narrow/channel/58-translation/topic/zh_*.20in.20Weblate/near/2177452
@gnprice
Copy link
Member

gnprice commented May 21, 2025

Cool, thanks.

I just sent #1522 as a pure cherry-pick of the commit that went into v0.0.29. If we merge that first, then that will facilitate comparing v0.0.29 with upcoming versions in main; it should also simplify this change somewhat by taking care of most of the unrelated changes that had accumulated.

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

Successfully merging this pull request may close these issues.

3 participants