Repository navigation
refactor(i18n): prune dead and orphaned keys, localize remaining strings, and add validation script - #1560
Open
abhayrajjais01 wants to merge 7 commits into
Conversation
abhayrajjais01
marked this pull request as draft
October 20, 2026 09:58
abhayrajjais01
marked this pull request as ready for review
October 20, 2026 09:59
…add validation script (joinmarket-webui#1554) - Prune 7 dead keys in en/translation.json that are no longer referenced. - Prune orphaned legacy keys across all non-English translation files (de, fr, it, pt_BR, ru, zh_Hans, zh_Hant) while preserving valid Slavic plural forms. - Localize hardcoded strings in BetaInfoHeader, RescanChainPage, and SettingsPage. - Add an automated i18n validation script (scripts/i18n-check.mjs) and 'npm run i18n:check' command to detect dead or orphaned keys. - Add unit test for translation key parity (src/i18n/keys.test.ts) and integrate check into CI.
abhayrajjais01
force-pushed
the
refactor/i18n-audit-prune-keys
branch
from
October 31, 2026 14:10
7057a21 to
25a2442
Compare
…t-prune-keys # Conflicts: # src/i18n/locales/de/translation.json # src/i18n/locales/en/translation.json # src/i18n/locales/fr/translation.json # src/i18n/locales/it/translation.json # src/i18n/locales/pt_BR/translation.json # src/i18n/locales/zh_Hans/translation.json # src/i18n/locales/zh_Hant/translation.json
…t-prune-keys # Conflicts: # package.json
…t-prune-keys # Conflicts: # src/i18n/locales/fr/translation.json # src/i18n/locales/it/translation.json # src/i18n/locales/pt_BR/translation.json
….alert_rescan_in_progress key
This branch has not been deployed
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.
Resolves #1554
Summary
Following up on the v2: Parity to Legacy roadmap item to adapt and rethink i18n keys, this PR performs a comprehensive audit of translation keys across the codebase:
en: Removed 7 unreferenced legacy strings that survived component refactors (create_wallet.alert_rescan_in_progress,create_wallet.feedback_valid,earn.fidelity_bond.select_date.warning_fb_with_same_expiry,earn.fidelity_bond.select_utxos.button_select_all,earn.fidelity_bond.select_utxos.button_deselect_all,navbar.title, andsend.input_num_collaborators_placeholder).de,fr,it,pt_BR,ru,zh_Hans, andzh_Hantthat no longer exist in the English source, while preserving valid language-specific plural forms (such asconfirmations_fewandconfirmations_manyin Russian).BetaInfoHeader: localized banner badge, text, and issue link button underbeta_info.RescanChainPage: localized preset block count buttons and Segwit activation tooltip underrescan_chain.button_preset_*andrescan_chain.tooltip_segwit_activation_block.SettingsPage: localized Developer Mode title and toggle switch undersettings.developer_mode_titleandsettings.developer_mode_switch_title.npm run i18n:check) to detect dead keys in English and orphaned keys in other locales. It accounts for dynamic prefixes (PasswordVerificationForm,PreconditionAlert,scheduler.status_,tx_history.label_role_, andjar_details.utxo_list.utxo_tag_tooltip_) and resolves recursive$t(...)translation string interpolations.npm test.npm run i18n:checkintopackage.json'scheckscript and GitHub Actions CI workflow (.github/workflows/build.yml).Key Verification Notes
During audit, several keys initially flagged as potentially dead were verified as actively required:
scheduler.status_*&tx_history.label_role_*: dynamically interpolated at runtime.settings.seed_modal.verification.*&settings.xpubs_modal.verification.*: dynamically referenced viai18nKeyPrefixinPasswordVerificationForm.send.coinjoin_precondition.nested_hint_*,scheduler.precondition.nested_hint_*, andearn.alert_bondless_maker_fees_info_description: actively resolved by i18next$t(...)nesting inside precondition and form validation strings.jar_details.utxo_list.utxo_tag_tooltip_*: actively queried dynamically inJarUtxosTableandBranchEntryTableto display status badge tooltips.All of these active keys were carefully preserved.