self.compile_website_translations()
self.compile_changelog_translations()
@@ -539,15 +538,6 @@ class Translations(POT): # {{{
- rmap[msgstr] = msgid
- return not has_errors
+ zi.compress_type = ZIP_STORED if is_ci else ZIP_DEFLATED
+ zf.writestr(zi, raw)
- def freeze_locales(self):
- zf = self.DEST + '.zip'
else:
mpath = get_lc_messages_path(lang)
if mpath is not None:
-- with ZipFile(P('localization/locales.zip',
+- with ZipFile(get_path('localization/locales.zip',
- allow_user_override=False), 'r') as zf:
- try:
- buf = io.BytesIO(zf.read(mpath + '/messages.mo'))
+ return None
- _lang_trans = None
+ _lang_trans = _country_trans = None
def get_all_translators():
def get_iso639_translator(lang):
-@@ -219,22 +210,21 @@ def translator_for_lang(lang):
+@@ -219,27 +210,25 @@ def translator_for_lang(lang):
buf = load_po(mpath + '.po')
if mpath is not None:
+ iso639 = open(os.path.join(mpath, 'calibre_iso639.mo'), 'rb')
except:
pass # No iso639 translations for this lang
+- isof = mpath + '/iso3166.mo'
+ try:
+- iso3166 = io.BytesIO(zf.read(isof))
++ iso3166 = open(os.path.join(mpath, 'calibre_iso3166.mo'), 'rb')
+ except:
+ pass # No iso3166 translations for this lang
if buf is not None:
from calibre.utils.serialize import msgpack_loads
try:
Summary: E-book converter and library management
Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
Name: calibre
-Version: 6.10.0
-Release: 4
+Version: 6.23.0
+Release: 1
License: GPL v3+
Group: Applications/Multimedia
Source0: %{name}-%{version}-nofonts.tar.xz
-# Source0-md5: f35bd1a5f0096413b0ccb3924754b340
+# Source0-md5: e0a8b9d98f888d1996e3a594edf13cb5
Source1: generate-tarball.sh
Source2: %{name}-mount-helper
Patch0: %{name}-prefix.patch
%{__mv} $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/iso639.mo \
$RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/%{name}_iso639.mo
done;
+for file in $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/iso3166.mo; do
+ lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
+ %{__mv} $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/iso3166.mo \
+ $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/%{name}_iso3166.mo
+done;
%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{km_KH,km}
# duplicates of bn,sl