2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
authorEmmanuele Bassi <ebassi@openedhand.com>
Tue, 10 Jun 2008 16:47:38 +0000 (16:47 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Tue, 10 Jun 2008 16:47:38 +0000 (16:47 +0000)
* autogen.sh: Check for, and run glib-gettextize.

* configure.ac: Set up the localization support.

* clutter/clutter-main.c: Do not define the GETTEXT_PACKAGE,
but use the one from the configure script.

* po/POTFILES.in: Template for the translatable files.

ChangeLog
autogen.sh
clutter/clutter-main.c
configure.ac
po/POTFILES.in [new file with mode: 0644]

index c7f9bab..3771176 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-06-10  Emmanuele Bassi  <ebassi@openedhand.com>
+
+       * autogen.sh: Check for, and run glib-gettextize.
+
+       * configure.ac: Set up the localization support.
+
+       * clutter/clutter-main.c: Do not define the GETTEXT_PACKAGE,
+       but use the one from the configure script.
+
+       * po/POTFILES.in: Template for the translatable files.
+
 2008-06-10  Chris Lord  <chris@openedhand.com>
 
        * clutter/clutter-main.c: (pre_parse_hook):
index 6918b14..05dd289 100755 (executable)
@@ -20,6 +20,14 @@ else
         gtkdocize || exit $?
 fi
 
+GLIB_GETTEXTIZE=`which glib-gettextize`
+if test -z $GLIB_GETTEXTIZE; then
+        echo "*** No glib-gettextize ***"
+        exit 1
+else
+        glib-gettextize || exit $?
+fi
+
 autoreconf -v --install || exit $?
 
 ./configure "$@" && echo "Now type 'make' to compile $PROJECT."
index dbc8ce6..1e64f65 100644 (file)
@@ -35,7 +35,6 @@
 #endif
 
 #include <stdlib.h>
-#define GETTEXT_PACKAGE "clutter"
 #include <glib/gi18n-lib.h>
 
 #include "clutter-event.h"
index 4348a4b..f640591 100644 (file)
@@ -593,6 +593,14 @@ CLUTTER_LIBS="$SDL_LIBS $EGL_LIBS $GLX_LIBS $OSX_LIBS $WIN32_LIBS $CLUTTER_DEPS_
 AC_SUBST(CLUTTER_CFLAGS)
 AC_SUBST(CLUTTER_LIBS)
 
+GETTEXT_PACKAGE="clutter-$CLUTTER_API_VERSION"
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
+                   [The prefix for our gettext translation domains.])
+
+ALL_LINGUAS=""
+AM_GLIB_GNU_GETTEXT
+
 AC_CONFIG_FILES([
         Makefile
         clutter/Makefile
@@ -625,6 +633,7 @@ AC_CONFIG_FILES([
         doc/reference/cogl/Makefile
         doc/manual/clutter-manual.xml
         doc/manual/Makefile
+        po/Makefile.in
         clutter.pc
 ])
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..e69de29