[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. X-original-commit: e05d1192481935b2cd7aae7e939f98e60e002899 Part-of: odoo/odoo#101053
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user