feat(i18n,errors): route node-action toasts through i18n + friendlyRpcError
Finish the error-surfacing foundation across app_network.cpp (+ one in app_wizard.cpp): ~21 toasts that were hardcoded English — or raw daemon/RPC error text concatenated after an English prefix — now go through TR() keys, and every raw-error one maps the detail through util::friendlyRpcError() (warming up / locked / method-not-found / insufficient / unreachable → plain guidance, raw text as fallback). Covers mining start/stop, pool start, peer ban/unban/ clear, key export, rescan, wallet-switch guards, and the lite-unavailable notices. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1919,6 +1919,31 @@ void I18n::loadBuiltinEnglish()
|
||||
strings_["err_insufficient"] = "Not enough spendable balance to cover the amount and fee.";
|
||||
strings_["err_cant_reach"] = "Can't reach the node. Check that it's running and try again.";
|
||||
strings_["err_generic"] = "Something went wrong. Please try again.";
|
||||
// Node/wallet action toasts (were hardcoded English in app_network.cpp). The *_failed keys are
|
||||
// prefixes: the code appends a friendlyRpcError() detail after them.
|
||||
strings_["toast_lite_lifecycle_unavailable"] = "Full-node actions aren't available in the lite wallet.";
|
||||
strings_["toast_wallet_already_open"] = "That wallet is already open.";
|
||||
strings_["toast_node_busy_restarting"] = "The node is busy restarting — try again in a moment.";
|
||||
strings_["toast_rescan_in_progress"] = "A rescan or repair is in progress — try again once it finishes.";
|
||||
strings_["toast_finish_migration_first"] = "Finish or cancel the seed migration before switching wallets.";
|
||||
strings_["toast_switch_needs_embedded"] = "Switching wallets needs the embedded node — stop any external dragonxd first.";
|
||||
strings_["toast_finish_send_first"] = "Finish or cancel the pending send before switching wallets.";
|
||||
strings_["toast_rescan_complete"] = "Blockchain rescan complete.";
|
||||
strings_["toast_rescan_from_fmt"] = "Rescanning the blockchain from block %d — this can take a while.";
|
||||
strings_["toast_solo_unavailable_lite"] = "Solo mining isn't available in the lite wallet.";
|
||||
strings_["toast_pool_unavailable"] = "Pool mining isn't available in this build.";
|
||||
strings_["toast_no_address_generate_z"] = "No wallet address yet — generate a shielded (Z) address in the Receive tab.";
|
||||
strings_["toast_pool_connecting"] = "Starting pool miner — connecting to the pool…";
|
||||
strings_["toast_not_connected_daemon"] = "Not connected to the node.";
|
||||
strings_["toast_mining_failed"] = "Couldn't start mining: ";
|
||||
strings_["toast_stop_mining_failed"] = "Couldn't stop mining: ";
|
||||
strings_["toast_pool_start_failed"] = "Couldn't start the pool miner: ";
|
||||
strings_["toast_ban_failed"] = "Couldn't ban the peer: ";
|
||||
strings_["toast_unban_failed"] = "Couldn't unban the peer: ";
|
||||
strings_["toast_clear_bans_failed"] = "Couldn't clear bans: ";
|
||||
strings_["toast_key_export_failed"] = "Key export failed: ";
|
||||
strings_["toast_rescan_failed"] = "Rescan failed: ";
|
||||
strings_["toast_wizard_lite_unavailable"] = "Wallet setup actions aren't available in the lite wallet (see Settings for readiness checks).";
|
||||
strings_["console_capturing_output"] = "Capturing daemon output...";
|
||||
strings_["console_clear"] = "Clear";
|
||||
strings_["console_clear_console"] = "Clear Console";
|
||||
|
||||
Reference in New Issue
Block a user