Skip to content
Snippets Groups Projects
Commit e05d1192 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[IMP] tools: do not export attribute content

Nodes like
<attribute name="t-on-dragenter.stop.prevent">() => state.dropzoneVisible = true</attribute>
should not be exported in the translations files but
<attribute name="string">Hello World</attribute>
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.

Part-of: odoo/odoo#100958
parent 21f8237f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment