mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-27 21:22:58 +02:00
py3: Fix checking of iso639 translations
This commit is contained in:
parent
e73dbb0f99
commit
4a3c9ca32f
1 changed files with 2 additions and 0 deletions
|
|
@ -430,6 +430,8 @@ def check_iso639(self, raw, path):
|
|||
rmap = {}
|
||||
msgid = None
|
||||
has_errors = False
|
||||
if isinstance(raw, bytes):
|
||||
raw = raw.decode('utf-8')
|
||||
for match in re.finditer(r'^(msgid|msgstr)\s+"(.*?)"', raw, re.M):
|
||||
if match.group(1) == 'msgid':
|
||||
msgid = match.group(2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue