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

[ADD] tools: lazy translation method

Introduces the method _lt

The translation method is now evaluated lazily.
It allows to declare global variables with translatable content

e.g. this code will now work:

LABEL = _lt("User")

def _compute_label(self):
    context = {'lang': self.partner_id.lang}
    self.user_label = LABEL
parent 0fc9a97d
No related branches found
No related tags found
No related merge requests found
Loading
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