Repository navigation
i18n: add Traditional Chinese (zh_TW) localization - #93
Open
monarchsofchaos004-gif wants to merge 1 commit into
Open
monarchsofchaos004-gif wants to merge 1 commit into
monarchsofchaos004-gif wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Traditional Chinese (Taiwan) localization,
zh_TW, as suggested in #76.lib/l10n/app_zh_TW.arb(140 keys, same keys and order asapp_zh.arb,@@localeiszh_TW). Translated fromapp_en.arb, usingapp_zh.arbas a reference, with Taiwan terminology (設定, 檔案, 相簿, 影片, 上傳, 下載, 伺服器, 網路, 儲存, 快取, 訂閱, ...). Placeholders ({count},{price},{percent},{succeeded},{failed}) are kept as-is. Punctuation is full-width (,?:), as is usual in Traditional Chinese text.lib/l10n/app_localizations.dart: addedLocale('zh', 'TW')tosupportedLocales, and acountryCode == 'TW'branch inlookupAppLocalizations.lib/l10n/app_localizations_zh.dart: addedAppLocalizationsZhTw extends AppLocalizationsZhwith an override for every key.lib/background_sync_entrypoint.dart: the headless background-sync isolate picks the localization fromPlatform.localeName; it now returnsAppLocalizationsZhTwforzh_TW/zh_Hant_TWand still usesAppLocalizationsZhfor otherzhlocales, so the sync notification is also in Traditional Chinese.Other
zhlocales (zh_CN, zh_HK, ...) behave as before. Date formatting ingallery_body.dartkeys offlanguageCode == 'zh', so it applies tozh_TWunchanged.How it was checked
A script compares
app_zh_TW.arbagainstapp_zh.arbandapp_en.arb: identical key set and order, placeholders identical to the English template, no empty values, no mainland-only terms or Simplified characters, and the DartAppLocalizationsZhTwclass has exactly one override per key (140). All checks pass.Not verified
flutter gen-l10nor build the app, and did not test on a device. The generated Dart files (app_localizations.dart,app_localizations_zh.dart) were updated by hand to follow the gen-l10n output format for a regional variant. If you prefer to regenerate them, please let me know or just runflutter gen-l10n; the.arbis the source of truth.Closes #76