Re: Integrate ITS Tool with gettext and Autotools



Hello,

Sébastien Wilmet <swilmet gnome org> writes:

I don't think gettext's XML support will grow to the point where it can
handle complex documentation, but this is probably the way forward for
simple XML data files.

I plan to include it in the next release of gettext (maybe in December),
and at some point, I will ask maintainers of custom XML formats to
consider installing their rule files in $prefix/share/gettext/its.

For details, see the preliminary documentation available at:
http://du-a.org/~ueno/gettext/doc/gettext_15.html#SEC326

gettext itself will ship some by default:
http://git.sv.gnu.org/cgit/gettext.git/tree/gettext-tools/its?h=wip/ueno/its2

This is merely for compatibility reasons, and it would be nicer if those
files are maintained in the relevant "upstream" projects.

To mark XML attributes as translatable, a common thing to do is to
prefix them with an underscore. Intltool supports that, but not gettext
AFAIK. If the ITS branch supports that, it would cover lots of simple
cases.

It sounds to me one step back, since it typically involves unnecessary
intermediate files (*.in, *.in.in, ...) or a special treatment of
underscores in your XML parser.  On the other hand, it can be easily
written as an ITS rule:

  <its:translateRule selector="//*[starts-with(name(.), '_')]" translate="yes"/>

For those curious about the current status, I have created a Fedora Copr
repository, which will be kept updated until it gets merged:
http://copr.fedoraproject.org/coprs/ueno/gettext-its/

Comments and suggestions would be appreciated.

Regards,
-- 
Daiki Ueno


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