From 3d9ccef81d4ccdc314957b304fe61940282a3d2c Mon Sep 17 00:00:00 2001 From: Christophe Matthieu <chm@odoo.com> Date: Tue, 7 Jun 2016 14:15:49 +0200 Subject: [PATCH] [FIX] translate: doctype is removed from the backend web template issue: The rendering is altered because the browser doesn't know how to parse the html and css content --- openerp/tools/translate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index 3a8f9e6d63d7..dffeba6e24f5 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -243,8 +243,11 @@ class XMLTranslator(object): # process children nodes locally in child_trans child_trans = XMLTranslator(self.callback, self.method, parser=self.parser) - if node.text and not avoid_pattern.match(node.text): - child_trans.todo(escape(node.text)) + if node.text: + if avoid_pattern.match(node.text): + child_trans.done(escape(node.text)) # do not translate <!DOCTYPE... + else: + child_trans.todo(escape(node.text)) for child in node: child_trans.process(child) -- GitLab