aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-31 23:41:04 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-31 23:43:58 +0300
commitaedf71dcc54f56ba8ba93274add2f40ed26cafd4 (patch)
treec9bc40348d4fe824658fcd276e824955684af261 /src/qt
parent933c6466c2bda3a06d3c5da0de0d8f05111c9f4c (diff)
parent0f3d955a38fe59a4e8cc4bf9f4442e6e1fd8bcbb (diff)
downloadbitcoin-aedf71dcc54f56ba8ba93274add2f40ed26cafd4.tar.xz
Merge bitcoin-core/gui#331: Make RPC console welcome message translation-friendly
0f3d955a38fe59a4e8cc4bf9f4442e6e1fd8bcbb qt: Make RPC console welcome message translation-friendly (Hennadii Stepanov) Pull request description: The best practice is do not split a translatable multi-line message into single lines. This helps translators to follow the context. ACKs for top commit: jarolrod: re-ACK 0f3d955a38fe59a4e8cc4bf9f4442e6e1fd8bcbb Tree-SHA512: 30911ff3a972a7787804bb8b27d0b77bfff15939bb478c199261866bfb55d9acd12ab4d44b8b9fc1d4898222cabc4007cc897f9b65728924d121f31e914c44ac
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/rpcconsole.cpp40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 83a111e9c8..47feb11b29 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -816,23 +816,29 @@ void RPCConsole::clear(bool keep_prompt)
).arg(fixedFontInfo.family(), QString("%1pt").arg(consoleFontSize))
);
- message(CMD_REPLY,
- tr("Welcome to the %1 RPC console.").arg(PACKAGE_NAME) +
- "<br>" +
- tr("Use up and down arrows to navigate history, and %1 to clear screen.")
- .arg("<b>" + ui->clearButton->shortcut().toString(QKeySequence::NativeText) + "</b>") +
- "<br>" +
- tr("Use %1 and %2 to increase or decrease the font size.")
- .arg("<b>" + ui->fontBiggerButton->shortcut().toString(QKeySequence::NativeText) + "</b>")
- .arg("<b>" + ui->fontSmallerButton->shortcut().toString(QKeySequence::NativeText) + "</b>") +
- "<br>" +
- tr("Type %1 for an overview of available commands.").arg("<b>help</b>") +
- "<br>" +
- tr("For more information on using this console type %1.").arg("<b>help-console</b>") +
- "<br><span class=\"secwarning\"><br>" +
- tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") +
- "</span>",
- true);
+ static const QString welcome_message =
+ /*: RPC console welcome message.
+ Placeholders %7 and %8 are style tags for the warning content, and
+ they are not space separated from the rest of the text intentionally. */
+ tr("Welcome to the %1 RPC console.\n"
+ "Use up and down arrows to navigate history, and %2 to clear screen.\n"
+ "Use %3 and %4 to increase or decrease the font size.\n"
+ "Type %5 for an overview of available commands.\n"
+ "For more information on using this console, type %6.\n"
+ "\n"
+ "%7WARNING: Scammers have been active, telling users to type"
+ " commands here, stealing their wallet contents. Do not use this console"
+ " without fully understanding the ramifications of a command.%8")
+ .arg(PACKAGE_NAME,
+ "<b>" + ui->clearButton->shortcut().toString(QKeySequence::NativeText) + "</b>",
+ "<b>" + ui->fontBiggerButton->shortcut().toString(QKeySequence::NativeText) + "</b>",
+ "<b>" + ui->fontSmallerButton->shortcut().toString(QKeySequence::NativeText) + "</b>",
+ "<b>help</b>",
+ "<b>help-console</b>",
+ "<span class=\"secwarning\">",
+ "<span>");
+
+ message(CMD_REPLY, welcome_message, true);
}
void RPCConsole::keyPressEvent(QKeyEvent *event)