summaryrefslogtreecommitdiff
path: root/odoo/tools/translate.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-28 15:36:23 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-28 15:52:00 +0200
commitcffd147cfd4767f57dc6deeb0a956361904e1b1b (patch)
tree8a5990635ca60e0f34fc59462ed694847714db5b /odoo/tools/translate.py
parente9350993ca0b81df17308766d7e26d458bc39520 (diff)
parenta20a31486cd0b99755f8e6c27281ac6ba4758b7a (diff)
[MERGE] forward port branch 11.0 up to a20a31486cd
Diffstat (limited to 'odoo/tools/translate.py')
-rw-r--r--odoo/tools/translate.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py
index cfa4cac05a3..424117c98a7 100644
--- a/odoo/tools/translate.py
+++ b/odoo/tools/translate.py
@@ -957,8 +957,11 @@ def trans_generate(lang, modules, cr):
extra_comments = extra_comments or []
if not module: return
src_file = open(fabsolutepath, 'rb')
+ options = {}
+ if extract_method == 'python':
+ options['encoding'] = 'UTF-8'
try:
- for extracted in extract.extract(extract_method, src_file, keywords=extract_keywords):
+ for extracted in extract.extract(extract_method, src_file, keywords=extract_keywords, options=options):
# Babel 0.9.6 yields lineno, message, comments
# Babel 1.3 yields lineno, message, comments, context
lineno, message, comments = extracted[:3]