gio tools: Use the proper string for default locale for setlocale()

This makes use of the string we now have from glib-private.h in the
last commit so that setlocale() sets the default system locale
correctly and therefore show the translated messages properly.

Fixes issue #1169.
This commit is contained in:
Chun-wei Fan
2019-06-05 16:42:30 +08:00
parent 3e5d1bd6ff
commit 9f709fe1e9
6 changed files with 9 additions and 17 deletions

View File

@@ -25,9 +25,7 @@
#include <string.h>
#include <stdlib.h>
#ifdef G_OS_WIN32
#include "glib/glib-private.h"
#endif
static GSettingsSchemaSource *global_schema_source;
static GSettings *global_settings;
@@ -743,7 +741,7 @@ main (int argc, char **argv)
gchar *tmp;
#endif
setlocale (LC_ALL, "");
setlocale (LC_ALL, GLIB_DEFAULT_LOCALE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32