#23323: Allow the use of translation.override as a decorator
------------------------------+--------------------
     Reporter:  tchaumeny     |      Owner:  nobody
         Type:  New feature   |     Status:  new
    Component:  Translations  |    Version:  master
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  1
Easy pickings:  0             |      UI/UX:  0
------------------------------+--------------------
 I think it would be nice if `translation.override` could be used as a
 decorator.

 Although a comment in
 https://code.djangoproject.com/ticket/16690#comment:2 suggested this was
 not useful, I have experienced several cases where it is. For instance, I
 have some functions which are sending mail and I want those mails to be
 translated in some default language which is not the one of the user doing
 the action. Having the function decorated is better in terms of
 readability than a long `with` statement which introduces heavy
 indentation.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23323>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.27e9084c6aab157e5ba1bdd42c020973%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to