summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2016-01-11 14:25:35 +0800
committerTing-Wei Lan <lantw@src.gnome.org>2016-01-11 14:25:35 +0800
commit9b0783d3fe5264e7fb7d58b65158aa86b0c8092a (patch)
treeebdfa4393643b01c4049db9cbb08dc22c3a1eb09
parent474e96628ed18a3d71979774fc79a974d327ef4f (diff)
downloadgupnp-dlna-9b0783d3fe5264e7fb7d58b65158aa86b0c8092a.tar.gz
Call setlocale in main function of gupnp-dlna-info and gupnp-dlna-ls-profiles
It is required to correctly show translated messages on some locales. https://bugzilla.gnome.org/show_bug.cgi?id=760431
-rw-r--r--tools/gupnp-dlna-info.c3
-rw-r--r--tools/gupnp-dlna-ls-profiles.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/gupnp-dlna-info.c b/tools/gupnp-dlna-info.c
index 6fabafa..18a45b2 100644
--- a/tools/gupnp-dlna-info.c
+++ b/tools/gupnp-dlna-info.c
@@ -31,6 +31,7 @@
#include "config.h"
#endif
+#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -249,6 +250,8 @@ main (int argc,
g_type_init ();
#endif
+ setlocale (LC_ALL, "");
+
ctx = g_option_context_new (" - program to extract DLNA and related metadata");
g_option_context_add_main_entries (ctx, options, NULL);
diff --git a/tools/gupnp-dlna-ls-profiles.c b/tools/gupnp-dlna-ls-profiles.c
index 09f3a76..22b9924 100644
--- a/tools/gupnp-dlna-ls-profiles.c
+++ b/tools/gupnp-dlna-ls-profiles.c
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include <locale.h>
#include <stdlib.h>
#include <glib.h>
@@ -65,6 +66,8 @@ main (int argc, char **argv)
g_type_init ();
#endif
+ setlocale (LC_ALL, "");
+
ctx = g_option_context_new (" - program to list all the DLNA profiles supported by gupnp-dlna");
g_option_context_add_main_entries (ctx, options, NULL);
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {