From ffbd1ff062f502812d1d8a2ca375c88dad17ee15 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 23 Sep 2022 07:30:06 +0000 Subject: [PATCH] [IMP] tools: do not export attribute content Nodes like () => state.dropzoneVisible = true should not be exported in the translations files but Hello World should be kept It was already the case in the xml processing method for server side templates. Since 16.0, client side QWeb views also use the same inheritance mechanism than the one on the server side so the exception needs to be replicated. X-original-commit: e05d1192481935b2cd7aae7e939f98e60e002899 Part-of: odoo/odoo#101053 --- odoo/tools/translate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index 95442a9fd01..811c5abf046 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -849,6 +849,7 @@ def _extract_translatable_qweb_terms(element, callback): if (el.tag.lower() not in SKIPPED_ELEMENTS and "t-js" not in el.attrib and not ("t-jquery" in el.attrib and "t-operation" not in el.attrib) + and not (node.tag == 'attribute' and el.get('name') not in TRANSLATED_ATTRS) and el.get("t-translation", '').strip() != "off"): _push(callback, el.text, el.sourceline)