- 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):
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