aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarol Rodriguez <jarolrod@tutanota.com>2022-06-29 20:02:02 -0400
committerJarol Rodriguez <jarolrod@tutanota.com>2022-06-29 20:02:02 -0400
commitd5c141f221d67aaeee989da0db0ac5383d7562d3 (patch)
treed4668b4ba135ee7920d36b4417dc01ecf53dca38 /src
parent5bc10b39abbcb77638161902ccd1225139bc7cc0 (diff)
downloadbitcoin-d5c141f221d67aaeee989da0db0ac5383d7562d3.tar.xz
qt: apply translator comments to reset options confirmation dialog
Follow-up to #617. This applies translator strings to the reset options confirmation dialog and also refactors the way we pass the strings to the dialog in order to allow the comments to be applied. Because the strings were being concatenated, we can not apply translator comments to all of the relevant strings. What we want to do instead is have a variable in which the translatable strings are appended to using the QString append function. This satisfies the Qt translator engine and the comments are then properly applied within the `extracomment` field in the translation file.
Diffstat (limited to 'src')
-rw-r--r--src/qt/optionsdialog.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 462b923d61..42c8b07763 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -286,11 +286,19 @@ void OptionsDialog::on_resetButton_clicked()
{
if (model) {
// confirmation dialog
+ /*: Text explaining that the settings changed will not come into effect
+ until the client is restarted. */
+ QString reset_dialog_text = tr("Client restart required to activate changes.") + "<br><br>";
+ /*: Text explaining to the user that the client's current settings
+ will be backed up at a specific location. %1 is a stand-in
+ argument for the backup location's path. */
+ reset_dialog_text.append(tr("Current settings will be backed up at \"%1\".").arg(m_client_model->dataDir()) + "<br><br>");
+ /*: Text asking the user to confirm if they would like to proceed
+ with a client shutdown. */
+ reset_dialog_text.append(tr("Client will be shut down. Do you want to proceed?"));
+ //: Window title text of pop-up window shown when the user has chosen to reset options.
QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
- tr("Client restart required to activate changes.") + "<br><br>" +
- tr("Current settings will be backed up at \"%1\".").arg(m_client_model->dataDir()) + "<br><br>" +
- tr("Client will be shut down. Do you want to proceed?"),
- QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+ reset_dialog_text, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
if (btnRetVal == QMessageBox::Cancel)
return;