From 45a09474fa9595b2f98a5bac3ce83bd8906523f6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 19 Aug 2013 17:47:40 +0200 Subject: [PATCH] search in plural forms after all our search is not fuzzy, so for some languages it makes a lot of sense to search in the plurals, as they may use different grammatical forms. Task-number: QTBUG-32218 Change-Id: I9ba2e370f9bcc564e707b2339ab0b1e73935c03d Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/linguist/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp index 3479ed1..4ffe221 100644 --- a/src/linguist/linguist/mainwindow.cpp +++ b/src/linguist/linguist/mainwindow.cpp @@ -1004,16 +1004,16 @@ void MainWindow::findAgain() if (searchItem(DataModel::Comments, m->extraComment())) break; } - // Note: we do not look into plurals on grounds of them not - // containing anything much different from the singular. - if (searchItem(DataModel::Translations, m->translation())) - break; + foreach (const QString &trans, m->translations()) + if (searchItem(DataModel::Translations, trans)) + goto didfind; if (searchItem(DataModel::Comments, m->translatorComment())) break; found = false; // did not find the search string in this message } while (0); if (found) { + didfind: setCurrentMessage(realIndex, i); // determine whether the search wrapped -- 2.7.4