From: Denis Barbier <[email protected]>
Date: Sun, 6 Feb 2011 14:15:18 -0600

Comments tell that LANG has to be the first value, and LC_ALL the last
one.  Thus LANGUAGE is printed between them.

Original patch from belocs-locales-bin 2.3.4-2, 2005-03-19.

[[email protected], 2005-12-31: disable if POSIXLY_CORRECT is set]
[[email protected], 2011-02-06: do not suppress LANGUAGE= line
 when LANGUAGE is unset]

Signed-off-by: Jonathan Nieder <[email protected]>
---
 locale/programs/locale.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index bf820ca..6d48e0d 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -793,6 +793,7 @@ show_locale_vars (void)
 {
   size_t cat_no;
   const char *lcall = getenv ("LC_ALL") ? : "";
+  const char *language = getenv ("LANGUAGE") ? : "";
   const char *lang = getenv ("LANG") ? : "";
 
   auto void get_source (const char *name);
@@ -811,6 +812,9 @@ show_locale_vars (void)
   /* LANG has to be the first value.  */
   print_assignment ("LANG", lang, false);
 
+  if (getenv ("POSIXLY_CORRECT") == NULL)
+    printf ("LANGUAGE=%s\n", language);
+
   /* Now all categories in an unspecified order.  */
   for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
     if (cat_no != LC_ALL)
-- 
1.7.5.1


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/20110510071049.GE2277@elie

Reply via email to