]> git.pld-linux.org Git - packages/calibre.git/commitdiff
- up to 6.23.0 master auto/th/calibre-6.23.0-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 29 Jul 2023 12:55:52 +0000 (14:55 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 29 Jul 2023 12:55:52 +0000 (14:55 +0200)
calibre-locales.patch
calibre.spec

index 9c4f74c74bf553a4b0f46e3174b9d8223136b406..f95f78472b7150dedb6f0cd5ddbe47ee433fb700 100644 (file)
@@ -16,8 +16,8 @@ diff -urNp -x '*.orig' calibre-4.20.0.org/setup/translations.py calibre-4.20.0/s
          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'
@@ -38,7 +38,7 @@ diff -urNp -x '*.orig' calibre-4.20.0.org/src/calibre/translations/dynamic.py ca
      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'))
@@ -90,7 +90,7 @@ diff -urNp -x '*.orig' calibre-4.20.0.org/src/calibre/utils/localization.py cali
 +    return None
  
  
- _lang_trans = None
+ _lang_trans = _country_trans = None
  
  
  def get_all_translators():
@@ -130,7 +130,7 @@ diff -urNp -x '*.orig' calibre-4.20.0.org/src/calibre/utils/localization.py cali
  
  
  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:
@@ -152,6 +152,12 @@ diff -urNp -x '*.orig' calibre-4.20.0.org/src/calibre/utils/localization.py cali
 +                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:
index 57b7436f29bcb4504b00058a5f1d0fcd396fddbc..c30ac7162c2a181db49a2489071fb2259a2c5788 100644 (file)
 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
@@ -246,6 +246,11 @@ for file in $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/iso639.mo; do
        %{__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
This page took 0.078636 seconds and 4 git commands to generate.