fix: add missing localization files (app_nb.arb, app_zh.arb) to resol…#1611
fix: add missing localization files (app_nb.arb, app_zh.arb) to resol…#1611DELTA-45-G wants to merge 3 commits intofossasia:developmentfrom
Conversation
|
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- For the new
app_nb.arbandapp_zh.arbfiles, double-check that the locale codes (nb,zh) match how the app and Flutter’s localization setup reference Norwegian and Chinese (e.g.,no,nb_NO,zh_Hans,zh_Hant) to avoid subtle fallback mismatches. - Ensure the new ARB files mirror the structure and metadata (placeholders, descriptions, @-entries) of your primary
app_en.arbso that localized messages using interpolations or plurals don’t break for these fallback locales.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the new `app_nb.arb` and `app_zh.arb` files, double-check that the locale codes (`nb`, `zh`) match how the app and Flutter’s localization setup reference Norwegian and Chinese (e.g., `no`, `nb_NO`, `zh_Hans`, `zh_Hant`) to avoid subtle fallback mismatches.
- Ensure the new ARB files mirror the structure and metadata (placeholders, descriptions, @-entries) of your primary `app_en.arb` so that localized messages using interpolations or plurals don’t break for these fallback locales.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Thanks for the feedback, @sourcery-ai The filenames 'app_nb.arb' and 'app_zh.arb' were chosen because the Flutter build tool was throwing an error expecting these specific locale codes. Both files are direct copies of 'app_en.arb', so the structure, placeholders, and metadata remain identical to ensure consistency and prevent issues with interpolations or pluralized messages. |
|
Thanks for the contribution! A process note. We have automatic Copilot PR reviews enabled on this repository. These reviews are only triggered if the contributor has GitHub Copilot enabled and an active license on their own account. Please enable Copilot in your GitHub settings if you have access. In many regions, free licenses are available through educational institutions or developer programs. Enabling Copilot helps us speed up the auto review process and reduces manual review overhead for the core team. |
There was a problem hiding this comment.
Pull request overview
Adds missing base-locale ARB fallback files required by newer Flutter gen_l10n behavior, resolving build errors when region/script-specific locale files exist without their base counterparts (Fixes #1588).
Changes:
- Added
lib/l10n/app_nb.arbas the required base fallback fornb(to pair withapp_nb_NO.arb). - Added
lib/l10n/app_zh.arbas the required base fallback forzh(to pair withapp_zh_Hans.arb/app_zh_Hant.arb).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/l10n/app_nb.arb | Adds base-locale fallback file required by gen_l10n for Norwegian. |
| lib/l10n/app_zh.arb | Adds base-locale fallback file required by gen_l10n for Chinese. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Build StatusBuild successful. APKs to test: https://github.com/fossasia/badgemagic-app/actions/runs/24320500510/artifacts/6396761531. Screenshots |
mariobehling
left a comment
There was a problem hiding this comment.
Please address AI reviews or add comments if not relevant.
|
Hi @mariobehling , I have addressed the AI reviews by refactoring app_nb.arb and app_zh.arb to be empty {}. This resolves the build errors in #1588 without adding unnecessary technical debt. Ready for another look |







-1_home_screen.png?raw=true)
-2_text_badge.png?raw=true)
-3_emoji_badge.png?raw=true)
-4_inverted_emoji_badge.png?raw=true)
-5_saved_badges.png?raw=true)
-6_saved_badges_clicked.png?raw=true)
-7_draw_badge.png?raw=true)
fix: add missing localization files to resolve build error
Fixes #1588
Changes
lib/l10n/app_nb.arbas a fallback for Norwegian.lib/l10n/app_zh.arbas a fallback for Chinese.Screenshots / Recordings
Checklist:
constants.dartwithout hard coding any value.Summary by Sourcery
Bug Fixes: