From 289b6046d63bb8d0c43fcd86f80945a5066357cf Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 20 Sep 2017 14:31:21 +0200 Subject: [PATCH] [FIX] tools: py3k export translations Previous code was converting the text to bytes which fails below AttributeError: 'int' object has no attribute 'isalpha' --- odoo/tools/translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index 308504be156..dddd7c936cb 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -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)