mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a209713677
commit
9f02e0a91c
@ -47,17 +47,17 @@ def usage(code, msg=''):
|
|||||||
sys.exit(code)
|
sys.exit(code)
|
||||||
|
|
||||||
|
|
||||||
def add(ctxt, id, str, fuzzy):
|
def add(ctxt, msgid, msgstr, fuzzy):
|
||||||
"Add a non-fuzzy translation to the dictionary."
|
"Add a non-fuzzy translation to the dictionary."
|
||||||
if (not fuzzy or not id) and str:
|
if (not fuzzy or not msgid) and msgstr:
|
||||||
if id:
|
if msgid:
|
||||||
STATS['translated'] += 1
|
STATS['translated'] += 1
|
||||||
if ctxt is None:
|
if ctxt is None:
|
||||||
MESSAGES[id] = str
|
MESSAGES[msgid] = msgstr
|
||||||
else:
|
else:
|
||||||
MESSAGES[b"%b\x04%b" % (ctxt, id)] = str
|
MESSAGES[b"%b\x04%b" % (ctxt, msgid)] = msgstr
|
||||||
else:
|
else:
|
||||||
if id:
|
if msgid:
|
||||||
STATS['untranslated'] += 1
|
STATS['untranslated'] += 1
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user