Fix plural word issues in status message
This commit is contained in:
parent
c18f069c58
commit
99ee4d456c
@ -55,20 +55,22 @@ void RclMain::updateIdxStatus()
|
||||
}
|
||||
msg += phs + " ";
|
||||
if (status.phase == DbIxStatus::DBIXS_FILES) {
|
||||
char cnts[100];
|
||||
QString sdocs = status.docsdone > 1 ?tr("documents") : tr("document");
|
||||
QString sfiles = status.filesdone > 1 ? tr("files") : tr("file");
|
||||
QString serrors = status.fileerrors > 1 ? tr("errors") : tr("error");
|
||||
QString stats;
|
||||
if (status.dbtotdocs > 0) {
|
||||
string format =
|
||||
qs2utf8s(tr("(%d documents/%d files/%d errors/%d total files) "));
|
||||
sprintf(cnts, format.c_str(),
|
||||
status.docsdone, status.filesdone, status.fileerrors,
|
||||
status.totfiles);
|
||||
stats = QString("(%1 ") + sdocs + "/%2 " + sfiles +
|
||||
"/%3 " + serrors + "/%4 " + tr("total files)");
|
||||
stats = stats.arg(status.docsdone).arg(status.filesdone).
|
||||
arg(status.fileerrors).arg(status.totfiles);
|
||||
} else {
|
||||
string format =
|
||||
qs2utf8s(tr("(%d documents/%d files/%d errors) "));
|
||||
sprintf(cnts, format.c_str(),
|
||||
status.docsdone, status.filesdone, status.fileerrors);
|
||||
stats = QString("(%1 ") + sdocs + "/%2 " + sfiles +
|
||||
"/%3 " + serrors + ") ";
|
||||
stats = stats.arg(status.docsdone).arg(status.filesdone).
|
||||
arg(status.fileerrors);
|
||||
}
|
||||
msg += QString::fromUtf8(cnts) + " ";
|
||||
msg += stats + " ";
|
||||
}
|
||||
string mf;int ecnt = 0;
|
||||
string fcharset = theconfig->getDefCharset(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user