]> git.pld-linux.org Git - packages/calibre.git/commitdiff
- reverse
authorlisu <lisu@pld-linux.org>
Tue, 24 Jan 2012 20:21:18 +0000 (20:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    calibre-locales.patch -> 1.10

calibre-locales.patch

index a15bd92e63a87f0e2f0808436f4e0502c04d4eae..4476da566a5a5b21de020b316c2538878ac383dd 100644 (file)
@@ -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
 +        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',
 +                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@gmail.com>'
This page took 1.559887 seconds and 4 git commands to generate.