i18n(wallet): translate the migrate-to-seed UI + document it in CLAUDE.md

Route the migration modal (renderSeedMigrationDialog) through TR() — 32 new
keys (30 mig_* plus the previously-untranslated seed_migrate_button/
tt_seed_migrate), reusing existing common keys (cancel/close/refresh/
seed_backup_save*). Format-arg strings go through snprintf(buf, TR(...), v)
so the %.8f/%d specifiers stay in the (validated) translations; plain
strings use "%s", TR(...) to avoid -Wformat-security.

Translated into de/es/fr/ja/ko/pt/ru/zh — additive only (972 -> 1004 keys
per language, format specifiers verified preserved); CJK subset font rebuilt.

CLAUDE.md gains a "Seed phrase & migrate-to-seed" section documenting the
hd-transparent-keys daemon dependency, -usemnemonic, the backup screen, and
the Phase 1 (isolated create) / Phase 2 (sweep + Confirming gate + adopt)
flow that was live-verified on mainnet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-07 15:58:12 -05:00
parent e66f2b6c8c
commit 5228da707f
12 changed files with 344 additions and 61 deletions

View File

@@ -251,6 +251,37 @@ void I18n::loadBuiltinEnglish()
strings_["seed_backup_reminder"] = "Your wallet has a 24-word recovery seed phrase. Back it up now in Settings → Node & Security.";
strings_["seed_migrate_button"] = "Migrate to seed…";
strings_["tt_seed_migrate"] = "Create a new seed-phrase wallet and move your funds into it";
// Migrate-to-seed modal
strings_["mig_title"] = "Migrate to a seed wallet";
strings_["mig_intro"] = "This creates a brand-new wallet backed by a 24-word seed phrase, in an isolated node, so you can move your funds into it. Your current wallet is NOT touched and NO funds move in this step — you'll back up the new seed first, then sweep your funds into it as a separate, confirmed step.";
strings_["mig_create"] = "Create seed wallet";
strings_["mig_working"] = "Creating your new seed wallet in an isolated node — this can take a minute. Your main wallet keeps running.";
strings_["mig_seed_warning"] = "Write these 24 words down in order and store them offline. They are the only backup of your new wallet — if you lose them, the funds you migrate are gone forever.";
strings_["mig_receive_addr"] = "New wallet receive address:";
strings_["mig_copy_seed"] = "Copy seed";
strings_["mig_backed_up"] = "I've written down my seed phrase";
strings_["mig_step1_done"] = "Step 1 of 2 complete — your funds have NOT moved yet. Sweeping them into this new wallet is the next step.";
strings_["mig_continue_sweep"] = "Continue to sweep";
strings_["mig_discard"] = "Discard migration";
strings_["mig_sweep_intro"] = "Now sweep all funds from your current wallet into the new seed wallet. This sends a single transaction to the new wallet's address; your seed phrase (already backed up) controls the funds from here on.";
strings_["mig_balance"] = "Current wallet balance: %.8f DRGX (minus a small fee)";
strings_["mig_to"] = "To: ";
strings_["mig_unlock_first"] = "Unlock your wallet first to spend from it.";
strings_["mig_sweep_all"] = "Sweep all funds";
strings_["mig_later"] = "Later";
strings_["mig_sweeping"] = "Sweeping your funds into the new wallet…";
strings_["mig_confirming"] = "Waiting for the sweep to confirm on-chain before switching wallets — this guarantees your funds have actually moved.";
strings_["mig_confs"] = "Sweep confirmations: %d";
strings_["mig_txid"] = "txid: ";
strings_["mig_remaining"] = "Remaining in old wallet: %.8f DRGX";
strings_["mig_adopt"] = "Make this my wallet";
strings_["mig_remainder"] = "Some funds are still in your old wallet (too many inputs for one transaction) — sweep the remainder before switching.";
strings_["mig_sweep_remaining"] = "Sweep remaining";
strings_["mig_waiting_mine"] = "Waiting for the sweep transaction to be mined…";
strings_["mig_adopting"] = "Installing your new wallet and rescanning…";
strings_["mig_done"] = "Migration complete. Your wallet is now backed by your seed phrase.";
strings_["mig_done_detail"] = "The daemon is rescanning to show your funds — this can take a few minutes. Your previous wallet was saved as a .bak in the data folder.";
strings_["mig_done_btn"] = "Done";
strings_["contacts_search_placeholder"] = "Search contacts...";
strings_["contacts_search_no_match"] = "No matching contacts";
strings_["address_book_confirm_delete"] = "Confirm delete?";