fix(l10n): New translations#730
Conversation
📝 WalkthroughWalkthroughThis PR adds new translation keys for app translation contributions, data translation contributions, user feedback UI elements, and donation descriptions across 12 localization files. It also updates metadata descriptions, corrects locale tags, and adjusts one translation value in Chinese. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🤖 Fix all issues with AI agents
In `@lib/l10n/arb/intl_es.arb`:
- Line 2: The locale declaration in intl_es.arb currently uses "@@locale":
"es-ES", which is inconsistent with the project's single-language locale
convention; change the @@locale value to "es" (i.e., "@@locale": "es") in
intl_es.arb so it aligns with other locales (cs, de, en, fr, it, ko, pl, ru, tr)
and ensures proper matching/fallback for generic and other Spanish variants, or
alternatively add a brief comment/documentation in the same file explaining why
"es-ES" must be used and update the app's locale matching/fallback logic to
account for region-specific tags.
🟡 Minor comments (24)
lib/l10n/arb/intl_es.arb-1309-1328 (1)
1309-1328: New translation keys are not translated to Spanish and contain a typo.The user feedback and donation keys contain English text. Line 1324: "maintance" → "maintenance".
lib/l10n/arb/intl_fr.arb-1309-1328 (1)
1309-1328: New translation keys are not translated to French and contain a typo.The keys
userFeedbackLabelText,userFeedbackErrorText,userFeedbackSubmitButton, anddonationDescriptionTextcontain English text.Line 1324: "maintance" → "maintenance".
lib/l10n/arb/intl_fr.arb-399-418 (1)
399-418: New translation keys are not translated to French.The new keys (
contributeAppTranslationsTitle,contributeAppTranslationsDescription,contributeDataTranslationsTitle,contributeDataTranslationsDescription) contain English text. These should be translated to French for this locale file.lib/l10n/arb/intl_es.arb-399-418 (1)
399-418: New translation keys are not translated to Spanish.The new contribution-related keys contain English text and should be translated to Spanish.
lib/l10n/arb/intl_pl.arb-399-418 (1)
399-418: New translation keys are not translated to Polish.These keys (
contributeAppTranslationsTitle,contributeAppTranslationsDescription,contributeDataTranslationsTitle,contributeDataTranslationsDescription) contain English text in a Polish locale file. They should be translated to Polish for consistency with the rest of the file.Additionally, the
@contributeAppTranslationsDescriptionand@contributeDataTranslationsDescriptionmetadata incorrectly use "Title for contribute translations link" as the description, but these are description entries, not titles.lib/l10n/arb/intl_it.arb-399-418 (1)
399-418: New translation keys are not translated to Italian.The new contribution-related keys contain English text and should be translated to Italian.
lib/l10n/arb/intl_tr.arb-399-418 (1)
399-418: New translation keys are not translated to Turkish.The new contribution-related keys contain English text and should be translated to Turkish.
lib/l10n/arb/intl_it.arb-1309-1328 (1)
1309-1328: New translation keys are not translated to Italian and contain a typo.The user feedback and donation keys contain English text. Line 1324: "maintance" → "maintenance".
lib/l10n/arb/intl_tr.arb-1309-1328 (1)
1309-1328: New translation keys are not translated to Turkish and contain a typo.The user feedback and donation keys contain English text. Line 1324: "maintance" → "maintenance".
lib/l10n/arb/intl_pl.arb-1309-1328 (1)
1309-1328: New translation keys are not translated to Polish and contain a typo.The keys
userFeedbackLabelText,userFeedbackErrorText,userFeedbackSubmitButton, anddonationDescriptionTextcontain English text in a Polish locale file.Also, Line 1324 has a typo: "maintance" should be "maintenance".
Proposed fix for the typo
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_cs.arb-399-418 (1)
399-418: Localize the new CS strings (currently English).These values are still English; please translate or confirm intended fallback.
Also applies to: 1309-1323
lib/l10n/arb/intl_ru.arb-399-418 (1)
399-418: Localize the new RU strings (currently English).These user-facing values are still English; please translate or confirm that English fallback is intended for RU.
Also applies to: 1309-1323
lib/l10n/arb/intl_pt.arb-399-414 (1)
399-414: Translate new contribute strings to pt-BR.*These entries are still English; consider localized pt-BR equivalents for consistency.
lib/l10n/arb/intl_zh.arb-399-418 (1)
399-418: Localize the new ZH strings (currently English).These values are still English; please translate or confirm intended fallback.
Also applies to: 1309-1323
lib/l10n/arb/intl_de.arb-399-418 (1)
399-418: Localize the new DE strings (currently English).These values are still English; please translate or confirm intended fallback.
Also applies to: 1309-1323
lib/l10n/arb/intl_de.arb-1324-1325 (1)
1324-1325: Fix typo in donation description ("maintance").✏️ Suggested fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_zh.arb-1324-1325 (1)
1324-1325: Fix typo in donation description ("maintance").✏️ Suggested fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_cs.arb-1324-1325 (1)
1324-1325: Fix typo in donation description ("maintance").✏️ Suggested fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_ru.arb-1324-1325 (1)
1324-1325: Fix typo in donation description ("maintance").✏️ Suggested fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_sr.arb-419-423 (1)
419-423: Metadata description may be incorrect.The description for
@contributeTranslationsTitlewas changed to"Description for contribute translations link", butcontributeTranslationsTitleis a title entry (line 419). The original description"Title for contribute translations link"appears to have been correct. This change seems to introduce an inconsistency rather than fix one.lib/l10n/arb/intl_ko.arb-419-423 (1)
419-423: Same metadata description issue as in intl_sr.arb.The description for
@contributeTranslationsTitlewas changed to"Description for contribute translations link", but this entry is a title. The original description was likely correct.lib/l10n/arb/intl_ko.arb-1324-1324 (1)
1324-1324: Same typo: "maintance" should be "maintenance".This typo appears across multiple locale files in this PR.
Proposed fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_sr.arb-1324-1324 (1)
1324-1324: Typo: "maintance" should be "maintenance".The text contains a spelling error that will be visible to users.
Proposed fix
- "donationDescriptionText": "Everything from tech support to supporting app maintance", + "donationDescriptionText": "Everything from tech support to supporting app maintenance",lib/l10n/arb/intl_sr.arb-2-2 (1)
2-2: Update the@@localetag from the obsoletesr-CScode tosr-RS.The locale code
sr-CSis deprecated per BCP 47 standards because CS (Serbia and Montenegro) is an obsolete ISO 3166 region code. Usesr-RSinstead, which is the current standard for Serbian in Serbia.
🧹 Nitpick comments (2)
lib/l10n/arb/intl_sr.arb (1)
405-408: Inconsistent metadata description.The
@contributeAppTranslationsDescriptionmetadata says"description": "Title for contribute translations link", but this is a description entry, not a title. The same issue exists for@contributeDataTranslationsDescriptionon lines 415-418. Consider updating to"Description for contribute translations link"for consistency.lib/l10n/arb/intl_ko.arb (1)
399-418: New translation keys are in English, not Korean.The newly added keys (
contributeAppTranslationsTitle,contributeAppTranslationsDescription,contributeDataTranslationsTitle,contributeDataTranslationsDescription) contain English text. If this is intentional as a placeholder pending translation, this is fine. Otherwise, these should be localized to Korean.Additionally, the metadata descriptions for
@contributeAppTranslationsDescription(line 406) and@contributeDataTranslationsDescription(line 416) incorrectly say"Title for contribute translations link"when they should say"Description for...".
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
lib/l10n/arb/intl_cs.arblib/l10n/arb/intl_de.arblib/l10n/arb/intl_es.arblib/l10n/arb/intl_fr.arblib/l10n/arb/intl_it.arblib/l10n/arb/intl_ko.arblib/l10n/arb/intl_pl.arblib/l10n/arb/intl_pt.arblib/l10n/arb/intl_ru.arblib/l10n/arb/intl_sr.arblib/l10n/arb/intl_tr.arblib/l10n/arb/intl_zh.arb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test / android
🔇 Additional comments (9)
lib/l10n/arb/intl_ru.arb (1)
421-421: Metadata description update looks good.lib/l10n/arb/intl_pt.arb (3)
421-421: Metadata description update looks good.
1309-1325: LGTM for the new PT feedback/donation strings.
2-2: No action required—the "pt-BR" locale tag is correct and supported.The Flutter l10n generator accepts hyphenated BCP 47 locale tags. This is confirmed by other locales in the same project (es-ES, zh-CN) that use the same hyphenated format. The @@Locale field inside intl_pt.arb is correctly set to "pt-BR", and localization will load properly for Portuguese (Brazil) users.
lib/l10n/arb/intl_de.arb (1)
421-421: Metadata description update looks good.lib/l10n/arb/intl_zh.arb (3)
82-82: baroTitle update looks fine.
421-421: Metadata description update looks good.
2-2: The "zh-CN" locale tag format is correctly accepted by Flutter's intl generator. The codebase already uses hyphenated country codes for other locales (es-ES, pt-BR, sr-CS), and Flutter's Locale class natively parses these into language and country components. The locale resolution logic in app_root.dart uses languageCode matching, which correctly handles all hyphenated formats. No changes needed.lib/l10n/arb/intl_cs.arb (1)
421-421: Metadata description update looks good.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "@@locale": "es", | |||
| "@@locale": "es-ES", | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if there are other Spanish locale variants in the project
find lib/l10n/arb -name "*intl_es*.arb" 2>/dev/null | sort
# Check for l10n configuration file
find . -maxdepth 2 -name "l10n.yaml" -o -name ".l10nrc" 2>/dev/null
# Check pubspec.yaml for Flutter localization configuration
if [ -f pubspec.yaml ]; then
echo "=== pubspec.yaml localization section ==="
cat pubspec.yaml | grep -A 30 "flutter:" | head -40
fi
# Check if intl_es.arb currently has the locale set
echo "=== Current intl_es.arb locale setting ==="
head -5 lib/l10n/arb/intl_es.arb 2>/dev/nullRepository: WFCD/navis
Length of output: 1157
🏁 Script executed:
cat l10n.yamlRepository: WFCD/navis
Length of output: 193
🏁 Script executed:
# Check the git diff for this file
cd lib/l10n/arb && git diff HEAD~1 intl_es.arb 2>/dev/null | head -50
# Also list all ARB files to see the locale pattern
echo "=== All locale files ==="
ls -la lib/l10n/arb/intl_*.arb 2>/dev/null | awk '{print $NF}' | xargs -I {} basename {} | sortRepository: WFCD/navis
Length of output: 78
🏁 Script executed:
# List all files in the l10n directory
echo "=== Files in lib/l10n/arb ==="
ls -la lib/l10n/arb/ | head -20
# Verify the specific file exists and show its locale
echo "=== intl_es.arb first 10 lines ==="
head -10 lib/l10n/arb/intl_es.arb
# Check git status for this file
echo "=== Git status for intl_es.arb ==="
git status lib/l10n/arb/intl_es.arb 2>/dev/null || echo "File status check failed"
# Try to see recent changes to this file
echo "=== Git log for intl_es.arb ==="
git log --oneline -10 lib/l10n/arb/intl_es.arb 2>/dev/null || echo "Git log failed"Repository: WFCD/navis
Length of output: 1512
🏁 Script executed:
# Get the current HEAD and show git diff
git diff HEAD lib/l10n/arb/intl_es.arb | head -100
# Also check git show to see what changed
git show HEAD:lib/l10n/arb/intl_es.arb 2>/dev/null | head -10Repository: WFCD/navis
Length of output: 331
🏁 Script executed:
# Show the previous version
git show HEAD~1:lib/l10n/arb/intl_es.arb 2>/dev/null | head -5
# Show detailed log with changes
git log -p -1 lib/l10n/arb/intl_es.arb 2>/dev/null | head -50Repository: WFCD/navis
Length of output: 36
🏁 Script executed:
# Check if file was recently added
git log --name-status --oneline lib/l10n/arb/intl_es.arb 2>/dev/null | head -20
# Check the current branch/commit info
git log --oneline -5 2>/dev/null
# Search for any mention of "es" locale in recent changes
git diff --name-only HEAD~5..HEAD 2>/dev/null | grep -i esRepository: WFCD/navis
Length of output: 204
🏁 Script executed:
# Check the @@locale values in all locale files
for file in lib/l10n/arb/intl_*.arb; do
locale_code=$(head -3 "$file" | grep '@@locale' | sed 's/.*"@@locale": "\([^"]*\)".*/\1/')
filename=$(basename "$file")
echo "$filename: $locale_code"
doneRepository: WFCD/navis
Length of output: 273
🌐 Web query:
Flutter locale matching es-ES vs es fallback behavior
💡 Result:
Short answer
- Flutter's default resolution picks the best match in this priority: exact (language+script+country), language+script, language+country, language-only, country-only, then the first supportedLocale. So es-ES will resolve to an exact supported Locale('es','ES') if present; otherwise it will fall back to a language-only Locale('es') if that is listed. [1][2]
Notes and recommendations
- If you need different behavior, provide localeListResolutionCallback/localeResolutionCallback or include both Locale('es') and Locale('es','ES') in supportedLocales (exact match wins). [3][1]
Sources
- supportedLocales and default matching priority. [1]
- basicLocaleListResolution (default algorithm details). [2]
- localeListResolutionCallback / override points. [3]
New Spanish locale file uses es-ES instead of es, breaking locale matching pattern.
The new intl_es.arb file declares @@locale: "es-ES" (Spain-specific Spanish), which is inconsistent with other single-language locales in the project (cs, de, en, fr, it, ko, pl, ru, tr all use just the language code). This inconsistency could cause locale matching issues: users with devices set to generic Spanish (es) or other Spanish variants (e.g., es-MX, es-AR) won't match this region-specific locale and will fall back to English.
Either use es to align with other single-language locales, or document why Spain-specific Spanish is preferred and ensure proper fallback configuration.
🤖 Prompt for AI Agents
In `@lib/l10n/arb/intl_es.arb` at line 2, The locale declaration in intl_es.arb
currently uses "@@locale": "es-ES", which is inconsistent with the project's
single-language locale convention; change the @@locale value to "es" (i.e.,
"@@locale": "es") in intl_es.arb so it aligns with other locales (cs, de, en,
fr, it, ko, pl, ru, tr) and ensures proper matching/fallback for generic and
other Spanish variants, or alternatively add a brief comment/documentation in
the same file explaining why "es-ES" must be used and update the app's locale
matching/fallback logic to account for region-specific tags.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.