bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qt4, gettext and autopoint


From: Leopold Palomo Avellaneda
Subject: Re: Qt4, gettext and autopoint
Date: Wed, 25 Mar 2009 19:48:40 +0100
User-agent: KMail/1.9.9

A Dimecres 25 Març 2009, Christophe Mutricy va escriure:
> Hello,
>
> In VLC, we use mainly C and auto*. So it just works with gettext and the
> Makefile.in.in installed by autopoint.
>
> Now, it gets more tricky with the Qt4 interface. No problem with the
> strings in the C++ files. But the strings in the .ui files cause
> problems.
> These .ui files are xml files and are translated in C headers files by
> uic which take care of transforming the xml-escaped strings in proper C
> strings.
> Running msgfmt on the .h files works OK but as they are generated files
> we don't keep them in Git and they are in builddir rather than srcdir.
>
> So first question: Is there a way to have files in
> ${top_builddir}/foo/bar in POTFILES.in
>
> Another option would be to run sed (or another program) on the .ui
> before parsing them with msgfmt. I can't find a way to do that with the
> default Makefile.in.in installed by autopoint. Have I mised something?
>

Hi,

I'm working in a project with Qt and gettext but this kind of stuff we solved 
it with cmake. We pass the .h files to xgettext (not msgfmt?) and we don't 
parse the .ui files. I think that kde do the same (or we do the same as kde).

So, I think that it's better to pass the .h files to xgettext and not the .ui, 
but I think that you can pass the ui files setting some parameter, but I have 
done some tests without success. 

OTOH, I'm almost sure that you can put a list of files that are generated in 
the potfiles.in. We do it with cmake, so I think that autotools have some 
similar method.

Best regards,

Leo







reply via email to

[Prev in Thread] Current Thread [Next in Thread]