Standard gettext PO format
Nicolas Goutte
nicolasg at snafu.de
Thu Dec 29 09:46:35 GMT 2005
On Wednesday 28 December 2005 21:55, Chusslove Illich wrote:
> While giving one more round of thinking to redefine i18n interface, I got a
> bit confused with some implementation matters: it depends on how the
> underlying mechanisms are going to change because of switch to standard
> gettext format.
>
> I don't know whether the preferred option would be to completely switch
> implementation to gettext default (ie. using internally gettext's basic,
> context and plural calls),
That is the aimed goal.
> or just extending the current code based on
> some prehistoric Gettext version (the stuff in kdecore/libintl.cpp). I've
> been fiddling a bit with both approaches.
As noody has maintained that version in KDE (e.g. see the hash compatibility
problem), I suppose that it will not get maintained in future either. So I
think that a full switching to the Gettext runtime is better (even if
perhaps, as first step, the run time would be provided still by kdelibs).
>
> I couldn't really implement gettext defaults; it uses those setlocale() and
> binddomain() calls, providing its own resolution of paths to catalogs,
But isn't things that KDE has to do in one way or another too?
> which I don't know how to interleave with KDE's resources resolution. And
> just ripping the important parts out of the current Gettext code (as it
> was done eight years ago) is beyond my abilities at this moment. Not that
> I haven't looked around it, but it got awfully entangled...
>
> Extending the current code wasn't much of a problem (but it's all hack),
> *providing* that one would be satisfied with retaining KDE's plural form
> choosing scheme. To be clear, PO file would contain standard plural
> translations (msgstr[xx] stuff), but KDE would take the proper form as it
> does now (specified via that message in kdelibs.po). The Plural-Forms
> header field would be there only as a dummy, say for msgfmt to do its
> checks. If this approach is feasible (as transitional perhaps, no BC
> breaks would be needed to replace it), I can present a patch.
I would very much like to avoid to keep this KDE-specific plural form, even
more if the PO files needs the Gettext formula anyway.
As for BC, as it is KDE4, we do not care much. (It is just a problem with the
kdelibs snapshot.)
>
> A perl script to convert PO files to standard gettext also seems to be
> working at this point.
If you have that (even if not completely finsihed), please add it to
branches/work/kde4-l10n/scripts
Have a nice day!
More information about the kde-core-devel
mailing list