summaryrefslogtreecommitdiff
path: root/odoo/tools/translate.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
committerChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
commit71a50a2214748fec413c5a0f042d0e7172ae6ea9 (patch)
tree2e9ee11551350e23923390d9c53baf630b6ed834 /odoo/tools/translate.py
parenta7621137cb0d75ec545152d5e1d413c9d3548e45 (diff)
parent409679866b2ee8352a8cb27460e7332563526924 (diff)
[MERGE] forward port branch saas-12.3 up to 409679866b2
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 160cce4f6e4..9dfd9ec09e0 100644
--- a/odoo/tools/translate.py
+++ b/odoo/tools/translate.py
@@ -984,8 +984,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]