summaryrefslogtreecommitdiff
path: root/tools/g-ir-inspect.c
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2016-01-11 13:35:34 +0800
committerTing-Wei Lan <lantw@src.gnome.org>2017-05-05 11:52:18 +0800
commit74e4542739df792d4a1f42eecd756506140703b0 (patch)
treee845b3b047ad5df5f167a5510eb8170b2ec9642e /tools/g-ir-inspect.c
parent2d7cb109011b694904653eb6969049be36011cf8 (diff)
downloadgobject-introspection-74e4542739df792d4a1f42eecd756506140703b0.tar.gz
g-ir-{compiler,generate,inspect}: Call setlocale in main function
It is required to correctly show translated messages on some locales. https://bugzilla.gnome.org/show_bug.cgi?id=760419
Diffstat (limited to 'tools/g-ir-inspect.c')
-rw-r--r--tools/g-ir-inspect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/g-ir-inspect.c b/tools/g-ir-inspect.c
index 6152f9af..2dfe61c2 100644
--- a/tools/g-ir-inspect.c
+++ b/tools/g-ir-inspect.c
@@ -22,6 +22,7 @@
#include <glib.h>
#include <girepository.h>
#include <stdlib.h>
+#include <locale.h>
static void
print_shlibs (const gchar *namespace)
@@ -77,6 +78,8 @@ main (gint argc,
{ NULL },
};
+ setlocale (LC_ALL, "");
+
GOptionContext *context = g_option_context_new ("- Inspect GI typelib");
g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error))