#5373: Field label for a ForeignKey not translated
------------------------------------------------------------------------+---
          Reporter:  Szilveszter Farkas <[EMAIL PROTECTED]>  |         Owner:  
mk                         
            Status:  assigned                                           |     
Milestone:                             
         Component:  Internationalization                               |       
Version:  SVN                        
        Resolution:                                                     |      
Keywords:  i18n foreignkey field label
             Stage:  Accepted                                           |     
Has_patch:  1                          
        Needs_docs:  0                                                  |   
Needs_tests:  0                          
Needs_better_patch:  0                                                  |  
------------------------------------------------------------------------+---
Changes (by mk):

  * owner:  nobody => mk
  * status:  new => assigned
  * has_patch:  0 => 1

Comment:

 Analysis:

 The self.verbose_name of the Category ForeignKey field gets set in
 django/db/models/fields/__init__.py in set_attributes_from_name (around
 line 190)

 Later, when set_attributes_from_rel from
 django/db/models/fields/related.py is run, self.verbose_name always has a
 value and therefore, the value if self.rel.to._meta.verbose_name is never
 taken into account.

 The attached patch fixes this behavior by not assigning a value to
 self.verbose_name in set_attributes_from_name for RelatedField instances.

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