mrkara / gtranslator

A fork of the original 2-91 branch of Gtranslator from http://projects.gnome.org/gtranslator
GNU General Public License v3.0
1 stars 0 forks source link

[bgo#610433] Search doesn't work fine #50

Open mrkara opened 7 years ago

mrkara commented 7 years ago

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:

Originally reported by Jorge González at https://bugzilla.gnome.org/show_bug.cgi?id=610433

mrkara commented 7 years ago

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

Originally posted by Daniel Mustieles

mrkara commented 7 years ago

Bug 658733 has been marked as a duplicate of this bug.

Originally posted by Daniel Mustieles

mrkara commented 7 years ago

So is this NOTABUG then?

Anyway, reopening as I can't see any open non developer question.

Originally posted by Tobias Mueller

mrkara commented 7 years ago

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.

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)

Originally posted by

mrkara commented 7 years ago

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.

Originally posted by Federico Bruni