Skip to content

Commit 9461867

Browse files
committed
improve readability in check_translation_is_pending
1 parent 1915095 commit 9461867

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/create_issue.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ def check_issue_not_already_existing(self, pofilename):
6666

6767
@staticmethod
6868
def check_translation_is_pending(pofile):
69-
if pofile.fuzzy == 0 and any([
70-
pofile.translated == pofile.entries,
71-
pofile.untranslated == 0,
72-
]):
69+
no_fuzzy_translations = pofile.fuzzy == 0
70+
translated_match_all_entries = pofile.translated == pofile.entries
71+
no_untranslated_entries_left = pofile.untranslated == 0
72+
73+
if no_fuzzy_translations and (translated_match_all_entries or no_untranslated_entries_left):
7374
print(f'Skipping {pofile.filename}. The file is 100% translated already.')
7475
raise PoFileAlreadyTranslated
7576

0 commit comments

Comments
 (0)