Clarified i18n docs concerning verbose_name and verbose_name_plural - fixes #7102

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Simon Willison 2008-09-11 02:32:59 +00:00
parent cfcfc456e9
commit b0da050b83
1 changed files with 5 additions and 4 deletions

View File

@ -184,10 +184,11 @@ If you don't like the verbose name ``ugettext_lazy``, you can just alias it as
class MyThing(models.Model): class MyThing(models.Model):
name = models.CharField(help_text=_('This is the help text')) name = models.CharField(help_text=_('This is the help text'))
Always use lazy translations in :ref:`Django models <topics-db-models>`. It's a Always use lazy translations in :ref:`Django models <topics-db-models>`.
good idea to add translations for the field names and table names, too. This Field names and table names should be marked for translation or else they
means writing explicit ``verbose_name`` and ``verbose_name_plural`` options in will not be translated in the admin interface. This means writing explicit
the ``Meta`` class, though:: ``verbose_name`` and ``verbose_name_plural`` options in the ``Meta`` class,
though::
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _