Re: Glib: AM_GLIB_GNU_GETTEXT



On Sat, Sep 15, 2012 at 7:16 AM, Lanoxx <lanoxx gmx net> wrote:

This is all historical complications, stemming from the fact that
gettext is not posix, thus it lived a shadowy existence in libintl,
which is the reason for no end of hacky configury. The world would be
a much better place if gettext could be part of libc on all platforms,
with no ifs and buts.

AM_GLIB_GNU_GETTEXT is a copy of AM_GNU_GETTEXT that has been hacked
to remove a few awkward aspects of the mentioned hacky configury (at
the cost of adding some new ones...).

> # This will initialize the internationalization
> # capabilities of glib (glib/gi18n.h) and gettext
> IT_PROG_INTLTOOL([0.41.0])
> AM_GNU_GETTEXT_VERSION([0.18.1])
> AM_GNU_GETTEXT([external])

If you want to use intltool, you should probably remove the GETTEXT
macros. intltool is a sort-of wrapper around xgettext which interferes
with gettext's own way of setting up po/. This error message:

>     config.status: error: po/Makefile.in.in was not created by intltoolize.

is a symptom of intltool and gettext fighting over who gets to set up po/.

> Now my questions. When looking at gedit source [6] then it also contains the
> following additional macros:
>
> AC_SUBST([GETTEXT_PACKAGE], [gedit])
> AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define to the
> gettext package name.])
>
> Im not sure if they are needed in my case.

Yes, defining GETTEXT_PACKAGE is necessary if you want translations to
work. If you look in /usr/share/locale/de/LC_MESSAGES, you see tons of
mo files - their names are determined by the value of GETTEXT_PACKAGE
in the module they belong to.


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