[FIX] tools: py3k export translations

Previous code was converting the text to bytes which fails below

AttributeError: 'int' object has no attribute 'isalpha'
This commit is contained in:
Martin Trigaux
2017-09-20 16:13:37 +02:00
parent 08316eb455
commit 289b6046d6
+1 -1
View File
@@ -730,7 +730,7 @@ def trans_parse_rml(de):
def _push(callback, term, source_line):
""" Sanity check before pushing translation terms """
term = (term or "").strip().encode('utf8')
term = (term or "").strip()
# Avoid non-char tokens like ':' '...' '.00' etc.
if len(term) > 8 or any(x.isalpha() for x in term):
callback(term, source_line)