From c209b1c750412c3d51bc5e2f61baef4e7e0d5181 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 28 Nov 2007 01:16:48 +0000 Subject: [PATCH] Merged from trunk: 2007-11-28 Tor Lillqvist Merged from trunk: A proper build of GNU libintl is supposed to export the variable _nl_msg_cat_cntr. configure looks for that variable in order to recognize GNU gettext. If it sees that it is indeed GNU gettext that is used, it decides to install message catalogs in share/locale, otherwise in lib/locale. Until now on Windows I have built GTK+ against a build of GNU gettext that did not export _nl_msg_cat_cntr. But this will change, so we can't assume message catalogs are always in lib/locale. * gtk/gtkmain.c: (_gtk_get_localedir) [Win32]: Rework to handle GTK_LOCALEDIR being either in "lib" or "share". Move the function before the inclusion of gtkprivate.h so that it sees the original GTK_LOCALEDIR. * gtk-zip.sh.in: Check whether the message catalogs are in share/locale or lib/locale. * config.h.win32.in: Tack on "/share/locale" to GTK_LOCALEDIR so that the code in _gtk_get_localedir() will find the slashes. svn path=/branches/gtk-2-12/; revision=19085 --- ChangeLog | 24 ++++++++++++++++++ config.h.win32.in | 2 +- gtk-zip.sh.in | 18 ++++++++++--- gtk/gtkmain.c | 64 ++++++++++++++++++++++++++++++----------------- 4 files changed, 81 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 459de1f5b6..6094e7ac37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2007-11-28 Tor Lillqvist + + Merged from trunk: + + A proper build of GNU libintl is supposed to export the variable + _nl_msg_cat_cntr. configure looks for that variable in order to + recognize GNU gettext. If it sees that it is indeed GNU gettext + that is used, it decides to install message catalogs in + share/locale, otherwise in lib/locale. Until now on Windows I have + built GTK+ against a build of GNU gettext that did not export + _nl_msg_cat_cntr. But this will change, so we can't assume message + catalogs are always in lib/locale. + + * gtk/gtkmain.c: (_gtk_get_localedir) [Win32]: Rework to handle + GTK_LOCALEDIR being either in "lib" or "share". Move the function + before the inclusion of gtkprivate.h so that it sees the original + GTK_LOCALEDIR. + + * gtk-zip.sh.in: Check whether the message catalogs are in + share/locale or lib/locale. + + * config.h.win32.in: Tack on "/share/locale" to GTK_LOCALEDIR so + that the code in _gtk_get_localedir() will find the slashes. + 2007-11-28 Tor Lillqvist Merged from trunk: Fix #375893, patch by Ben Hague: diff --git a/config.h.win32.in b/config.h.win32.in index 202a10cfda..99c00b7343 100644 --- a/config.h.win32.in +++ b/config.h.win32.in @@ -88,7 +88,7 @@ #define ENABLE_NLS 1 /* Define the location where the catalogs will be installed */ -#define GTK_LOCALEDIR "UNUSED" +#define GTK_LOCALEDIR "UNUSED/share/locale" /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 diff --git a/gtk-zip.sh.in b/gtk-zip.sh.in index f32c10e3e4..8cd89a90f2 100755 --- a/gtk-zip.sh.in +++ b/gtk-zip.sh.in @@ -14,7 +14,6 @@ cp -p @abs_srcdir@/COPYING share/doc/gtk+-dev-@GTK_VERSION@ rm $ZIP zip $ZIP -@ <