Files
odoo_source/odoo/tools
Martin Trigaux 0a1abb5e45 [IMP] tools: allow to use Markup and gettext
Before this commit escape was needed to use a Markup object as a
parameter, hence loosing the fallback mechanism in translations

>>> escape(_("Order %s has been confirmed")) % Markup("<a>%s</a>") % order.name
Markup("Order <a>SO42</a> has been confirmed")

Now it is possible to explictly give a Markup object to the gettext call

>>> _("Order %s has been confirmed", Markup("<a>%s</a>") % order.name)
Markup("Order <a>SO42</a> has been confirmed")

Part-of: odoo/odoo#139316
2023-10-24 21:09:58 +00:00
..
…
…
2022-11-17 13:57:35 +01:00
…
…