GNOME Bugzilla – Bug 610433
Search doesn't work fine
Last modified: 2019-03-01 08:37:34 UTC
The search dialog does not work fine. Sometimes it just moves to the next string no matter which is the search term. Steps to reproduce the bug: * Open a po file. * Open the search window and introduce a quite long string (in my case: gbrainy.master.po and "Maximum number of stored games") * Click Search and wait until the search has finished. * It doesn't find the string (although it exists, first bug). * Next time you hit Search in the same dialog, it just goes to the next string.
I've reviewed it, and it works properly for me with just one po file opened. With the last gbrainy po file, I've searched the string "funciona la puntuación en gbrainy consulte la ayuda" and it works properly; gTranslator finds the string and, if I try to search it again, it doesn't moves to the next string. There is a similar error if you have two po files opened in two tabs (i.e. gtranslator.po and gbrainy.po). Search the word "juego" in gbrainy.po... there are several results; now search the same word in gtranslator.po: this word doesn't exists in this po file, and you can see how strings are been highlighted when you press the Search button
*** Bug 658733 has been marked as a duplicate of this bug. ***
So is this NOTABUG then? Anyway, reopening as I can't see any open non developer question.
Hello, This is a bug, indeed. In my experience, the problem occurs when several tabs are open. In one of the tabs, the search is correct (allowing for bug 571713) but in the other tabs it doesn't skip the non-pertinent strings. Usually the “correct” tab is the first one, but not always. This happens with small PO files and search patterns, as well as large ones. The 3 tests below were done with Debian 6.07 and gtranslator 1.9.11. I had essentially the same results under Debian 7.0 (gtranslator 2.91.4) after opening several tabs in the same window via the gtranslator menu. With version 2.91.4, though, the contextual menu of Nautilus or Thunar opens each file in a new window instead of a new tab. (Whether this is due to the system or the version of gtranslator, I don't know.) I tested up to 4 simultaneous windows, one tab each, with PO files ranging from 140 to 265 kB. The search pattern included 40 to 50 characters. All the searches were correct (allowing for bug 571713) and took 3 to 10 seconds. Opening several gtranslator windows to do a systematic change in a large number of PO files is however very inconvenient. Test 1 - one large PO file (http://www.gnu.org/philosophy/po/stallman-mec-india.fr.po, 260 kB, 409 strings); I searched for “Businesses should demand opposition to software patents.” The 2 occurrences (strings # 21 and 158) were highlighted correctly but the search used 100% of one CPU for several seconds. Test 2 - 2 tabs were opened: first http://www.gnu.org/philosophy/po/ucita.fr.po (25.0 kB, 41 strings), then [...]/trivial-patent.fr.po (24.8 kB, 53 strings); I searched for “FSF” in trivial-patent, then ucita. - trivial-patent (second tab): the non-pertinent strings were not skipped. The search jumped from original string #1 to translated #1, to original #2, to translated #2, etc. Whenever the pattern was found, it was highlighted and it took one more click to move to the next string. - ucita (first tab): the search correctly skipped non-pertinent strings. Whenever the pattern occurred twice in the same string, only the first occurrence was highlighted (bug 571713). Test 3 - 2 tabs were opened: first http://www.gnu.org/licenses/po/gcc-exception-3.0.fr.po (4.3 ko, 10 strings), then [...]/gcc-exception-3.1.fr.po (3.8 ko, 12 strings); I searched for “FSF” in gcc-exception-3.1, then gcc-exception-3.0. The search correctly skipped non-pertinent strings in the second tab but not the first one, whichever was tested first (the system was rebooted between the two sets of searches). Hardware: AMD64 dual-core 5600+ RAM 2060 MB (up to 700 used)
I can confirm this bug. If I have two .po files opened, the search works fine in the first tab and it doesn't work on the second tab (it just goes to the next string; or previous string, if 'search behind' is enabled). gtranslator version 2.91.6 I think that it should be marked as confirmed.
We are mass-closing old gtranslator issues as the latest versions of gtranslator (3.30 or later) should fix most of the reported problems and as there is unfortunately no capacity to retest all of them separately. https://mail.gnome.org/archives/desktop-devel-list/2019-February/msg00059.html If the issue described in this report still happens in gtranslator version 3.30 or later, please file a new ticket under https://gitlab.gnome.org/GNOME/gtranslator/issues/ - thanks for your understanding! We are sorry that your report was not handled / fixed after you reported it - many free and open source software projects receive more bug reports and feature requests than they have developers who have free time to work on them. If you would like to get involved and contribute on gtranslator code, please check https://wiki.gnome.org/Git/Developers
This bug is still present in version 3.31.90. In Gitlab I found a discussion about the idea of removing tabs (which would _solve_ or rather avoid the problem). I've added a comment here: https://gitlab.gnome.org/GNOME/gtranslator/issues/28#note_449492