From 4a3c9ca32f05aa044346f92cdda6901364692695 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Mar 2019 18:38:32 +0530 Subject: [PATCH] py3: Fix checking of iso639 translations --- setup/translations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/translations.py b/setup/translations.py index 202264170a..9aed3bcccd 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -430,6 +430,8 @@ class Translations(POT): # {{{ 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)