Commit 4d635d9a authored by Albert Astals Cid's avatar Albert Astals Cid
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
parent e5cf0f21
Pipeline #108179 passed with stage
in 1 minute and 57 seconds
......@@ -153,10 +153,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);
int result = QMessageBox::warning(this, i18n("Remove SSH Configurations"), dialogMessage, QMessageBox::Ok, QMessageBox::Cancel);
......
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