]> git.pld-linux.org Git - packages/calibre.git/commitdiff
- up to 3.46.0 auto/th/calibre-3.46.0-1
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 24 Jul 2019 17:57:49 +0000 (01:57 +0800)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 24 Jul 2019 17:57:49 +0000 (01:57 +0800)
calibre-locales.patch
calibre.spec

index 761389c625976b6fea477ded4f6f4258595e4405..01b6084bd402482b6f3025070fe96b6991d36343 100644 (file)
@@ -55,7 +55,7 @@
 -                allow_user_override=False), 'r') as zf:
 -                try:
 -                    buf = io.BytesIO(zf.read(mpath + '/messages.mo'))
--                except:
+-                except Exception:
 -                    pass
 -                else:
 -                    trans = GNUTranslations(buf)
  
  lcdata = {
      u'abday': (u'Sun', u'Mon', u'Tue', u'Wed', u'Thu', u'Fri', u'Sat'),
-@@ -134,10 +134,11 @@
+@@ -134,20 +134,11 @@
  
  
  def get_single_translator(mpath, which='messages'):
 -    from zipfile import ZipFile
 -    with ZipFile(P('localization/locales.zip', allow_user_override=False), 'r') as zf:
--        buf = io.BytesIO(zf.read(mpath + '/%s.mo' % which))
-+    try:
-+        buf = open(os.path.join(mpath, '/%s.mo' % which), 'rb')
-         return GNUTranslations(buf)
-+    except:
-+        pass  # No translations for this lang
+-        path = '{}/{}.mo'.format(mpath, which)
+-        data = zf.read(path)
+-        buf = io.BytesIO(data)
+         try:
++            buf = open(os.path.join(mpath, '/%s.mo' % which), 'rb')
+             return GNUTranslations(buf)
+         except Exception as e:
+-            import traceback
+-            traceback.print_exc()
+-            import hashlib
+-            sig = hashlib.sha1(data).hexdigest()
+-            raise ValueError('Failed to load translations for: {} (size: {} and signature: {}) with error: {}'.format(
+-                path, len(data), sig, e))
++            pass  # No translations for this lang
  
  
  def get_iso639_translator(lang):
index ccfe00e9ebf5e63e4a10e3f6c3a0791935136104..950e79810f09a83296d231426e1b7eb6b40b89d1 100644 (file)
 Summary:       E-book converter and library management
 Summary(pl.UTF-8):     Konwerter oraz biblioteka dla e-booków
 Name:          calibre
-Version:       3.44.0
-Release:       2
+Version:       3.46.0
+Release:       1
 License:       GPL v3+
 Group:         Applications/Multimedia
 Source0:       %{name}-%{version}-nofonts.tar.xz
-# Source0-md5: 306d559dc5c4bc4c8191ce3004a6137e
+# Source0-md5: 0a0d0a1805f5d7d738b345a847ac3fd0
 Source1:       generate-tarball.sh
 Source2:       %{name}-mount-helper
 Patch0:                %{name}-prefix.patch
This page took 0.028562 seconds and 4 git commands to generate.