Fixed #8543: added translation markings to can_delete and can_order form labels. Thanks, msaelices.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8562 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6a5cc9e7f6
commit
4df380ff01
|
@ -1,6 +1,7 @@
|
|||
from forms import Form
|
||||
from django.utils.encoding import StrAndUnicode
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import ugettext as _
|
||||
from fields import IntegerField, BooleanField
|
||||
from widgets import Media, HiddenInput
|
||||
from util import ErrorList, ValidationError
|
||||
|
@ -238,11 +239,11 @@ class BaseFormSet(StrAndUnicode):
|
|||
if self.can_order:
|
||||
# Only pre-fill the ordering field for initial forms.
|
||||
if index < self._initial_form_count:
|
||||
form.fields[ORDERING_FIELD_NAME] = IntegerField(label='Order', initial=index+1, required=False)
|
||||
form.fields[ORDERING_FIELD_NAME] = IntegerField(label=_(u'Order'), initial=index+1, required=False)
|
||||
else:
|
||||
form.fields[ORDERING_FIELD_NAME] = IntegerField(label='Order', required=False)
|
||||
form.fields[ORDERING_FIELD_NAME] = IntegerField(label=_(u'Order'), required=False)
|
||||
if self.can_delete:
|
||||
form.fields[DELETION_FIELD_NAME] = BooleanField(label='Delete', required=False)
|
||||
form.fields[DELETION_FIELD_NAME] = BooleanField(label=_(u'Delete'), required=False)
|
||||
|
||||
def add_prefix(self, index):
|
||||
return '%s-%s' % (self.prefix, index)
|
||||
|
|
Loading…
Reference in New Issue