[libnotify] notify-send: Call setlocale in main function



commit 5398ecfe3f0fa84e609ea7ad174c175e21b951a5
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Mon Jan 11 14:53:51 2016 +0800

    notify-send: Call setlocale in main function
    
    It is required to correctly show translated messages on some locales.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760438

 tools/notify-send.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tools/notify-send.c b/tools/notify-send.c
index c0b9eeb..cafcf15 100644
--- a/tools/notify-send.c
+++ b/tools/notify-send.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include <libnotify/notify.h>
+#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -170,6 +171,8 @@ main (int argc, char *argv[])
 
         body = NULL;
 
+        setlocale (LC_ALL, "");
+
         g_type_init ();
 
         g_set_prgname (argv[0]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]