to get the default translation target on win32 use g_win32_get_locale()

2008-06-13  Hans Breuer  <hans@breuer.org>

	* glib/gstrfuncs.c : to get the default translation target on
	win32 use g_win32_get_locale() instead of setlocale(LS_MESSAGES,NULL)
	Fixes bug #538044

	* glib/makefile.msc.in gio/makefile.msc : updated

svn path=/trunk/; revision=7036
This commit is contained in:
Hans Breuer 2008-06-13 08:05:33 +00:00 committed by Hans Breuer
parent e5347891fe
commit 43eeb244ac
4 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2008-06-13 Hans Breuer <hans@breuer.org>
* glib/gstrfuncs.c : to get the default translation target on
win32 use g_win32_get_locale() instead of setlocale(LS_MESSAGES,NULL)
Fixes bug #538044
* glib/makefile.msc.in gio/makefile.msc : updated
2008-06-12 Matthias Clasen <mclasen@redhat.com> 2008-06-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -129,7 +129,8 @@ OBJECTS = \
glocaldirectorymonitor.obj \ glocaldirectorymonitor.obj \
gwin32appinfo.obj \ gwin32appinfo.obj \
\ \
gio-marshal.obj gio-marshal.obj \
gwin32directorymonitor.obj
libgio_2_0_la_LIBADD = \ libgio_2_0_la_LIBADD = \
$(top_builddir)/glib/libglib-2.0.la \ $(top_builddir)/glib/libglib-2.0.la \
@ -248,6 +249,8 @@ gio.def: gio.symbols
-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
-DG_GNUC_PRINTF=;G_GNUC_PRINTF gio.symbols >> gio.def -DG_GNUC_PRINTF=;G_GNUC_PRINTF gio.symbols >> gio.def
gwin32directorymonitor.obj : win32\gwin32directorymonitor.c
$(CC) $(CFLAGS) -I win32 -c win32\gwin32directorymonitor.c
RESOURCE = $(PACKAGE).res RESOURCE = $(PACKAGE).res
@ -255,7 +258,7 @@ libgio-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER).dll $(OBJECTS) \ $(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER).dll $(OBJECTS) \
..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \ ..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \
$(INTL_LIBS) \ $(INTL_LIBS) \
user32.lib advapi32.lib shell32.lib wsock32.lib $(LDFLAGS) \ kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib $(LDFLAGS) \
/implib:gio-2.0.lib /def:$(PACKAGE).def /implib:gio-2.0.lib /def:$(PACKAGE).def
.c.obj : .c.obj :

View File

@ -2922,8 +2922,11 @@ _g_dgettext_should_translate (void)
const char *default_domain = textdomain (NULL); const char *default_domain = textdomain (NULL);
const char *translator_comment = gettext (""); const char *translator_comment = gettext ("");
#ifndef G_OS_WIN32
const char *translate_locale = setlocale (LC_MESSAGES, NULL); const char *translate_locale = setlocale (LC_MESSAGES, NULL);
#else
const char *translate_locale = g_win32_getlocale ();
#endif
/* We should NOT translate only if all the following hold: /* We should NOT translate only if all the following hold:
* - user has called textdomain() and set textdomain to non-default * - user has called textdomain() and set textdomain to non-default
* - default domain has no translations * - default domain has no translations

View File

@ -51,7 +51,6 @@ glib_OBJECTS = \
gfileutils.obj \ gfileutils.obj \
ghash.obj \ ghash.obj \
ghook.obj \ ghook.obj \
gi18n.obj \
giochannel.obj \ giochannel.obj \
giowin32.obj \ giowin32.obj \
gkeyfile.obj \ gkeyfile.obj \