fix(console): localize the lite console + drop full-node-only wording
The lite console tab lagged the full-node one on i18n: its toolbar status, status lines, help, and error/warning strings were hard-coded English or worded for a full node (a "daemon" the lite wallet doesn't have). - toolbarStatus()/statusLines(): route through TR() (reusing the existing lite_net_* keys where they already map) - printHelp(): enumerate the 25 pass-through backend verbs for discoverability, since the C++ tab intercepts `help` before the backend's own HelpCommand runs - gate the destructive 'stop' confirmation to the full node (hasRpcReference); lite has no node, so it lets 'stop' fall through to the backend instead of showing a phantom "shut down the node" warning behind a dead gate - word the not-connected error per variant (daemon vs "no wallet open") - TR() the "(no output)" command-result fallback Adds 7 i18n keys across all 8 languages (additive); rebuilds the CJK subset for the one new glyph (U+C5D4 for the Korean "backend"). Build + ctest + source-hygiene green; changes adversarially verified (no logic/i18n defects). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1434,18 +1434,22 @@ bool ConsoleTab::submitConsoleCommand(ConsoleCommandExecutor& exec, const std::s
|
||||
exec.printHelp(add);
|
||||
} else if (first == "quit" || first == "exit") {
|
||||
addLine(TR("console_quit_note"), ConsoleChannel::Info);
|
||||
} else if (first == "stop") {
|
||||
} else if (first == "stop" && exec.hasRpcReference()) {
|
||||
// Full-node 'stop' shuts down the daemon (destructive) — gate behind a confirming second
|
||||
// 'stop'. Lite has no node: `stop` isn't a backend verb, so it falls through below and the
|
||||
// backend reports it as unknown — no misleading "shut down the node" warning or dead gate.
|
||||
if (!stop_confirm_pending_) {
|
||||
stop_confirm_pending_ = true;
|
||||
addLine("'stop' will shut down the node and disconnect the wallet. Type 'stop' again to confirm.",
|
||||
ConsoleChannel::Warning);
|
||||
addLine(TR("console_stop_confirm_node"), ConsoleChannel::Warning);
|
||||
} else {
|
||||
stop_confirm_pending_ = false;
|
||||
if (!exec.isReady()) addLine(TR("console_not_connected"), ConsoleChannel::Error);
|
||||
else exec.submit(cmd);
|
||||
}
|
||||
} else if (!exec.isReady()) {
|
||||
addLine(TR("console_not_connected"), ConsoleChannel::Error);
|
||||
// Full node connects to a daemon; the lite backend opens a wallet — word the error per variant.
|
||||
addLine(exec.hasRpcReference() ? TR("console_not_connected") : TR("console_not_connected_lite"),
|
||||
ConsoleChannel::Error);
|
||||
} else {
|
||||
exec.submit(cmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user