What is it?

Gettext is a library used by GNU projects for internationalisation. Before you print a string, you wrap it, like printf(_("Hello")).

It then looks up these strings and finds appropriate replacements for the current language.

I don't pretend to know how it works very well, and this is not a criticism of the library itself, it's a criticism of its build system.

Ok what's wrong with the build system then

Well, to start with it uses gnulib, so it's off to a bad start.

autogen

First up is the ./autogen.sh script, which is used to generate the ./configre script from code in version control. Many projects have this pre-configure step, which if it uses autotools, is usually nothing more than autoreconf -fiv.

Gettext runs a full build, then does a distclean. This is decidedly sub-optimal for automated builds.

archive.dir.tar

archive.dir.tar is used by autopoint, which copies gettext infrastructure, so you can gettextize a project.

It's designed to be able to support different versions of gettext. This is possible, since the archive contains previous versions of the infrastructure.

One of the possible formats of the archive is a git repository, with tags for the different versions of gettext.

This archive is not kept in version control. Releases include it, however to make a release of gettext, you have to copy whatever random archive you had on your host system.

This of course implies gettext is inherently unreproducible.

What's the alternative?

I don't know of a more sane project, but it's free software, so you could fork gettext and give it some sanity.

To start with I'd rip out gnulib, then I'd make autogen only generate enough to be able to run ./configure. Then I'd make it generate an archive with just the latest release, and fix anything that requires older versions.

However, in the short term I'll just avoid localising software, since I can't stand the tools.