Re: Integrate ITS Tool with gettext and Autotools



On Fri, Oct 09, 2015 at 09:58:34AM -0400, Shaun McCance wrote:
On Fri, 2015-10-09 at 13:16 +0200, Sébastien Wilmet wrote:
There is a difference between:
<tag translatable="yes">String to translate</tag>

And:
<tag attribute="Value to translate" another_attribute="Value" />

Jumping in at a random spot with a few random points:

<snip>

3) You can only do local overrides on elements, not attributes, because
you can't put attributes on attributes. Just one more reason why you
shouldn't put human-readable, translatable content in attribute values.

<snip>

6) Putting _ at the beginning of names is changing the names of the
elements and attributes. Your source file with the underscores isn't a
valid instance of the format, and so it can't be used in any way on its
own.

Some formats *do* allow an attribute name prefixed by an underscore.
<tag attribute="Not translated" />
<tag _attribute="Translated!" />

It is used for example in GtkSourceView:
https://git.gnome.org/browse/gtksourceview/tree/data/language-specs/c.lang#n25
(it's not a *.in file)

A Glade catalog has also some translatable attribute's values, but
unfortunately Glade doesn't support the underscore-variant. So to
extract only the strings that we want to translate, a *.in file is
needed, or sometimes a custom ITS rule file is sufficient (but we loose
the ability to see quickly what is translated).

--
Sébastien


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