[gnome-session] Call setlocale in main function of gnome-session-binary and gnome-session-quit
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] Call setlocale in main function of gnome-session-binary and gnome-session-quit
- Date: Thu, 21 Jan 2016 15:00:43 +0000 (UTC)
commit 788b64a7d99355e2b2c561dfb05ebf317a07a1e0
Author: Ting-Wei Lan <lantw src gnome org>
Date: Mon Jan 11 14:03:39 2016 +0800
Call setlocale in main function of gnome-session-binary and gnome-session-quit
It is required to correctly show translated messages on some locales.
https://bugzilla.gnome.org/show_bug.cgi?id=760425
gnome-session/main.c | 1 +
tools/gnome-session-quit.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 4bc8cd0..c77ac3b 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -294,6 +294,7 @@ main (int argc, char **argv)
/* Make sure we initialize gio in a way that does not autostart any daemon */
initialize_gio ();
+ setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
diff --git a/tools/gnome-session-quit.c b/tools/gnome-session-quit.c
index 3901d75..a83f4fe 100644
--- a/tools/gnome-session-quit.c
+++ b/tools/gnome-session-quit.c
@@ -171,6 +171,7 @@ main (int argc, char *argv[])
GOptionContext *ctx;
/* Initialize the i18n stuff */
+ setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]