Commit 06d58aeb authored by Alexander Potashev's avatar Alexander Potashev
Browse files

i18n: Fix wording in dialogs, add contexts "@title:window"

Test Plan: it compiles

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D26004
parent 0aa1380e
...@@ -36,7 +36,7 @@ using namespace KSieveUi; ...@@ -36,7 +36,7 @@ using namespace KSieveUi;
AutoCreateScriptDialog::AutoCreateScriptDialog(QWidget *parent) AutoCreateScriptDialog::AutoCreateScriptDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowTitle(i18n("Create sieve filter")); setWindowTitle(i18nc("@title:window", "Create Sieve Filter"));
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
......
...@@ -233,7 +233,7 @@ SieveScriptPage *SieveScriptListBox::createNewScript(const QString &newName, con ...@@ -233,7 +233,7 @@ SieveScriptPage *SieveScriptListBox::createNewScript(const QString &newName, con
void SieveScriptListBox::slotNew() void SieveScriptListBox::slotNew()
{ {
const QString newName = QInputDialog::getText(this, i18n("New Script"), i18n("Add new name:")); const QString newName = QInputDialog::getText(this, i18nc("@title:window", "New Script"), i18n("New script name:"));
if (!newName.trimmed().isEmpty()) { if (!newName.trimmed().isEmpty()) {
createNewScript(newName); createNewScript(newName);
Q_EMIT valueChanged(); Q_EMIT valueChanged();
...@@ -244,7 +244,8 @@ void SieveScriptListBox::slotDelete() ...@@ -244,7 +244,8 @@ void SieveScriptListBox::slotDelete()
{ {
QListWidgetItem *item = mSieveListScript->currentItem(); QListWidgetItem *item = mSieveListScript->currentItem();
if (item) { if (item) {
if (KMessageBox::warningYesNo(this, i18n("Do you want to delete \"%1\" script?", item->text()), i18n("Delete script")) == KMessageBox::Yes) { if (KMessageBox::warningYesNo(this, i18n("Do you want to delete \"%1\" script?", item->text()),
i18nc("@title:window", "Delete Script")) == KMessageBox::Yes) {
SieveScriptListItem *itemScript = static_cast<SieveScriptListItem *>(item); SieveScriptListItem *itemScript = static_cast<SieveScriptListItem *>(item);
Q_EMIT removePage(itemScript->scriptPage()); Q_EMIT removePage(itemScript->scriptPage());
delete item; delete item;
...@@ -259,7 +260,7 @@ void SieveScriptListBox::slotRename() ...@@ -259,7 +260,7 @@ void SieveScriptListBox::slotRename()
{ {
QListWidgetItem *item = mSieveListScript->currentItem(); QListWidgetItem *item = mSieveListScript->currentItem();
if (item) { if (item) {
QString newName = QInputDialog::getText(this, i18n("Rename"), i18n("Add new name:"), QLineEdit::Normal, item->text()); QString newName = QInputDialog::getText(this, i18nc("@title:window", "Rename Script"), i18n("New name for the script:"), QLineEdit::Normal, item->text());
newName = newName.trimmed(); newName = newName.trimmed();
if (!newName.isEmpty()) { if (!newName.isEmpty()) {
item->setText(newName); item->setText(newName);
......
...@@ -33,7 +33,7 @@ using namespace KSieveUi; ...@@ -33,7 +33,7 @@ using namespace KSieveUi;
SieveScriptParsingErrorDialog::SieveScriptParsingErrorDialog(QWidget *parent) SieveScriptParsingErrorDialog::SieveScriptParsingErrorDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowTitle(i18n("Sieve Parsing Error")); setWindowTitle(i18nc("@title:window", "Sieve Parsing Error"));
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mTextEdit = new KPIMTextEdit::RichTextEditorWidget(this); mTextEdit = new KPIMTextEdit::RichTextEditorWidget(this);
......
...@@ -72,7 +72,7 @@ void SieveEditorAbstractWidget::slotImport() ...@@ -72,7 +72,7 @@ void SieveEditorAbstractWidget::slotImport()
} }
} }
const QString filter = i18n("*.siv;;sieve files (*.siv);;all files (*)"); const QString filter = i18n("*.siv;;sieve files (*.siv);;all files (*)");
QPointer<QFileDialog> fdlg(new QFileDialog(this, i18n("Import Script Sieve"), QString(), filter)); QPointer<QFileDialog> fdlg(new QFileDialog(this, i18nc("@title:window", "Import Script Sieve"), QString(), filter));
fdlg->setFileMode(QFileDialog::ExistingFile); fdlg->setFileMode(QFileDialog::ExistingFile);
if (fdlg->exec() == QDialog::Accepted) { if (fdlg->exec() == QDialog::Accepted) {
const QStringList fileNames = fdlg->selectedFiles(); const QStringList fileNames = fdlg->selectedFiles();
......
...@@ -38,7 +38,7 @@ using namespace KSieveUi; ...@@ -38,7 +38,7 @@ using namespace KSieveUi;
ParsingResultDialog::ParsingResultDialog(QWidget *parent) ParsingResultDialog::ParsingResultDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowTitle(i18n("Sieve Parsing")); setWindowTitle(i18nc("@title:window", "Sieve Parsing"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
......
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