From e0c1de3ef409cfe0c427ab9a0b6b87c51137f8ee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 5 Jan 2018 12:14:20 +0530 Subject: [PATCH] Fix internal msgfmt implementation ignoring the empty msg --- src/calibre/translations/msgfmt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/translations/msgfmt.py b/src/calibre/translations/msgfmt.py index d52d1c9788..da6b4ba964 100644 --- a/src/calibre/translations/msgfmt.py +++ b/src/calibre/translations/msgfmt.py @@ -46,13 +46,13 @@ def usage(code, msg=''): def add(id, str, fuzzy): "Add a non-fuzzy translation to the dictionary." global MESSAGES - if not id: - return if not fuzzy and str: MESSAGES[id] = str - STATS['translated'] += 1 + if id: + STATS['translated'] += 1 else: - STATS['untranslated'] += 1 + if id: + STATS['untranslated'] += 1 def generate():