#3804: Filter for translation instead of block
--------------------------------+-------------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  hugo                
  Status:  new                  |   Component:  Internationalization
 Version:  SVN                  |    Keywords:                      
   Stage:  Unreviewed           |   Has_patch:  0                   
--------------------------------+-------------------------------------------
 I suggest using filters for translation of strings instead of special
 blocks. This is much more flexible, so instead of {{{ {% filter title %}{%
 trans "add message" %}{% endfilter %} }}} you can get {{{ {{ "add
 message"|trans|title }} }}} The filter to do this is really simple:
 {{{
 def trans(value):
     return translation.gettext(value)
 register.filter('trans', trans)
 }}}
 
 The make-messages tool needs to be updated to handle this though.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3804>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to