diff --git a/app/indicator/factory.cpp b/app/indicator/factory.cpp
index 68745fdcb..5eaf9e27d 100644
--- a/app/indicator/factory.cpp
+++ b/app/indicator/factory.cpp
@@ -283,8 +283,8 @@ Latte::ImportExport::State Factory::importIndicatorFile(QString compressedFile)
auto showNotificationSucceed = [](QString name, bool updated) {
auto notification = new KNotification("import-done", KNotification::CloseOnTimeout);
- notification->setText(updated ? i18nc("indicator_name, imported updated","%0 indicator updated successfully").arg(name) :
- i18nc("indicator_name, imported success","%0 indicator installed successfully").arg(name));
+ notification->setText(updated ? i18nc("indicator_name, imported updated","%0 indicator updated successfully", name) :
+ i18nc("indicator_name, imported success","%0 indicator installed successfully", name));
notification->sendEvent();
};
@@ -373,7 +373,7 @@ void Factory::removeIndicator(QString id)
KMessageBox::createKMessageBox(dialog,
buttonbox,
QMessageBox::Question,
- i18n("Do you want to remove completely %0 indicator from your system?").arg(pluginName),
+ i18n("Do you want to remove completely %0 indicator from your system?", pluginName),
QStringList(),
QString(),
0,
@@ -383,7 +383,7 @@ void Factory::removeIndicator(QString id)
connect(buttonbox, &QDialogButtonBox::accepted, [&, id, pluginName]() {
auto showRemovedSucceed = [](QString name) {
auto notification = new KNotification("remove-done", KNotification::CloseOnTimeout);
- notification->setText(i18nc("indicator_name, removed success","%0 indicator removed successfully").arg(name));
+ notification->setText(i18nc("indicator_name, removed success","%0 indicator removed successfully", name));
notification->sendEvent();
};
diff --git a/app/layouts/manager.cpp b/app/layouts/manager.cpp
index f4250fa2e..0a7a64a31 100644
--- a/app/layouts/manager.cpp
+++ b/app/layouts/manager.cpp
@@ -221,7 +221,8 @@ void Manager::loadLayoutOnStartup(QString layoutName)
KMessageBox::createKMessageBox(dialog,
buttonbox,
QMessageBox::Warning,
- i18n("Multiple Layouts based on Activities mode did not close properly during the last session.
The following layout(s) [ %0 ] had to be updated for consistency!").arg(layouts.join(",")),
+ i18n("Multiple Layouts based on Activities mode did not close properly during the last session.
The following layout(s) [ %0 ] had to be updated for consistency!",
+ layouts.join(",")),
QStringList(),
QString(),
0,
diff --git a/app/layouts/synchronizer.cpp b/app/layouts/synchronizer.cpp
index cdd7d7c95..3ac4721a0 100644
--- a/app/layouts/synchronizer.cpp
+++ b/app/layouts/synchronizer.cpp
@@ -474,7 +474,7 @@ void Synchronizer::hideAllViews()
void Synchronizer::pauseLayout(QString layoutName)
{
- if (m_manager->memoryUsage() == MemoryUsage::MultipleLayouts) {
+ if (m_manager->memoryUsage() == MemoryUsage::MultipleLayouts) {
CentralLayout *layout = centralLayout(layoutName);
if (layout->isOnAllActivities()) {
@@ -928,11 +928,12 @@ void Synchronizer::syncMultipleLayoutsToActivities()
}
if (m_manager->corona()->universalSettings()->showInfoWindow()) {
- if (newlyActivatedLayouts.count() == 1) {
- m_manager->showInfoWindow(i18n("Activating layout: %0 ...").arg(newlyActivatedLayouts[0]), 4000, QStringList(Data::Layout::ALLACTIVITIESID));
- } else if (newlyActivatedLayouts.count() > 1) {
- m_manager->showInfoWindow(i18n("Activating layouts: %0 ...").arg(newlyActivatedLayouts.join(", ")), 4000, QStringList(Data::Layout::ALLACTIVITIESID));
- }
+ m_manager->showInfoWindow(i18np("Activating layout: %2 ...",
+ "Activating layouts: %3 ...",
+ newlyActivatedLayouts.count(),
+ newlyActivatedLayouts[0],
+ newlyActivatedLayouts.join(", ")),
+ 4000, QStringList(Data::Layout::ALLACTIVITIESID));
}
//! Unload no needed Layouts
diff --git a/app/settings/detailsdialog/detailshandler.cpp b/app/settings/detailsdialog/detailshandler.cpp
index 92a5cce95..d96d67657 100644
--- a/app/settings/detailsdialog/detailshandler.cpp
+++ b/app/settings/detailsdialog/detailshandler.cpp
@@ -420,14 +420,14 @@ void DetailsHandler::selectTextColor()
void DetailsHandler::updateWindowTitle()
{
- m_dialog->setWindowTitle(i18nc(" Details","%0 Details").arg(m_ui->layoutsCmb->currentText()));
+ m_dialog->setWindowTitle(i18nc(" Details","%0 Details", m_ui->layoutsCmb->currentText()));
}
KMessageBox::ButtonCode DetailsHandler::saveChangesConfirmation()
{
if (hasChangedData()) {
QString layoutName = c_data.name;
- QString saveChangesText = i18n("The settings of %0 layout have changed.
Do you want to apply the changes or discard them?").arg(layoutName);
+ QString saveChangesText = i18n("The settings of %0 layout have changed.
Do you want to apply the changes or discard them?", layoutName);
return m_dialog->saveChangesConfirmation(saveChangesText);
}
diff --git a/app/settings/exporttemplatedialog/exporttemplatehandler.cpp b/app/settings/exporttemplatedialog/exporttemplatehandler.cpp
index 9a2b8ede2..949a27359 100644
--- a/app/settings/exporttemplatedialog/exporttemplatehandler.cpp
+++ b/app/settings/exporttemplatedialog/exporttemplatehandler.cpp
@@ -178,7 +178,7 @@ void ExportTemplateHandler::chooseFileDialog()
if (!file.endsWith(".layout.latte")) {
QString selected = file;
selected = selected.replace(QDir::homePath(), "~");
- showInlineMessage(i18n("%0 does not end with .layout.latte extension. Selected file rejected.").arg(selected),
+ showInlineMessage(i18n("%0 does not end with .layout.latte extension. Selected file rejected.", selected),
KMessageWidget::Error,
true);
} else {
@@ -188,7 +188,7 @@ void ExportTemplateHandler::chooseFileDialog()
if (!file.endsWith(".view.latte")) {
QString selected = file;
selected = selected.replace(QDir::homePath(), "~");
- showInlineMessage(i18n("%0 does not end with .view.latte extension. Selected file rejected.").arg(selected),
+ showInlineMessage(i18n("%0 does not end with .view.latte extension. Selected file rejected.", selected),
KMessageWidget::Error,
true);
} else {
@@ -215,7 +215,7 @@ void ExportTemplateHandler::onExport()
//! Proceed with export
auto showExportTemplateError = [this](const QString &templateName) {
- showInlineMessage(i18nc("settings:template export fail","Template %0 export failed...").arg(templateName),
+ showInlineMessage(i18nc("settings:template export fail","Template %0 export failed...", templateName),
KMessageWidget::Error,
true);
};
@@ -247,7 +247,7 @@ void ExportTemplateHandler::onExport()
}
});
- showInlineMessage(i18nc("settings:template export success","Template %0 export succeeded...").arg(curbasename),
+ showInlineMessage(i18nc("settings:template export success","Template %0 export succeeded...", curbasename),
KMessageWidget::Positive,
false,
actions);
@@ -309,7 +309,7 @@ void ExportTemplateHandler::save()
bool ExportTemplateHandler::overwriteConfirmation(const QString &fileName)
{
return (KMessageBox::warningYesNo(m_dialog,
- i18n("The file \"%0\" already exists. Do you wish to overwrite it?").arg(fileName),
+ i18n("The file \"%0\" already exists. Do you wish to overwrite it?", fileName),
i18n("Overwrite File?"),
KStandardGuiItem::overwrite(),
KStandardGuiItem::cancel()) == KMessageBox::Yes);
diff --git a/app/settings/settingsdialog/layoutscontroller.cpp b/app/settings/settingsdialog/layoutscontroller.cpp
index c6cbc89c9..2eae07ad0 100644
--- a/app/settings/settingsdialog/layoutscontroller.cpp
+++ b/app/settings/settingsdialog/layoutscontroller.cpp
@@ -535,9 +535,10 @@ void Layouts::initialMessageForErroredLayouts(const int &count)
}
m_handler->showInlineMessage(i18ncp("settings:counted layout with errors",
- "Error: There is 1 layout that has reported errors.",
- "Error: There are %0 layouts that have reported errors.",
- count).arg(count),
+ "Error: There is 1 layout that has reported errors.",
+ "Error: There are %0 layouts that have reported errors.",
+ count,
+ count),
KMessageWidget::Error);
}
@@ -548,9 +549,9 @@ void Layouts::initialMessageForWarningLayouts(const int &count)
}
m_handler->showInlineMessage(i18ncp("settings:counted layout with warnings",
- "Warning: There is 1 layout that has reported warnings.",
- "Warning: There are %0 layouts that have reported warnings.",
- count).arg(count),
+ "Warning: There is 1 layout that has reported warnings.",
+ "Warning: There are %1 layouts that have reported warnings.",
+ count),
KMessageWidget::Warning);
}
@@ -576,21 +577,28 @@ void Layouts::messageForErroredLayout(const Data::Layout &layout)
if (!layout.hasErrors() && layout.hasWarnings()) {
//! add only warnings first
m_handler->showInlineMessage(i18nc("settings:layout with warnings",
- "Warning: %0 layout has reported %1 warning(s) that need your attention.").arg(layout.name).arg(layout.warnings),
+ "Warning: %0 layout has reported %1 warning(s) that need your attention.",
+ layout.name,
+ layout.warnings),
KMessageWidget::Warning,
false,
actions);
} else if (layout.hasErrors() && !layout.hasWarnings()) {
//! add errors in the end in order to be read by the user
m_handler->showInlineMessage(i18nc("settings:layout with errors",
- "Error: %0 layout has reported %1 error(s) that you need to repair.").arg(layout.name).arg(layout.errors),
+ "Error: %0 layout has reported %1 error(s) that you need to repair.",
+ layout.name,
+ layout.errors),
KMessageWidget::Error,
true,
actions);
} else if (layout.hasErrors() && layout.hasWarnings()) {
//! add most important errors in the end in order to be read by the user
m_handler->showInlineMessage(i18nc("settings:layout with errors and warnings",
- "Error: %0 layout has reported %1 error(s) and %2 warning(s) that you need to repair.").arg(layout.name).arg(layout.errors).arg(layout.warnings),
+ "Error: %0 layout has reported %1 error(s) and %2 warning(s) that you need to repair.",
+ layout.name,
+ layout.errors,
+ layout.warnings),
KMessageWidget::Error,
true,
actions);
@@ -813,10 +821,10 @@ bool Layouts::importLayoutsFromV1ConfigFile(QString file)
if (importedlayouts.count() > 0) {
if (importedlayouts.count() == 1) {
- m_handler->showInlineMessage(i18n("Layout %0 imported successfully...").arg(importedlayouts[0]),
+ m_handler->showInlineMessage(i18n("Layout %0 imported successfully...", importedlayouts[0]),
KMessageWidget::Positive);
} else {
- m_handler->showInlineMessage(i18n("Layouts %0 imported successfully...").arg(importedlayouts.join(",")),
+ m_handler->showInlineMessage(i18n("Layouts %0 imported successfully...", importedlayouts.join(",")),
KMessageWidget::Positive);
}
@@ -1024,7 +1032,7 @@ void Layouts::onNameDuplicatedFrom(const QString &provenId, const QString &trial
int originalRow = m_model->rowForId(provenId);
Latte::Data::Layout provenLayout = m_model->at(originalRow);
- m_handler->showInlineMessage(i18nc("settings: layout name used","Layout %0 is already used, please provide a different name...").arg(provenLayout.name),
+ m_handler->showInlineMessage(i18nc("settings: layout name used","Layout %0 is already used, please provide a different name...", provenLayout.name),
KMessageWidget::Error);
QModelIndex tIndex = m_proxyModel->index(tRow, Model::Layouts::NAMECOLUMN);
diff --git a/app/settings/settingsdialog/settingsdialog.cpp b/app/settings/settingsdialog/settingsdialog.cpp
index 259b37477..e7f882a0b 100644
--- a/app/settings/settingsdialog/settingsdialog.cpp
+++ b/app/settings/settingsdialog/settingsdialog.cpp
@@ -479,7 +479,7 @@ bool SettingsDialog::saveChanges()
|| (m_acceptedPage == PreferencesPage && m_tabPreferencesHandler->hasChangedData())) {
QString tabName = m_ui->tabWidget->tabBar()->tabText(m_acceptedPage).remove("&");
- QString saveChangesText = i18n("The settings of %0 tab have changed.
Do you want to apply the changes or discard them?").arg(tabName);
+ QString saveChangesText = i18n("The settings of %0 tab have changed.
Do you want to apply the changes or discard them?", tabName);
KMessageBox::ButtonCode result = saveChangesConfirmation(saveChangesText);
diff --git a/app/settings/settingsdialog/tablayoutshandler.cpp b/app/settings/settingsdialog/tablayoutshandler.cpp
index 8db8c35cf..e77158f7c 100644
--- a/app/settings/settingsdialog/tablayoutshandler.cpp
+++ b/app/settings/settingsdialog/tablayoutshandler.cpp
@@ -379,7 +379,7 @@ void TabLayouts::switchLayout()
}
m_layoutsController->setOriginalInMultipleMode(false);
- m_corona->layoutsManager()->switchToLayout(selectedLayoutOriginal.name, MemoryUsage::SingleLayout);
+ m_corona->layoutsManager()->switchToLayout(selectedLayoutOriginal.name, MemoryUsage::SingleLayout);
updatePerLayoutButtonsState();
}
@@ -449,7 +449,7 @@ void TabLayouts::newLayout(const QString &templateName)
Data::Layout newlayout = m_layoutsController->addLayoutForFile(tdata.id, tdata.name, true);
if (newlayout.errors == 0 && newlayout.warnings == 0) {
- showInlineMessage(i18nc("settings:layout added successfully","Layout %0 added successfully...").arg(newlayout.name),
+ showInlineMessage(i18nc("settings:layout added successfully","Layout %0 added successfully...", newlayout.name),
KMessageWidget::Positive);
}
}
@@ -485,7 +485,7 @@ void TabLayouts::downloadLayout()
if (version == Latte::Layouts::Importer::LayoutVersion2) {
Latte::Data::Layout downloaded = m_layoutsController->addLayoutForFile(entryFile);
- showInlineMessage(i18nc("settings:layout downloaded successfully","Layout %0 downloaded successfully...").arg(downloaded.name),
+ showInlineMessage(i18nc("settings:layout downloaded successfully","Layout %0 downloaded successfully...", downloaded.name),
KMessageWidget::Positive);
break;
}
@@ -569,7 +569,7 @@ void TabLayouts::importLayout()
if (version == Latte::Layouts::Importer::LayoutVersion2) {
Latte::Data::Layout importedlayout = m_layoutsController->addLayoutForFile(file);
- showInlineMessage(i18nc("settings:layout imported successfully","Layout %0 imported successfully...").arg(importedlayout.name),
+ showInlineMessage(i18nc("settings:layout imported successfully","Layout %0 imported successfully...", importedlayout.name),
KMessageWidget::Positive);
} else if (version == Latte::Layouts::Importer::ConfigVersion1) {
if (!m_layoutsController->importLayoutsFromV1ConfigFile(file)) {
@@ -638,7 +638,7 @@ void TabLayouts::exportLayoutForBackup()
connect(exportFileDialog, &QFileDialog::fileSelected, this, [ &, selectedLayout](const QString & file) {
auto showExportLayoutError = [this](const Latte::Data::Layout &layout) {
- showInlineMessage(i18nc("settings:layout export fail","Layout %0 export failed...").arg(layout.name),
+ showInlineMessage(i18nc("settings:layout export fail","Layout %0 export failed...", layout.name),
KMessageWidget::Error,
true);
};
@@ -677,7 +677,7 @@ void TabLayouts::exportLayoutForBackup()
}
});
- showInlineMessage(i18nc("settings:layout export success","Layout %0 export succeeded...").arg(selectedLayout.name),
+ showInlineMessage(i18nc("settings:layout export success","Layout %0 export succeeded...", selectedLayout.name),
KMessageWidget::Positive,
false,
actions);
@@ -768,19 +768,19 @@ void TabLayouts::onLayoutFilesDropped(const QStringList &paths)
}
}
- if (layoutNames.count() == 1) {
- showInlineMessage(i18nc("settings:layout imported successfully","Layout %0 imported successfully...").arg(layoutNames[0]),
- KMessageWidget::Positive);
- } else if (layoutNames.count() > 1) {
- showInlineMessage(i18nc("settings:layouts imported successfully","Layouts %0 imported successfully...").arg(layoutNames.join(", )")),
- KMessageWidget::Positive);
- }
+ showInlineMessage(i18ncp("settings:layout imported successfully",
+ "Layout %2 imported successfully...",
+ "Layouts %3 imported successfully...",
+ layoutNames.count(),
+ layoutNames[0],
+ layoutNames.join(", ")),
+ KMessageWidget::Positive);
}
void TabLayouts::onRawLayoutDropped(const QString &rawLayout)
{
Latte::Data::Layout importedlayout = m_layoutsController->addLayoutByText(rawLayout);
- showInlineMessage(i18nc("settings:layout imported successfully","Layout %0 imported successfully...").arg(importedlayout.name),
+ showInlineMessage(i18nc("settings:layout imported successfully","Layout %0 imported successfully...", importedlayout.name),
KMessageWidget::Positive);
}
diff --git a/app/settings/viewsdialog/viewscontroller.cpp b/app/settings/viewsdialog/viewscontroller.cpp
index 90534620f..ec1d59254 100644
--- a/app/settings/viewsdialog/viewscontroller.cpp
+++ b/app/settings/viewsdialog/viewscontroller.cpp
@@ -683,7 +683,7 @@ void Views::messageForErrorAppletsWithSameId(const Data::Error &error)
}
//! construct message
- QString message = i18nc("error id and title", "Error #%0: %1
").arg(error.id).arg(error.name);
+ QString message = i18nc("error id and title", "Error #%0: %1
",error.id, error.name);
message += "
";
message += i18n("In your layout there are two or more applets with same id. Such situation can create crashes, abnormal behavior and data loss when you activate and use this layout.
");
@@ -696,7 +696,11 @@ void Views::messageForErrorAppletsWithSameId(const Data::Error &error)
QString containmentname = viewname.isEmpty() ? error.information[i].containment.visibleName() : viewname;
QString containmentstorageid = error.information[i].containment.storageId;
message += i18nc("applets with same id error, applet name, applet id, containment name, containment id",
- " • %0 [#%1] inside %2 [#%3]
").arg(appletname).arg(appletstorageid).arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1] inside %2 [#%3]
",
+ appletname,
+ appletstorageid,
+ containmentname,
+ containmentstorageid);
}
message += "
";
@@ -716,7 +720,7 @@ void Views::messageForErrorOrphanedParentAppletOfSubContainment(const Data::Erro
}
//! construct message
- QString message = i18nc("error id and title", "Error #%0: %1
").arg(error.id).arg(error.name);
+ QString message = i18nc("error id and title", "Error #%0: %1
", error.id, error.name);
message += i18n("In your layout there are orphaned pseudo applets that link to unexistent subcontainments. Such case is for example a systemtray that has lost connection with its child applets. Such situation can create crashes, abnormal behavior and data loss when you activate and use this layout.
");
message += "
";
@@ -732,7 +736,11 @@ void Views::messageForErrorOrphanedParentAppletOfSubContainment(const Data::Erro
QString containmentname = viewname.isEmpty() ? error.information[i].containment.visibleName() : viewname;
QString containmentstorageid = error.information[i].containment.storageId;
message += i18nc("orphaned pseudo applets, applet name, applet id, containment name, containment id",
- " • %0 [#%1] inside %2 [#%3]
").arg(appletname).arg(appletstorageid).arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1] inside %2 [#%3]
",
+ appletname,
+ appletstorageid,
+ containmentname,
+ containmentstorageid);
}
message += "
";
@@ -746,7 +754,9 @@ void Views::messageForErrorOrphanedParentAppletOfSubContainment(const Data::Erro
QString containmentname = viewname.isEmpty() ? error.information[i].containment.visibleName() : viewname;
QString containmentstorageid = error.information[i].containment.storageId;
message += i18nc("orphaned subcontainments, containment name, containment id",
- " • %0 [#%1]
").arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1]
",
+ containmentname,
+ containmentstorageid);
}
message += "
";
@@ -765,7 +775,7 @@ void Views::messageForWarningAppletAndContainmentWithSameId(const Data::Warning
}
//! construct message
- QString message = i18nc("warning id and title", "Warning #%0: %1
").arg(warning.id).arg(warning.name);
+ QString message = i18nc("warning id and title", "Warning #%0: %1
", warning.id, warning.name);
message += i18n("In your layout there are applets and containments with the same id. Such situation is not dangerous but it should not occur.
");
message += "
";
@@ -781,7 +791,11 @@ void Views::messageForWarningAppletAndContainmentWithSameId(const Data::Warning
QString containmentname = viewname.isEmpty() ? warning.information[i].containment.visibleName() : viewname;
QString containmentstorageid = warning.information[i].containment.storageId;
message += i18nc("applets, applet name, applet id, containment name, containment id",
- " • %0 [#%1] inside %2 [#%3]
").arg(appletname).arg(appletstorageid).arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1] inside %2 [#%3]
",
+ appletname,
+ appletstorageid,
+ containmentname,
+ containmentstorageid);
}
message += "
";
@@ -795,7 +809,9 @@ void Views::messageForWarningAppletAndContainmentWithSameId(const Data::Warning
QString containmentname = viewname.isEmpty() ? warning.information[i].containment.visibleName() : viewname;
QString containmentstorageid = warning.information[i].containment.storageId;
message += i18nc("containments, containment name, containment id",
- " • %0 [#%1]
").arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1]
",
+ containmentname,
+ containmentstorageid);
}
message += "
";
@@ -816,7 +832,7 @@ void Views::messageForWarningOrphanedSubContainments(const Data::Warning &warnin
QList orphaned;
//! construct message
- QString message = i18nc("warning id and title", "Warning #%0: %1
").arg(warning.id).arg(warning.name);
+ QString message = i18nc("warning id and title", "Warning #%0: %1
", warning.id, warning.name);
message += i18n("In your layout there are orphaned subcontainments that are not used by any dock or panel. Such situation is not dangerous but it is advised to remove them in order to reduce memory usage.
");
message += "
";
@@ -830,7 +846,9 @@ void Views::messageForWarningOrphanedSubContainments(const Data::Warning &warnin
QString containmentname = viewname.isEmpty() ? warning.information[i].containment.visibleName() : viewname;
QString containmentstorageid = warning.information[i].containment.storageId;
message += i18nc("orphaned subcontainments, containment name, containment id",
- " • %0 [#%1]
").arg(containmentname).arg(containmentstorageid);
+ " • %0 [#%1]
",
+ containmentname,
+ containmentstorageid);
orphaned << warning.information[i].containment.storageId.toInt();
}
diff --git a/app/settings/viewsdialog/viewshandler.cpp b/app/settings/viewsdialog/viewshandler.cpp
index 49b8e82bf..581a9ff10 100644
--- a/app/settings/viewsdialog/viewshandler.cpp
+++ b/app/settings/viewsdialog/viewshandler.cpp
@@ -292,7 +292,7 @@ void ViewsHandler::newView(const Data::Generic &templateData)
viewfromtemplate.name = templateData.name;
Data::View newview = m_viewsController->appendViewFromViewTemplate(viewfromtemplate);
- showInlineMessage(i18nc("settings:dock/panel added successfully","%0 added successfully...").arg(newview.name),
+ showInlineMessage(i18nc("settings:dock/panel added successfully","%0 added successfully...", newview.name),
KMessageWidget::Positive);
}
}
@@ -416,7 +416,7 @@ void ViewsHandler::onCurrentLayoutIndexChanged(int row)
void ViewsHandler::updateWindowTitle()
{
- m_dialog->setWindowTitle(i18nc(" Docks/Panels","%0 Docks/Panels").arg(m_ui->layoutsCmb->currentText()));
+ m_dialog->setWindowTitle(i18nc(" Docks/Panels","%0 Docks/Panels", m_ui->layoutsCmb->currentText()));
}
KMessageBox::ButtonCode ViewsHandler::removalConfirmation(const int &viewsCount)
@@ -426,14 +426,10 @@ KMessageBox::ButtonCode ViewsHandler::removalConfirmation(const int &viewsCount)
}
if (hasChangedData()) {
- QString removalTxt = i18n("You are going to remove 1 dock or panel completely from your layout.
Would you like to continue?");
-
- if (viewsCount > 1) {
- removalTxt = i18n ("You are going to remove %0 docks and panels completely from your layout.
Would you like to continue?").arg(viewsCount);
- }
-
return KMessageBox::warningYesNo(m_dialog,
- removalTxt,
+ i18np("You are going to remove 1 dock or panel completely from your layout.
Would you like to continue?",
+ "You are going to remove %1 docks and panels completely from your layout.
Would you like to continue?",
+ viewsCount),
i18n("Approve Removal"));
}
@@ -444,7 +440,7 @@ KMessageBox::ButtonCode ViewsHandler::saveChangesConfirmation()
{
if (hasChangedData()) {
QString layoutName = o_data.name;
- QString saveChangesText = i18n("The settings of %0 layout have changed.
Do you want to apply the changes now or discard them?").arg(layoutName);
+ QString saveChangesText = i18n("The settings of %0 layout have changed.
Do you want to apply the changes now or discard them?", layoutName);
return m_dialog->saveChangesConfirmation(saveChangesText);
}
diff --git a/app/settings/viewsdialog/viewsmodel.cpp b/app/settings/viewsdialog/viewsmodel.cpp
index d6249d578..23a2f78a8 100644
--- a/app/settings/viewsdialog/viewsmodel.cpp
+++ b/app/settings/viewsdialog/viewsmodel.cpp
@@ -762,7 +762,7 @@ QVariant Views::data(const QModelIndex &index, int role) const
if (!m_viewsTable[row].onPrimary && !currentScreens.containsId(QString::number(m_viewsTable[row].screen))) {
Data::Screen explicitScr(QString::number(m_viewsTable[row].screen),
- i18nc("unknown screen", "Unknown : [%0]").arg(explicitScr.id));
+ i18nc("unknown screen", "Unknown : [%0]", explicitScr.id));
currentScreens.insertBasedOnId(explicitScr);
}
@@ -848,7 +848,7 @@ QVariant Views::data(const QModelIndex &index, int role) const
if (s_screens.containsId(scrId)) {
return s_screens[scrId].name;
} else {
- return i18nc("unknown screen", "Unknown : [%0]").arg(scrId);
+ return i18nc("unknown screen", "Unknown : [%0]", scrId);
}
}
} else if (role == Qt::UserRole) {