[gjs] console: Call setlocale before processing arguments
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] console: Call setlocale before processing arguments
- Date: Tue, 19 Jul 2016 18:10:40 +0000 (UTC)
commit bf1d8190d09b8accab1f91f56f5f06398b095f8a
Author: Ting-Wei Lan <lantw src gnome org>
Date: Mon Jan 11 13:57:20 2016 +0800
console: Call setlocale before processing arguments
It is required to correctly show translated messages in 'gjs --help'.
https://bugzilla.gnome.org/show_bug.cgi?id=760424
gjs/console.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/console.cpp b/gjs/console.cpp
index 62cccbd..3d720c2 100644
--- a/gjs/console.cpp
+++ b/gjs/console.cpp
@@ -71,6 +71,8 @@ main(int argc, char **argv)
gsize len;
int code;
+ setlocale(LC_ALL, "");
+
context = g_option_context_new(NULL);
/* pass unknown through to the JS script */
@@ -90,8 +92,6 @@ main(int argc, char **argv)
g_option_context_free (context);
- setlocale(LC_ALL, "");
-
if (command != NULL) {
script = command;
len = strlen(script);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]