Commit 3046f7b3 authored by Chun-wei Fan's avatar Chun-wei Fan

gio-tool.c: Don't hardcode localedir on Windows

We ought to construct the localedir based on the location of the GLib
DLL, like what the other tools do.
parent 9f709fe1
Pipeline #89075 passed with stages
in 35 minutes and 27 seconds
......@@ -253,9 +253,20 @@ main (int argc, char **argv)
const char *command;
gboolean do_help;
#ifdef G_OS_WIN32
gchar *localedir;
#endif
setlocale (LC_ALL, GLIB_DEFAULT_LOCALE);
textdomain (GETTEXT_PACKAGE);
#ifdef G_OS_WIN32
localedir = _glib_get_locale_dir ();
bindtextdomain (GETTEXT_PACKAGE, localedir);
g_free (localedir);
#else
bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
#endif
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment