On Sat, 31 Dec 2016, Allin Cottrell wrote:
I see that the front page of the Italian Reference has a note saying
that the
translation is frozen as of gretl 1.7.1 but actually that's not true: since
the Italian XML files are up to date, so (basically) is the Reference. So
maybe we could remove that note?
Yes, absolutely.
Now for the question. The big problem with translation of the XML
files is
ensuring that the translations stay up to date. I'm wondering if xml2po might
be helpful here. I think Alexander Gedranovich raised this question a while
back. I didn't look into it at the time but now I've done so. Xml2po offers
the facility of stripping the translatable material out of an XML file and
making a pot file (essentially each paragraph becomes a "msgid"), and it also
gives a means of merging translations in a po file back into XML. So we could
use the usual "gettext" procedure, meaning that any updates to the English
versions would be immediately apparent to translators -- and any newly added
material would appear in the translated versions in English (until it gets
translated).
I've put a sample pot file (for the function reference) at
http://users.wfu.edu/cottrell/tmp/gretl_functions.pot . Comments invited.
The main advantage would be giving translators a tool for monitoring
possible inconsistencies between versions, spotting new entries, etc. I've
put together, over the years, a few in-house tools to deal with this but
I'm not at all adverse to changing my habits. From looking at the potfile
you've created, however, a few things leave me a little perplexed.
The gettext system is designed to deal with short segments of text,
possibly repeated many times. You translate each segment once, and the
work is done (also nice for consistency). However, this may not be
desirable when longer, more articulate texts have to be translated, as
sometimes there is no one-to-one correspondence between languages. An
example from the two languages I know best
ENG ITA
------------------------
Free Libero
Free Gratis
Nephew Nipote
Grandson Nipote
------------------------
Of course, what matters here is the context. But then, you miss the most
important advantage of gettext, which is "recycling" many times over the
work you've done once.
And in fact, what you get in the functions potfile is either longish text
fragments that occur once (and the "translate once" advantage of
gettext becomes moot), or infinitesimal tokens like "s", that occur many
times, but possibly in very different contexts, so they may require
different translations in different languages.
But as I said, I'm open to the new system if in fact it's provably more
robust and more efficient than doing things by hand.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------