mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
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:
@@ -26,6 +26,8 @@
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "glib/glib-private.h"
|
||||
|
||||
static gboolean
|
||||
is_valid_module_name (const gchar *basename)
|
||||
{
|
||||
@@ -160,7 +162,7 @@ main (gint argc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
setlocale (LC_ALL, GLIB_DEFAULT_LOCALE);
|
||||
|
||||
/* Be defensive and ensure we're linked to GObject */
|
||||
g_type_ensure (G_TYPE_OBJECT);
|
||||
|
Reference in New Issue
Block a user