-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin Ereth wrote: > Michael Riepe wrote: >> Martin Ereth wrote: >> What I *don't* know, on the other hand, is how you can internationalize >> the Qt stuff. Many texts, in particular all the menu labels, are >> currently specified inside the .ui files. I have absolutely no idea how >> to add the _() there. Or if there's any other mechanism. Or if that >> works with the standard (GNU) gettext. :( > > I think that the text from there is copied 1 by 1 without any change. > But I can't test it, because I can't build the current svn (error at [1]. > There isn't > a file called dvbcutbase.h, is it?). I simply issued make.
The problem is, that the .cpp and .h files of the ui's aren't there. I found out he following: I can use the uic-tool to generate these files. Fortunately there is an option called - -tr <func>, which takes the parameter to set for i18n. So I need to issue: $ uic dvbcutbase.ui > dvbcutbase.h $ uic -impl dvbcutbase.h -tr _ dvbcutbase.ui > dvbcutbase.cpp Then I have the correct files with _() instead of tr() surrounding every string. After that the following should extract the strings $ xgettext --qt --keyword=tr --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format - --keyword=translate:2 --flag=translate:2:pass-c-format - --flag=translate:2:pass-qt-format --keyword=QT_TR_NOOP - --flag=QT_TR_NOOP:1:pass-c-format --flag=QT_TR_NOOP:1:pass-qt-format - --keyword=QT_TRANSLATE_NOOP:2 --flag=QT_TRANSLATE_NOOP:2:pass-c-format - --flag=QT_TRANSLATE_NOOP:2:pass-qt-format --keyword=_ --flag=_:1:pass-c-format - --flag=_:1:pass-qt-format --keyword=N_ --flag=N_:1:pass-c-format - --flag=N_:1:pass-qt-format -o dvbcut.po *.cpp But I get 67 strings. That is far to less. How do you normally build the .cpp and .h files from the .ui-files? Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHFmRKE5UqXaCvB8IRAtucAJ9MfqBkXYpuJyh5Zeaiqrsfa8O/FgCeILI0 tLK1ffcmQzh7Ri5TBT3K/NU= =oGJN -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ DVBCUT-devel mailing list DVBCUT-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dvbcut-devel