Re: Improve translations in Mallard



On Mon, 2011-10-24 at 12:20 +0200, Chusslove Illich wrote:
> >> [: Chusslove Illich :]
> > On the other other hand, gettext defines and treats PO files in a way
> > that's not really nice to third-party tools. I'd love to put some info in
> > #, comments (e.g. marking a message transliteration-only), but the fact
> > that it's a controlled vocabulary prevents me.
> 
> But there is a good reason why #, comments are a controlled vocabulary (so
> to say). Firstly, processing tools need to know what different flags mean,
> so it would be bad that each extraction tool can add its own arbitrary
> flags. An arbitrary flag could later conflict a Gettext flag. Secondly,
> semantics of flags is they are purely technical, telling something about the
> structure of the message. Processing tools can use them to validate the
> syntax or to recognize formatting (e.g. when collecting statistics).

I could name a dozen other formats off the top of my head that allow
arbitrary flags on things and get by just fine. Make conventions for
naming flags or something. As it is, PO is a terribly un-extensible
format, and this is why implementers love XLIFF instead. 

> > I'd rather not put more and more stuff in #. comments, because it's going
> > to get in the way of actual comments to translators at some point.
> 
> A manual author-to-translator #. comment also contains a keyword,
> TRANSLATORS: by default. Other types of #. comments can follow the same
> convention. That way any arbitrary property of the message can be set. For
> example:
> 
>   #. TRANSLATORS: Blah, blah, blah,
>   #. blah, blah, blah, blah, blah.
>   #. TAG-PATH: td/p
>   #. TRANSLITERATE-ONLY

I don't currently auto-prefix comments with "TRANSLATORS:". Should I?
I mean, I assume you know the comment is addressed to you, and don't
need to be shouted at for each message.

> (On another side note, I don't think "transliterate-only" deserves such a
> semi-formal treatment. Normally it should be entirely upon translators
> whether to transliterate or do whatever else. If the author wants to make
> that choice instead, that should be explained by an ordinary TRANSLATORS:
> comment.)

The impetus for this is people's names. They're common in PO files
for documents because we put our names in XML elements for credits.
It would still be up to the translators what to do. But, for example,
the German team might decide they never want to translate those, and
they could run a script that just sets msgstr to msgid for messages
tagged as transliterate-only.

That is, it's still your decision. I'm just trying to provide extra
information, and provide it in a way that's conducive to scripting.

--
Shaun




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