[glib/glib.fixtools.i18n: 2/2] gio tools: Use the proper string for default locale for setlocale()
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib.fixtools.i18n: 2/2] gio tools: Use the proper string for default locale for setlocale()
- Date: Wed, 5 Jun 2019 08:55:24 +0000 (UTC)
commit c059eda8ae8059b6f9c306c70053252ad4413678
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jun 5 16:42:30 2019 +0800
gio tools: Use the proper string for default locale for setlocale()
This makes use of the string we now have from glibconfig.h.in in the
last commit so that setlocale() sets the default system locale
correctly and therefore show the translated messages properly.
gio/gio-querymodules.c | 2 +-
gio/gio-tool.c | 2 +-
gio/glib-compile-resources.c | 2 +-
gio/glib-compile-schemas.c | 2 +-
gio/gresource-tool.c | 2 +-
gio/gsettings-tool.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gio/gio-querymodules.c b/gio/gio-querymodules.c
index 74c659462..d896cd86d 100644
--- a/gio/gio-querymodules.c
+++ b/gio/gio-querymodules.c
@@ -160,7 +160,7 @@ main (gint argc,
return 1;
}
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
/* Be defensive and ensure we're linked to GObject */
g_type_ensure (G_TYPE_OBJECT);
diff --git a/gio/gio-tool.c b/gio/gio-tool.c
index 847a2188b..78cd70b55 100644
--- a/gio/gio-tool.c
+++ b/gio/gio-tool.c
@@ -253,7 +253,7 @@ main (int argc, char **argv)
const char *command;
gboolean do_help;
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
textdomain (GETTEXT_PACKAGE);
bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c
index 399c567d2..47e1a8b98 100644
--- a/gio/glib-compile-resources.c
+++ b/gio/glib-compile-resources.c
@@ -754,7 +754,7 @@ main (int argc, char **argv)
gchar *tmp;
#endif
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 8ad3c6be1..ee3c3b08f 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -2154,7 +2154,7 @@ main (int argc, char **argv)
gchar *tmp = NULL;
#endif
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32
diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c
index d1de02631..5bb7b47b6 100644
--- a/gio/gresource-tool.c
+++ b/gio/gresource-tool.c
@@ -610,7 +610,7 @@ main (int argc, char *argv[])
gchar *tmp;
#endif
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32
diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c
index b7dd9d8fb..c62e957e1 100644
--- a/gio/gsettings-tool.c
+++ b/gio/gsettings-tool.c
@@ -743,7 +743,7 @@ main (int argc, char **argv)
gchar *tmp;
#endif
- setlocale (LC_ALL, "");
+ setlocale (LC_ALL, GLIB_SYSTEM_DEFAULT_ANSI_CODEPAGE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]