diff --git a/src/migration/importwizard.cpp b/src/migration/importwizard.cpp
--- a/src/migration/importwizard.cpp
+++ b/src/migration/importwizard.cpp
@@ -515,27 +515,25 @@
//
bool ImportWizard::checkUserInput()
{
- QString issues;
+ KLocalizedString issues;
if (d->dstNewDBCaptionLineEdit->text().isEmpty()) {
- issues = xi18nc("@info", "No new database name was entered.");
+ issues = kxi18nc("@info", "No new database name was entered.");
}
Kexi::ObjectStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
if (sourceDriver && sourceDriver->isSourceAndDestinationDataSourceTheSame()) {
- // note: we're using .arg() here because the 'issues' argument is already in rich-text format
- issues = xi18nc("@info", "%1Source database is the same as destination.")
- .arg(issues);
+ KLocalizedString sameDbIssue = kxi18nc("@info", "%1Source database is the same as destination.");
+ issues = issues.isEmpty() ? sameDbIssue.subs("") : sameDbIssue.subs(issues);
}
if (!issues.isEmpty()) {
- // note: we're using .arg() here because the 'issues' argument is already in rich-text format
d->lblImportingErrTxt->setText(
xi18nc("@info", "Following issues were found with the data you entered:"
"%1"
- "Please click Back button and correct these issues.")
- .arg(issues));
+ "Please click Back button and correct these issues.",
+ issues));
return false;
}
return true;
@@ -920,14 +918,18 @@
qDebug() << msg << "\n" << details;
d->finishPageItem->setHeader(xi18n("Failure"));
- // note: we're using .arg() here because the msg and details arguments are already in rich-text format
+ // note: we're using QString.arg() here because the msg and details
+ // arguments are already in rich-text format, but leaving out the
+ // arguments from xi18nc writes (I18N_ARGUMENT_MISSING). Thus, first
+ // replace %n with themselves to avoid ki18n warning and then call
+ // QString.arg() to replace them with HTML text.
d->finishLbl->setText(
xi18nc("@info",
"Import failed."
"%1"
"%2"
- "You can click Back button and try again.")
- .arg(msg).arg(details));
+ "You can click Back button and try again.",
+ "%1", "%2").arg(msg).arg(details));
return false;
}
return true;