Ticket #12359: help_text_r12827.diff
File help_text_r12827.diff, 2.2 KB (added by , 15 years ago) |
---|
-
django/db/models/fields/related.py
8 8 from django.db.models.query import QuerySet 9 9 from django.db.models.query_utils import QueryWrapper 10 10 from django.utils.encoding import smart_unicode 11 from django.utils.translation import ugettext_lazy as _, string_concat,ungettext, ugettext11 from django.utils.translation import ugettext_lazy as _, ungettext, ugettext 12 12 from django.utils.functional import curry 13 13 from django.core import exceptions 14 14 from django import forms … … 956 956 957 957 Field.__init__(self, **kwargs) 958 958 959 msg = _('Hold down "Control", or "Command" on a Mac, to select more than one.')960 self.help_text = string_concat(self.help_text, ' ', msg)961 962 959 def get_choices_default(self): 963 960 return Field.get_choices(self, include_blank=False) 964 961 -
django/contrib/admin/options.py
21 21 from django.utils.functional import curry 22 22 from django.utils.text import capfirst, get_text_list 23 23 from django.utils.translation import ugettext as _ 24 from django.utils.translation import ungettext, ugettext_lazy 24 from django.utils.translation import ungettext, ugettext_lazy, string_concat 25 25 from django.utils.encoding import force_unicode 26 26 try: 27 27 set … … 54 54 models.FileField: {'widget': widgets.AdminFileWidget}, 55 55 } 56 56 57 SELECT_MULTIPLE_MSG = _('Hold down "Control", or "Command" on a Mac, to select more than one.') 58 57 59 csrf_protect_m = method_decorator(csrf_protect) 58 60 59 61 class BaseModelAdmin(object): … … 172 174 elif db_field.name in (list(self.filter_vertical) + list(self.filter_horizontal)): 173 175 kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in self.filter_vertical)) 174 176 177 kwargs['help_text'] = string_concat(kwargs.get('help_text', ''), ' ', SELECT_MULTIPLE_MSG) 175 178 return db_field.formfield(**kwargs) 176 179 177 180 def _declared_fieldsets(self):