Re: Integrate ITS Tool with gettext and Autotools

On Thu, Oct 08, 2015 at 06:51:59PM +0900, Daiki Ueno wrote:
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

It sounds to me one step back, since it typically involves unnecessary
intermediate files (*.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"/>

With an underscore, when reading the XML file it's clearer to know what
is translated and what is not. Also, sometimes we don't want to
translate something, although the attribute is marked for translation.

What about specifying an ITS rule file directly in the file?
Something like:

[its: foobar.its]path/to/file.xml

It would be useful when the XML type is used only internally, or when we
want to customize an ITS rule (e.g. to not extract strings for some


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