Ticket #5519: 06-support-for-cs.diff

File 06-support-for-cs.diff, 4.2 KB (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)
  • django/contrib/admin/options.py

    === modified file 'django/contrib/admin/options.py'
     
    521521            inline_admin_formsets.append(inline_admin_formset)
    522522
    523523        c = template.RequestContext(request, {
    524             'title': _('Add %s') % uncapfirst(opts.verbose_name),
     524            'title': capfirst(_('Add %s') % uncapfirst(opts.verbose_name)),
    525525            'adminform': adminForm,
    526526            'is_popup': request.REQUEST.has_key('_popup'),
    527527            'media': media,
     
    596596            inline_admin_formsets.append(inline_admin_formset)
    597597
    598598        c = template.RequestContext(request, {
    599             'title': _('Change %s') % uncapfirst(opts.verbose_name),
     599            'title': capfirst(_('Change %s') % uncapfirst(opts.verbose_name)),
    600600            'adminform': adminForm,
    601601            'object_id': object_id,
    602602            'original': obj,
  • django/contrib/admin/templates/admin/change_list.html

    === modified file 'django/contrib/admin/templates/admin/change_list.html'
     
    1515<div id="content-main">
    1616{% block object-tools %}
    1717{% if has_add_permission %}
    18 <ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% blocktrans with cl.opts.verbose_name|uncapfirst|escape as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
     18<ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% filter capfirst %}{% blocktrans with cl.opts.verbose_name|uncapfirst|escape as name %}Add {{ name }}{% endblocktrans %}{% endfilter %}</a></li></ul>
    1919{% endif %}
    2020{% endblock %}
    2121<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
  • django/contrib/admin/templates/admin/pagination.html

    === modified file 'django/contrib/admin/templates/admin/pagination.html'
     
    77{% endfor %}
    88{% endif %}
    99{% ifequal cl.result_count 1 %}
    10         {% blocktrans with cl.result_count as count and cl.opts.verbose_name|uncapfirst|escape as verbose_name %}{{ count }} {{ verbose_name }}{% endblocktrans %}
     10        {% filter capfirst %}{% blocktrans with cl.result_count as count and cl.opts.verbose_name|uncapfirst|escape as verbose_name %}{{ count }} {{ verbose_name }}{% endblocktrans %}{% endfilter %}
    1111{% else %}
    12         {% blocktrans with cl.result_count as count and cl.opts.verbose_name_plural|uncapfirst|escape as verbose_name_plural %}{{ count }} {{ verbose_name_plural }}{% endblocktrans %}
     12        {% filter capfirst %}{% blocktrans with cl.result_count as count and cl.opts.verbose_name_plural|uncapfirst|escape as verbose_name_plural %}{{ count }} {{ verbose_name_plural }}{% endblocktrans %}{% endfilter %}
    1313{% endifequal %}
    1414{% if show_all_url %}&nbsp;&nbsp;<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
    1515</p>
  • django/contrib/admin/views/main.py

    === modified file 'django/contrib/admin/views/main.py'
     
    99from django.db.models.query import handle_legacy_orderlist, QuerySet
    1010from django.http import Http404
    1111from django.utils.encoding import force_unicode, smart_str
    12 from django.utils.text import uncapfirst
     12from django.utils.text import capfirst, uncapfirst
    1313from django.utils.translation import ugettext
    1414import operator
    1515
     
    147147        self.query = request.GET.get(SEARCH_VAR, '')
    148148        self.query_set = self.get_query_set()
    149149        self.get_results(request)
    150         self.title = (self.is_popup and ugettext('Select %s') % force_unicode(uncapfirst(self.opts.verbose_name)) or ugettext('Select %s to change') % force_unicode(uncapfirst(self.opts.verbose_name)))
     150        self.title = capfirst((self.is_popup and ugettext('Select %s') % force_unicode(uncapfirst(self.opts.verbose_name)) or ugettext('Select %s to change') % force_unicode(uncapfirst(self.opts.verbose_name))))
    151151        self.filter_specs, self.has_filters = self.get_filters(request)
    152152        self.pk_attname = self.lookup_opts.pk.attname
    153153
Back to Top