[FIX] tools: do not export slot params for translation

Slot params are dynamic content, similar to props, and are not
translated.

There is no point in adding untranslated content to the .pot files; so
this commit prevents the content of slot params from being exported for
translation.

Task-3718993.

closes odoo/odoo#152606

X-original-commit: b839faf09be259ffdccf9d872e646e4ebe4a8bcb
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit is contained in:
Louis (wil)
2024-02-03 11:02:11 +00:00
parent 31df8066ba
commit 8d0a400d86
+1 -1
View File
@@ -943,7 +943,7 @@ def _extract_translatable_qweb_terms(element, callback):
# them all lower case.
# https://www.w3schools.com/html/html5_syntax.asp
# https://github.com/odoo/owl/blob/master/doc/reference/component.md#composition
if not el.tag[0].isupper() and 't-component' not in el.attrib:
if not el.tag[0].isupper() and 't-component' not in el.attrib and 't-set-slot' not in el.attrib:
for att in ('title', 'alt', 'label', 'placeholder', 'aria-label'):
if att in el.attrib:
_push(callback, el.attrib[att], el.sourceline)