packages: calibre/calibre-locales.patch - reverse

lisu lisu at pld-linux.org
Tue Jan 24 21:21:23 CET 2012


Author: lisu                         Date: Tue Jan 24 20:21:23 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- reverse

---- Files affected:
packages/calibre:
   calibre-locales.patch (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: packages/calibre/calibre-locales.patch
diff -u packages/calibre/calibre-locales.patch:1.9 packages/calibre/calibre-locales.patch:1.10
--- packages/calibre/calibre-locales.patch:1.9	Tue Jan 24 21:05:16 2012
+++ packages/calibre/calibre-locales.patch	Tue Jan 24 21:21:18 2012
@@ -1,11 +1,11 @@
---- calibre/src/calibre/utils/localization.py~  2012-01-20 05:44:58.000000000 +0100
-+++ calibre/src/calibre/utils/localization.py   2012-01-24 20:40:09.619382280 +0100
+--- calibre/src/calibre/utils/localization.py~	2012-01-13 05:32:13.000000000 +0100
++++ calibre/src/calibre/utils/localization.py	2012-01-17 09:35:01.311333439 +0100
 @@ -49,20 +49,20 @@
          lang = 'en'
      return lang
-
-+def messages_path(lang):
-+    return ('/usr/share/locale/%s/LC_MESSAGES'%lang)
+ 
++    def messages_path(lang):
++        return ('/usr/share/locale/%s/LC_MESSAGES'%lang)
 +
  def get_lc_messages_path(lang):
      hlang = None
@@ -27,15 +27,15 @@
 +        xlang = lang.split('_')[0]
 +        if xlang in available_translations():
 +            hlang = xlang
-+    if hlang is not None:
-+            if hlang is not None:
-+    return None
-
++        if hlang is not None:
++            return messages_path(hlang)
++        return None
+ 
  def set_translators():
      # To test different translations invoke as
 @@ -84,18 +84,12 @@
                  buf = cStringIO.StringIO(buf.getvalue())
-
+ 
          if mpath is not None:
 -            from zipfile import ZipFile
 -            with ZipFile(P('localization/locales.zip',
@@ -53,13 +53,13 @@
 +                buf = open(os.path.join(mpath, 'calibre.mo'), 'rb')
 +            mpath = mpath.replace(os.sep+'nds'+os.sep, os.sep+'de'+os.sep)
 +            isof = os.path.join(mpath, 'calibre_iso639.mo')
-+            isof = os.path.join(mpath, 'calibre_iso639.mo')
++            if os.path.exists(isof):
 +                iso639 = open(isof, 'rb')
-
+ 
          t = None
          if buf is not None:
---- calibre/src/calibre/translations/dynamic.py.orig    2012-01-20 05:44:58.000000000 +0100
-+++ calibre/src/calibre/translations/dynamic.py 2012-01-24 20:58:25.892606042 +0100
+--- calibre/src/calibre/translations/dynamic.py.orig    2012-01-13 05:32:13.000000000 +0100
++++ calibre/src/calibre/translations/dynamic.py 2012-01-17 09:37:53.594649557 +0100
 @@ -5,10 +5,10 @@
  __license__   = 'GPL v3'
  __copyright__ = '2008, Marshall T. Vandegrift <llasram at gmail.com>'
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/calibre/calibre-locales.patch?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list