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

File 01-support-for-cs.diff, 3.9 KB (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)

new version - after autoescape merge (depends only on #5425 now)

  • django/contrib/admin/options.py

    === modified file 'django/contrib/admin/options.py'
     
    518518            inline_admin_formsets.append(inline_admin_formset)
    519519
    520520        c = template.RequestContext(request, {
    521             'title': _('Add %s') % opts.verbose_name,
     521            'title': capfirst(_('Add %s') % opts.verbose_name),
    522522            'adminform': adminForm,
    523523            'is_popup': request.REQUEST.has_key('_popup'),
    524524            'show_delete': False,
     
    592592            inline_admin_formsets.append(inline_admin_formset)
    593593
    594594        c = template.RequestContext(request, {
    595             'title': _('Change %s') % opts.verbose_name,
     595            'title': capfirst(_('Change %s') % opts.verbose_name),
    596596            'adminform': adminForm,
    597597            'object_id': object_id,
    598598            '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|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|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 as verbose_name %}{{ count }} {{ verbose_name }}{% endblocktrans %}
     10        {% filter capfirst %}{% blocktrans with cl.result_count as count and cl.opts.verbose_name as verbose_name %}{{ count }} {{ verbose_name }}{% endblocktrans %}{% endfilter %}
    1111{% else %}
    12         {% blocktrans with cl.result_count as count and cl.opts.verbose_name_plural 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 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'
     
    1010from django.http import Http404
    1111from django.utils.encoding import force_unicode, smart_str
    1212from django.utils.translation import ugettext
     13from django.utils.text import capfirst
    1314import operator
    1415
    1516try:
     
    146147        self.query = request.GET.get(SEARCH_VAR, '')
    147148        self.query_set = self.get_query_set()
    148149        self.get_results(request)
    149         self.title = (self.is_popup and ugettext('Select %s') % force_unicode(self.opts.verbose_name) or ugettext('Select %s to change') % force_unicode(self.opts.verbose_name))
     150        self.title = capfirst((self.is_popup and ugettext('Select %s') % force_unicode(self.opts.verbose_name) or ugettext('Select %s to change') % force_unicode(self.opts.verbose_name)))
    150151        self.filter_specs, self.has_filters = self.get_filters(request)
    151152        self.pk_attname = self.lookup_opts.pk.attname
    152153
Back to Top