Standard gettext PO format

Nicolas Goutte nicolasg at
Thu Jan 5 15:50:54 GMT 2006

On Tuesday 03 January 2006 21:03, Chusslove Illich wrote:
> > [: Nicolas Goutte :]
> > Just a little optimization detail: perhaps using char(4) will be better
> > than using '\004' and especially "\004" (QByteArray::append and
> > QByteArray::indexOf have variants that accept directly char.)
> Actually, I've found out that gettext.h header defines
> GETTEXT_CONTEXT_GLUE, so I've just set a static const QByteArray in top of
> kcatalog.cpp to it. And whether it's a QByteArray or char* doesn't make
> any performance difference.
> > Is there any source incompatibility? If not, then I suppose that you can
> > commit without any problem.
> No source incompatibility. KCatalog class has been thoroughly rewritten,
> but it is not used outside of KLocale.

Good, then there is no obstacle for commiting it.

> > I would consider adding the Gettext runtime to kdelibs too.
> I'd hold with that until build system settles in place. I guess all
> developers' machines have proper support for external Gettext runtime.

Well, I had assumed that compiled unconditinally the Gettext runtime was 
easier than creating checks for unsermake/autoconf, checks that will needed 
to be converted to scons/bysys.

> Note that the addition of context into Gettext didn't introduce any
> changes to runtime, as contexts are just funky msgids with \004 in them.

Ah, yes, you mean that because of the \004 trick, you do not need a 
development Gettext runtime.

> Everything extra needed for compilation is in the gettext.h header, which
> is anyway supposed to be copied into source directory, I'll commit it too
> (and remove libintl.cpp).

Have a nice day!

More information about the kde-core-devel mailing list