[Python-apps-commits] r2328 - in packages/wicd/trunk/debian (3 files)

hanska-guest at users.alioth.debian.org hanska-guest at users.alioth.debian.org
Sun Feb 8 20:44:41 UTC 2009


    Date: Sunday, February 8, 2009 @ 20:44:40
  Author: hanska-guest
Revision: 2328

* debian/patches/:
  - 06-add_LC_MESSAGES_parsing.patch added (Closes: #514553)

Added:
  packages/wicd/trunk/debian/patches/06-add_LC_MESSAGES_parsing.patch
Modified:
  packages/wicd/trunk/debian/changelog
  packages/wicd/trunk/debian/patches/series

Modified: packages/wicd/trunk/debian/changelog
===================================================================
--- packages/wicd/trunk/debian/changelog	2009-02-08 14:54:19 UTC (rev 2327)
+++ packages/wicd/trunk/debian/changelog	2009-02-08 20:44:40 UTC (rev 2328)
@@ -1,3 +1,10 @@
+wicd (1.5.9-2) UNRELEASED; urgency=low
+
+  * debian/patches/:
+    - 06-add_LC_MESSAGES_parsing.patch added (Closes: #514553)
+
+ -- David Paleino <d.paleino at gmail.com>  Sun, 08 Feb 2009 21:44:04 +0100
+
 wicd (1.5.9-1) unstable; urgency=low
 
   * New upstream release:

Added: packages/wicd/trunk/debian/patches/06-add_LC_MESSAGES_parsing.patch
===================================================================
--- packages/wicd/trunk/debian/patches/06-add_LC_MESSAGES_parsing.patch	                        (rev 0)
+++ packages/wicd/trunk/debian/patches/06-add_LC_MESSAGES_parsing.patch	2009-02-08 20:44:40 UTC (rev 2328)
@@ -0,0 +1,34 @@
+Also parse LC_MESSAGES from environment variables, and also put them at
+higher priority than locale.getdefaultlocale()
+---
+ wicd/misc.py |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- wicd-1.5.9.orig/wicd/misc.py
++++ wicd-1.5.9/wicd/misc.py
+@@ -316,6 +316,13 @@ def get_gettext():
+     # http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/
+     local_path = wpath.translations
+     langs = []
++    osLanguage = os.environ.get('LANGUAGE', None)
++    if osLanguage:
++        langs += osLanguage.split(":")
++    osLanguage = None
++    osLanguage = os.environ.get('LC_MESSAGES', None)
++    if osLanguage:
++        langs += osLanguage.split(":")
+     try:
+         lc, encoding = locale.getdefaultlocale()
+     except ValueError, e:
+@@ -323,10 +330,7 @@ def get_gettext():
+         print "Default locale unavailable, falling back to en_US"
+         lc = None
+     if lc:
+-        langs = [lc]
+-    osLanguage = os.environ.get('LANGUAGE', None)
+-    if osLanguage:
+-        langs += osLanguage.split(":")
++        langs += [lc]
+     langs += ["en_US"]
+     lang = gettext.translation('wicd', local_path, languages=langs, 
+                                fallback=True)

Modified: packages/wicd/trunk/debian/patches/series
===================================================================
--- packages/wicd/trunk/debian/patches/series	2009-02-08 14:54:19 UTC (rev 2327)
+++ packages/wicd/trunk/debian/patches/series	2009-02-08 20:44:40 UTC (rev 2328)
@@ -3,3 +3,4 @@
 03-fix_lintian_manpage_warning.patch
 04-fix-scripts.patch
 05-fix_DBus_policy.patch
+06-add_LC_MESSAGES_parsing.patch




More information about the Python-apps-commits mailing list