Standard gettext PO format

Chusslove Illich caslav.ilic at
Tue Jan 3 20:03:48 GMT 2006

> [: 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.

> 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. 
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. 
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).

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list