Merge pull request #690 from vsvyatski/develop

Added proper plural processing in CSV importer (localization)
This commit is contained in:
Janek Bevendorff 2017-06-27 13:49:33 +02:00 committed by GitHub
commit 079e383319

View File

@ -31,9 +31,9 @@ void CsvParserModel::setFilename(const QString& filename) {
}
QString CsvParserModel::getFileInfo(){
QString a(QString::number(getFileSize()).append(tr(" byte, ")));
a.append(QString::number(getCsvRows())).append(tr(" rows, "));
a.append(QString::number(qMax(0, getCsvCols()-1))).append(tr(" columns"));
QString a(tr("%n byte(s), ", nullptr, getFileSize()));
a.append(tr("%n row(s), ", nullptr, getCsvRows()));
a.append(tr("%n column(s)", nullptr, qMax(0, getCsvCols() - 1)));
return a;
}