Re: More g-d-u l10n.xml tips :)



On Tue, 2005-09-06 at 07:43 +0200, Danilo Šegan wrote:
> Shaun,
> 
> Here are more things that might improve translation of l10n.xml.
> 
> First off, intltool starting with 0.33 (if I remember correctly when
> we introduced a real XML parser into -extract component as well)
> should be able to handle XML in comments as well, so you can rewrite
> your comments and instead of eg. 
> 
> "To insert the digit, simply write left angle bracket, digit, slash,
> right angle bracket." 
> 
> say something like
> 
> "To insert the digit, simply write <digit/>." 

Very good news.  But is there any way for me to enforce
usage of a particular version of intltool?

I'd like to do that anyway, as there was a version of
intltool that lost attributes, and that screws up the
translations pretty hard.

> Next off, I am not sure how feasible this suggestion is, but by using
> xml:space="preserve" on tags containing <msgid>s and <msgstr>s, PO
> handling utilities will usually put them out as
> 
> msgid "\n"
> "    <msgid>glossentry.tooltip</msgid>\n"
> "    <msgstr>Read the definition for ‘<glossterm/>’.</msgstr>\n"
> "  "
> 
> instead of the current:
> 
> msgid ""
> "<msgid>glossentry.tooltip</msgid> <msgstr>Read the definition for "
> "‘<glossterm/>’.</msgstr>"
> 
> (where spaces are ignored).  Of course, we are now already entering
> the area of where readability of .in file is conversely proportional
> to the readability of extracted transltable messages, so I am not sure
> if this suggestion is worth it.
> 
> I.e. for translators, the best output would be gotten from:
> 
> <msgset>
>   <msgid>glossentry.tooltip</msgid>
>   <_msg xml:space="preserve"><msgid>glossentry.tooltip</msgid>
> <msgstr>Read the definition for ‘<glossterm/>’.</msgstr></_msg>
> </msgset>
> 
> And while I am not sure if this will break anything in stylesheets,
> it certainly breaks the formatting for you as a coder.  However, it
> will get extracted as:
> 
> msgid ""
> "<msgid>glossentry.tooltip</msgid>\n"
> "<msgstr>Read the definition for ‘<glossterm/>’.</msgstr>"
> 
> a much more readable variant of the same message.

I have to deal with those strings considerably less often than
the sum of how many times all the tranlators have to deal with
them combined, so I'd say it's worth the trade-off.  I don't
find the resulting XML too ugly anyway.  Particularly with the
extra msgid in there, all the msgstr elements are just nicely
placed on their own line.  I can live without indentation.

But, this would invalidate all of these strings, right?  All
the translators that have already put in the effort would have
to redo all their translations, or at least go through and
remove a bunch of fuzzy markers.  I suppose if we do them all
in one fell swoop, we can just do the adjustments to the po
files at the same time, saving translators the effort.

--
Shaun





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