From 9ae6fdac9d8edc4db03eaa19be3af2139611b7fd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Jun 2023 12:22:52 +0530 Subject: [PATCH] Fix changelog translations for a language not being used unless more than 50% of the changelog is translated into that language. Fixes #2024278 [[Enhancement] Untranslated text on the homepage](https://bugs.launchpad.net/calibre/+bug/2024278) --- setup/translations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/translations.py b/setup/translations.py index c764ff4ad7..1ac70bf943 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -597,7 +597,7 @@ class Translations(POT): # {{{ self.compile_group(files, handle_stats=handle_stats) for locale, translated in iteritems(stats): - if translated >= 50: + if translated >= threshold: with open(os.path.join(tdir, locale + '.mo'), 'rb') as f: raw = f.read() zi = ZipInfo(os.path.basename(f.name)) @@ -627,7 +627,7 @@ class Translations(POT): # {{{ f.write(data) def compile_changelog_translations(self): - self._compile_website_translations('changelog', 0) + self._compile_website_translations('changelog', threshold=0) def compile_user_manual_translations(self): self.info('Compiling user manual translations...')