From 9f02e0a91cb3b04bd61d8647b484576a95768965 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Jul 2023 15:06:57 +0530 Subject: [PATCH] ... --- src/calibre/translations/msgfmt.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/calibre/translations/msgfmt.py b/src/calibre/translations/msgfmt.py index 332699bc5c..6422e75762 100644 --- a/src/calibre/translations/msgfmt.py +++ b/src/calibre/translations/msgfmt.py @@ -47,17 +47,17 @@ def usage(code, msg=''): sys.exit(code) -def add(ctxt, id, str, fuzzy): +def add(ctxt, msgid, msgstr, fuzzy): "Add a non-fuzzy translation to the dictionary." - if (not fuzzy or not id) and str: - if id: + if (not fuzzy or not msgid) and msgstr: + if msgid: STATS['translated'] += 1 if ctxt is None: - MESSAGES[id] = str + MESSAGES[msgid] = msgstr else: - MESSAGES[b"%b\x04%b" % (ctxt, id)] = str + MESSAGES[b"%b\x04%b" % (ctxt, msgid)] = msgstr else: - if id: + if msgid: STATS['untranslated'] += 1