#3832: i18n of application names in admin
-------------------------------+--------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian                
     Status:  closed           |            Component:  Admin interface       
    Version:  SVN              |           Resolution:  duplicate             
   Keywords:  admin i18n       |                Stage:  Design decision needed
  Has_patch:  1                |           Needs_docs:  0                     
Needs_tests:  0                |   Needs_better_patch:  0                     
-------------------------------+--------------------------------------------
Changes (by mtredinnick):

  * status:  new => closed
  * resolution:  => duplicate

Comment:

 This has come up before (#1668). The part you identify (doing the string
 exchange) is not the difficult part of this problem. The hard part is how
 to extract the application names in the first place. Somebody would need
 to modify the gettext extraction program to work out the application
 names. For a number of practical and security reasons, gettext should
 generally never ''run'' any code in the application, so you can't just
 import the modules and use Python introspection, unfortunately. You also
 can't expect everybody to have to write their module names out by hand:
 having an arbitrary technical phrase such as the module name translated
 isn't important enough to require that to be done by default.
 
 I suspect there are solutions to this problem (maybe using the Python
 compile function and bytecode inspection), but it's not a trivial fix.
 
 I'm going to close this as a dupe of #1668, but I wanted to explain what
 the real problem that has to be solved here is.
 
 By the way, if you want translation of specific model names to happen,
 write something like
 {{{
 #!python
     class Meta:
         verbose_name = _("SuperWidget")
         verbose_name_plural = _("SuperWidgets")
 }}}
 in your code.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3832#comment:2>
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