Skip to content

chore(l10n): remove dead localization keys from non-en arb files - #2285

Merged
ethicnology merged 1 commit into
developfrom
chore/remove-dead-localization-keys
Jun 11, 2026
Merged

chore(l10n): remove dead localization keys from non-en arb files#2285
ethicnology merged 1 commit into
developfrom
chore/remove-dead-localization-keys

Conversation

@ethicnology

Copy link
Copy Markdown
Member

Thanks to @bsn21m

Removed 10 keys (and their @metadata) that exist in translation files but not in the app_en.arb template, so no getter is generated and no Dart code references them:

  • autoswapWarningTriggerAmount, autoswapWarningBaseBalance
  • homeLegacyStorageWithNoBackupTitle, homeLegacyStorageWithNoBackupDescription
  • homeLegacyStorageTitle, homeLegacyStorageDescription
  • legacyStorageWarningBackupNow, legacyStorageWarningLater
  • errorReportingMigrationSubtitle, transactionSwapOpenWithin24Hours

Removed 10 keys (and their @metadata) that exist in translation files
but not in the app_en.arb template, so no getter is generated and no
Dart code references them:

- autoswapWarningTriggerAmount, autoswapWarningBaseBalance
- homeLegacyStorageWithNoBackupTitle, homeLegacyStorageWithNoBackupDescription
- homeLegacyStorageTitle, homeLegacyStorageDescription
- legacyStorageWarningBackupNow, legacyStorageWarningLater
- errorReportingMigrationSubtitle, transactionSwapOpenWithin24Hours
@ethicnology
ethicnology merged commit 6bdc22b into develop Jun 11, 2026
2 checks passed
@claude

claude Bot commented Jun 11, 2026

Copy link
Copy Markdown

Claude finished @ethicnology's task in 2m 6s —— View job


Review: PR #2285 — remove dead localization keys

  • Read the diff and removed keys
  • Verify removed keys are truly absent from app_en.arb
  • Verify no Dart code references the removed keys
  • Check ARB files remain valid JSON
  • Post review summary

Summary

LGTM ✅ — This is a safe, correct cleanup. No bugs, security issues, or regressions found.

The PR removes 10 keys (plus their @metadata) from the 25 non-English .arb files. I verified each correctness concern:

Check Result
All 10 keys absent from localization/app_en.arb (the template that drives codegen) ✅ confirmed — 0 matches
Any Dart code in lib/ references the removed getters ✅ none — 0 matches
Keys fully removed from every translation file (searched all of localization/) ✅ 0 remaining occurrences
Removed keys were not the last entry in any file (trailing-comma / invalid-JSON risk) ✅ tail of each file ends on an unrelated key with no dangling comma

Why this is safe: Flutter's gen_l10n generates getters from the template (app_en.arb) only. Keys present in translation files but missing from the template produce no getter and are silently ignored, so they are genuinely dead weight. Removing them has zero runtime impact and reduces noise for translators.

Minor observations (non-blocking):

  • The PR description lists 10 keys, and that's exactly what was removed — accurate.
  • Worth confirming none of these strings are slated for re-introduction into app_en.arb in an in-flight feature branch (e.g. the homeLegacyStorage* / legacyStorageWarning* group looks like it was a paired feature). If so, the translations would need to be re-added later. Not a defect in this PR — just a coordination note.

Nice cleanup. 👍

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.

1 participant