Integrate ITS Tool with gettext and Autotools (Was: Re: Death of gnome-common)


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> wrote:
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 spend a
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 other
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 gettext
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
I've tried to not add the generated *.pot files to Git, because
generated files should not be added to the version control system. But
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 targets
don't work with builddir != srcdir.

So a solution is to add the generated *.pot files to Git.

Is there another solution?

The gettext documentation doesn't recommend to add generated files in

When a file is present in, the make target supposes that the
file is in srcdir. So adding a make target (in a gettext Rules file that
is added to the po/Makefile) to build that file in builddir won't help
when builddir != srcdir.

Maybe a solution is to modify po/, like it is done in GTK+
(but not for using ITS Tool). But I'd rather keep things simple.

Is there a recommended way of doing things?

Thanks in advance,

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