diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-05-23 12:59:49 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2016-05-25 20:05:03 +0000 |
commit | ec575c44637744413b106388cd0ed1d399fc7871 (patch) | |
tree | 0ff12b600a0ad2cb0c61e56dc56891090c1d30e4 | |
parent | 3154f9033dd8a2b2706b71343e17712820e3233f (diff) | |
download | qttools-ec575c44637744413b106388cd0ed1d399fc7871.tar.gz |
Check if there is a %Ln marker as well as the %n marker
Task-number: QTBUG-35144
Change-Id: I2df61fedeac94548381146193b186ab34f05315e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r-- | src/linguist/linguist/errorsview.cpp | 2 | ||||
-rw-r--r-- | src/linguist/linguist/mainwindow.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/linguist/linguist/errorsview.cpp b/src/linguist/linguist/errorsview.cpp index 9ff007d3c..e07915e1c 100644 --- a/src/linguist/linguist/errorsview.cpp +++ b/src/linguist/linguist/errorsview.cpp @@ -80,7 +80,7 @@ void ErrorsView::addError(int model, const ErrorType type, const QString &arg) addError(model, tr("Translation does not refer to the same place markers as in the source text.")); break; case NumerusMarkerMissing: - addError(model, tr("Translation does not contain the necessary %n place marker.")); + addError(model, tr("Translation does not contain the necessary %n/%Ln place marker.")); break; default: addError(model, tr("Unknown error")); diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp index 20a6a0fdf..f91090481 100644 --- a/src/linguist/linguist/mainwindow.cpp +++ b/src/linguist/linguist/mainwindow.cpp @@ -2533,7 +2533,8 @@ void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose) if (m->message().isPlural()) { for (int i = 0; i < numTranslations; ++i) if (m_dataModel->model(mi)->countRefNeeds().at(i) - && !translations[i].contains(QLatin1String("%n"))) { + && !(translations[i].contains(QLatin1String("%n")) + || translations[i].contains(QLatin1String("%Ln")))) { if (verbose) m_errorsView->addError(mi, ErrorsView::NumerusMarkerMissing); danger = true; |