Hi there,

I have been trying to understand how to configure gettext and use the glib/gi18n.h header that comes with glib. I have already read a big part of the gettext documentation [1] and tried various other sources [2,3,4,5]. About the background: I have a software that had a (very old) copy of gettext directly included in the source code (e.g. src/gettext.h src/translation.h) and I am trying to migrate it to use glib's internationalization features.

I have already upgraded the file and currently it looks like this:

# This will initialize the internationalization
# capabilities of glib (glib/gi18n.h) and gettext

and in i only call autoreconf -ivs

Now my questions. When looking at gedit source [6] then it also contains the following additional macros:

AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define to the gettext package name.])

Im not sure if they are needed in my case.

Secondly, when I look at some other files then i find that there are other ways to configure gettext [7]:

# Define GETTEXT_PACKAGE=window-picker-applet and also replace all
# occurences of @GETTEXT_PACKAGE@ with window-picker-applet
AC_SUBST([GETTEXT_PACKAGE], [window-picker-applet])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"



The particular difference here is that AM_GLIB_GNU_GETTEXT is being used. While it is possible to get at least some information about the AM_GNU_GETTEXT macro at [1] [3] [5] and [8] there is virtually no information about AM_GLIB_GNU_GETTEXT. For example it is not being mentioned in [4] trying to google for it only gives results about people asking why automake cannot find this macro and what they need to install and [9] also does not contain much information.

One particular difference that I have noticed, is that using AM_GLIB_GNU_GETTEXT does not generate the file ABOUT-NLS (but I could be wrong about this). Generally I am wondering if this file is still needed and or useful now days or if is just a left over from some old version of gettext. I also get an error about po/ (which seems to be an automatically generated file):

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

And im wondering how I can get rid of this error.

I hope I have included enough information to show that I have done some research already. I think that the gnome documents of the glib gettext api at [4] could use an update and that they should contain some information about the AM_GLIB_GNU_GETTEXT macro. And I hope someone could shed some light into the problem i mentioned above.

Kind Regards

[8] /usr/share/aclocal/gettext.m4
[9] /usr/share/aclocal/glib-gettext.m4

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