Re: Tools to help with mnemonic l10n?



On Fri, 2012-01-20 at 11:12 +0100, Kenneth Nielsen wrote:
> On 19-01-2012 17:52, Johannes Schmid wrote:
> > Hi!
> >
> >> To try and keep the ball moving on this, I have made a feature request
> >> bug https://bugs.launchpad.net/intltool/+bug/918622 in the intltool
> >> project (which is used to extract the strings and put them in po-files.)
> >
> > I think it would be better to file a bug against its-tool since it is
> > definitly the more actively developed project when it comes to
> > extracting strings from xml files.
> 
> Ahh, that was what I was writing about earlier, about whether or not 
> there was a competing tech. It even looks like its-tool is python, which 
> makes it somewhat more probable that I can lend a hand with it.
> 
> But which tool is actually used for the projects on GNOME?

intltool is used for GtkBuilder files right now. itstool is not
necessarily a suitable replacement for intltool for all XML files.
intltool is more suitable for XML files that are catalogs of data,
where you want to produce a single final XML file with all of the
translations. itstool is more suitable for XML documents, where
you want to produce translated copies of the files.

intltool:
  C.xml.in \
  xx.po     \__ C.xml
  yy.po     /
  zz.po    /

itstool:
  C.xml \__ xx.xml
  xx.po /
  C.xml \__ yy.xml
  yy.po /
  C.xml \__ zz.xml
  zz.po /

One other thing we sometimes do with XML files (and this may be the
case with GtkBuilder files) is just extract string out of them, but
never merge them back. Instead, we read English strings from the XML
and call gettext on them in C. Either intltool or itstool could do
the job for that. There are advantages and disadvantages to each.

However, in GNOME, the po directory is always managed by intltool.
So if you want to use itstool to manage an XML file should be part
of the primary translations (as opposed to a separate document),
what you have to do is have itstool manage a pot file as part of
the build, add that pot file to git, and let intltool work from
that. That's what yelp-xsl and yelp do for XML translations.

--
Shaun




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