Commit 82b450ca authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Kurt Hindenburg
Browse files

SSHManager: Fix two i18n problems

 * When using i18n you don't .arg(), the parameter goes inside the i18n
   call
 * xgettext doesn't seem to be able to parse the ternary operator inside
   the i18n call so put it outside, otherwise the second string is not
   extracted for translation

(cherry picked from commit 4d635d9a)
parent 153de991
Pipeline #108184 passed with stage
in 2 minutes and 3 seconds
......@@ -188,10 +188,10 @@ void SSHManagerTreeWidget::triggerRemove()
return;
}
const QString dialogMessage =
i18n(ui->treeView->model()->rowCount(selection.at(0)) ? "You are about to remove the folder %1,\n with multiple SSH Configurations, are you sure?"
: "You are about to remove %1, are you sure?")
.arg(selection.at(0).data(Qt::DisplayRole).toString());
const QString text = selection.at(0).data(Qt::DisplayRole).toString();
const QString dialogMessage = ui->treeView->model()->rowCount(selection.at(0))
? i18n("You are about to remove the folder %1,\n with multiple SSH Configurations, are you sure?", text)
: i18n("You are about to remove %1, are you sure?", text);
const QString dontAskAgainKey =
ui->treeView->model()->rowCount(selection.at(0)) ? QStringLiteral("remove_ssh_folder") : QStringLiteral("remove_ssh_config");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment