[PyQt] Re: [Eric] Linguist question

Michele Petrazzo - Unipex michele.petrazzo at unipex.it
Sat Oct 3 13:47:22 BST 2009

(since I think that it's a pyqt question/problem I cc to pyqt ml)

Detlev Offenbach wrote:
>> Hi,

I think that I'm finally going crazy with the qt linguistic...
I just update pyqt to 4.5.4 and qt 4.5.2 (the last on debian unstable
repo) for see if was the file version the problem but it's the same...

>> Tried and it work, but not completely: the process forgot the various
>> self.trUtf8 inside the code. Is there a method for include also those?
> It should include the source files as well as long as the are part of the 
> project. Make sure, you add all your sources.

I have all the sources into into the project, but pylupdate "forgot"
some translations. My debug tests was modifying eric for using
pylupdate4 or lupdate and see the different output (-r3462
Project/ProjectTranslationsBrowser.py::906 )

pylupdate4 show me some errors that lupdate not show. something like
"gui/main.py:419: Unterminated string" and on that line I have """Emit
the signal on selection""", so I think that it's right since I have a
lot of other docstring around the same code that aren't warned. The same
problems are shown on other files around the project.

The ending output was:
pylupdate4: Updating 'gui/i18n/main_it.ts'...
pylupdate4:     Found 40 source texts (3 new and 37 already existing)
pylupdate4:     Removed 10 obsolete entries
pylupdate4:     Same-text heuristic provided 3 translations

It seen only 3 of the 10 trUtf8 call, but put them on the right
"context", so behind the right "python class"

After, opening the .ts file with linguist-qt4 (dclick on eric) on the
"source and forms" space, I see only the error
"trunk/gui/i18n/gui/Ui_main.py not available", but I have no file there
since I have them on trunk/gui/Ui_main.py

lupdate-qt4 show me some errors that pylupdate4 not recognize and some
other coincide, with different error message "Unterminated C++ string".
The output was:
lupdate-qt4: Updating 'gui/i18n/main_it.ts'...
lupdate-qt4:     Found 47 source text(s) (10 new and 37 already existing)
lupdate-qt4:     Removed 3 obsolete entries
lupdate-qt4:     Same-text heuristic provided 3 translation(s)

Opening the .ts file with linguist-qt4 now I see *all* my translations,
but with "wrong" context called <unnamed context>.
The other strange thing it's that on the "source and frames" now I see
both my gui and my code when I select the translations on "unnamed context".

On the other hand, both pylupdate4 and lupdate-qt4 analyze and found the
strings on the .ui file correctly, so the differences are only for the
non-gui strings.

The last differences that I saw it's that when I "execute" my code for
see the strings, all that translated with lupdate-qt4 (into the unnamed
context) aren't translated into the execution, but that three that
pylupdate4 saw yes...

This is the end...
Hope that I explain correctly my problem and, of course, if you need the
complete sources, I'll send all.


More information about the PyQt mailing list