Re: Integrate ITS Tool with gettext and Autotools (Was: Re: Death of gnome-common)
- From: Shaun McCance <shaunm gnome org>
- To: Sébastien Wilmet <swilmet gnome org>, desktop-devel-list gnome org
- Subject: Re: Integrate ITS Tool with gettext and Autotools (Was: Re: Death of gnome-common)
- Date: Fri, 02 Oct 2015 16:48:31 -0400
On Fri, 2015-10-02 at 19:55 +0200, Sébastien Wilmet wrote:
On Wed, Jun 24, 2015 at 02:17:52PM +0100, Emmanuele Bassi wrote:
On 24 June 2015 at 14:13, Michael Catanzaro <mcatanzaro gnome org>
On Wed, 2015-06-24 at 08:56 +0100, Emmanuele Bassi wrote:
I do hope that, if you're using glib-gettext or intltool, you
little bit of time to port to upstream gettext instead.
Has anyone written a guide on how to do this?
It's the same guide as using gettext. Upstream gettext recognises
desktop files, GSettings schemas, as well as GtkBuilder XML
Sadly, it's still in use for AppData XML, but for that (and any
XML-based format) there's itstool, which is also used by the
documentation team for the application help:
I have a question about how to integrate ITS Tool with upstream
and Autotools (and Git).
I have a branch in GtkSourceView to use upstream gettext and itstool:
ITS Tool generates *.pot files that can be added to the POTFILES.in.
I've tried to not add the generated *.pot files to Git, because
generated files should not be added to the version control system.
then there are problems with builddir != srcdir. For tarballs the
solution is easy: distribute the generated sub *.pot files in the
tarball. But when compiling from the git repository, some make
don't work with builddir != srcdir.
So a solution is to add the generated *.pot files to Git.
Is there another solution?
This is what yelp and yelp-xsl do. They have XML files of translated
strings for use in XSLT. It's a home-brewed XSLT gettext system. Here's
the Makefile.am that manages the POT file:
Here's the POT file in git:
Here's the POTFILES.in:
Yes, putting generated files in git is dirty. But it does work, and I
haven't gotten any complaints about it. If somebody has a suggestion on
how to do this differently, I'm all ears.
Daiki has been working on adding ITS support to gettext, so you will be
able to do arbitrary XML with ITS without external tools. Here's his
I don't think gettext's XML support will grow to the point where it can
handle complex documentation, but this is probably the way forward for
simple XML data files.
The gettext documentation doesn't recommend to add generated files in
When a file is present in POTFILES.in, the make target supposes that
file is in srcdir. So adding a make target (in a gettext Rules file
is added to the po/Makefile) to build that file in builddir won't
when builddir != srcdir.
Maybe a solution is to modify po/Makefile.in.in, like it is done in
(but not for using ITS Tool). But I'd rather keep things simple.
Is there a recommended way of doing things?
Thanks in advance,
desktop-devel-list mailing list
desktop-devel-list gnome org
] [Thread Prev