From 0cb9a78df48fe33f1c65f026b888f13df96177ab Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 13 Sep 2014 01:24:21 -0400 Subject: [PATCH] Remove blind capitalization of messages --- mayan/apps/acls/classes.py | 3 +-- mayan/apps/acls/widgets.py | 3 +-- mayan/apps/linking/forms.py | 3 +-- mayan/apps/main/templates/main/base.html | 2 +- .../templates/main/calculate_form_title.html | 4 ++-- mayan/apps/main/templates/main/diagnostics.html | 4 ++-- mayan/apps/main/templates/main/generic_list.html | 2 +- .../templates/main/generic_list_horizontal.html | 2 +- .../generic_list_horizontal_subtemplate.html | 10 +++++----- .../templates/main/generic_list_subtemplate.html | 16 ++++++++-------- .../main/templates/main/generic_subtemplate.html | 6 +++--- .../main/templates/main/generic_template.html | 2 +- mayan/apps/main/templates/main/statistics.html | 2 +- mayan/apps/main/templates/main/tools.html | 4 ++-- mayan/apps/navigation/forms.py | 3 +-- .../templates/generic_link_instance.html | 4 ++-- mayan/apps/navigation/widgets.py | 3 +-- 17 files changed, 34 insertions(+), 39 deletions(-) diff --git a/mayan/apps/acls/classes.py b/mayan/apps/acls/classes.py index 18a8cb0d88..4ef806f9ed 100644 --- a/mayan/apps/acls/classes.py +++ b/mayan/apps/acls/classes.py @@ -7,7 +7,6 @@ import types from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db.models.base import ModelBase -from django.template.defaultfilters import capfirst from common.models import AnonymousUserSingleton @@ -111,7 +110,7 @@ class EncapsulatedObject(object): def __unicode__(self): if isinstance(self.source_object, ModelBase): - return capfirst(unicode(self.source_object._meta.verbose_name_plural)) + return unicode(self.source_object._meta.verbose_name_plural) elif self.ct_fullname == 'auth.user': return u'%s %s' % (self.source_object._meta.verbose_name, self.source_object.get_full_name()) elif self.ct_fullname == 'common.anonymoususersingleton': diff --git a/mayan/apps/acls/widgets.py b/mayan/apps/acls/widgets.py index 896d99611b..8da765f16f 100644 --- a/mayan/apps/acls/widgets.py +++ b/mayan/apps/acls/widgets.py @@ -3,7 +3,6 @@ from __future__ import absolute_import from django.utils.safestring import mark_safe from django.contrib.contenttypes.models import ContentType from django.db.models.base import ModelBase -from django.template.defaultfilters import capfirst from .literals import CONTENT_TYPE_ICON_MAP @@ -24,4 +23,4 @@ def object_w_content_type_icon(obj): else: label = unicode(obj) - return mark_safe('%s%s' % (content_type_icon(content_type), capfirst(label))) + return mark_safe('%s%s' % (content_type_icon(content_type), label)) diff --git a/mayan/apps/linking/forms.py b/mayan/apps/linking/forms.py index 2e72ce5bbd..9c74ded16e 100644 --- a/mayan/apps/linking/forms.py +++ b/mayan/apps/linking/forms.py @@ -2,7 +2,6 @@ from __future__ import absolute_import from django import forms from django.core.urlresolvers import reverse -from django.template.defaultfilters import capfirst from django.utils.safestring import mark_safe from django.utils.translation import ugettext @@ -37,7 +36,7 @@ class SmartLinkImageWidget(forms.widgets.Widget): ''' % { 'famfam': link.get('famfam', u'link'), - 'text': capfirst(link['text']), + 'text': link['text'], 'action': reverse(link.get('view'), args=[value['current_document'].pk, value['smart_link_instance'].pk]) }) output.append(u'') diff --git a/mayan/apps/main/templates/main/base.html b/mayan/apps/main/templates/main/base.html index 2e4fb61895..ac2e6b7d7d 100644 --- a/mayan/apps/main/templates/main/base.html +++ b/mayan/apps/main/templates/main/base.html @@ -182,7 +182,7 @@
{% csrf_token %}
diff --git a/mayan/apps/main/templates/main/calculate_form_title.html b/mayan/apps/main/templates/main/calculate_form_title.html index c92de4f10c..11f54c2e54 100644 --- a/mayan/apps/main/templates/main/calculate_form_title.html +++ b/mayan/apps/main/templates/main/calculate_form_title.html @@ -1,7 +1,7 @@ {% load i18n %} {% if title %} - {{ title|capfirst }} + {{ title }} {% else %} {% if read_only %} {% if object_name %} @@ -20,7 +20,7 @@ {% if object_name %} {% blocktrans %}Create new {{ object_name }}{% endblocktrans %} {% else %} - {% trans "Create" %} + {% trans 'Create' %} {% endif %} {% endif %} {% endif %} diff --git a/mayan/apps/main/templates/main/diagnostics.html b/mayan/apps/main/templates/main/diagnostics.html index 9c6ee810dc..6e323f3e26 100644 --- a/mayan/apps/main/templates/main/diagnostics.html +++ b/mayan/apps/main/templates/main/diagnostics.html @@ -1,11 +1,11 @@ {% extends 'main/base.html' %} -{% block title %} :: {{ title|capfirst }}{% endblock %} +{% block title %} :: {{ title }}{% endblock %} {% block content %} {% for key, value in blocks.items %}
-

{{ value.title|capfirst }}

+

{{ value.title }}

    diff --git a/mayan/apps/main/templates/main/generic_list.html b/mayan/apps/main/templates/main/generic_list.html index 2d53a9bdd6..e600033d71 100644 --- a/mayan/apps/main/templates/main/generic_list.html +++ b/mayan/apps/main/templates/main/generic_list.html @@ -5,7 +5,7 @@ {% load navigation_tags %} {% load subtemplates_tags %} -{% block title %} :: {% blocktrans with title as title %}List of {{ title }}{% endblocktrans %}{% endblock %} +{% block title %} :: {% include 'main/calculate_form_title.html' %}{% endblock %} {% block sidebar %} {% for subtemplate in sidebar_subtemplates_list %} diff --git a/mayan/apps/main/templates/main/generic_list_horizontal.html b/mayan/apps/main/templates/main/generic_list_horizontal.html index 4dbd5272f8..4695449a22 100644 --- a/mayan/apps/main/templates/main/generic_list_horizontal.html +++ b/mayan/apps/main/templates/main/generic_list_horizontal.html @@ -5,7 +5,7 @@ {% load navigation_tags %} {% load subtemplates_tags %} -{% block title %} :: {% blocktrans with title as title %}List of {{ title }}{% endblocktrans %}{% endblock %} +{% block title %} :: {% blocktrans with title as title %}{{ title }}{% endblocktrans %}{% endblock %} {% block sidebar %} {% for subtemplate in sidebar_subtemplates_list %} diff --git a/mayan/apps/main/templates/main/generic_list_horizontal_subtemplate.html b/mayan/apps/main/templates/main/generic_list_horizontal_subtemplate.html index 0badea4a53..b2305305a7 100644 --- a/mayan/apps/main/templates/main/generic_list_horizontal_subtemplate.html +++ b/mayan/apps/main/templates/main/generic_list_horizontal_subtemplate.html @@ -12,7 +12,7 @@ {% if side_bar %}

    - {{ title|capfirst }} + {{ title }}

    @@ -21,9 +21,9 @@

    {% ifnotequal page_obj.paginator.num_pages 1 %} - {% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}List of {{ title }} ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %} + {% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}{{ title }} ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %} {% else %} - {% blocktrans with page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ total }}){% endblocktrans %} + {% blocktrans with page_obj.paginator.object_list|length as total %}{{ title }} ({{ total }}){% endblocktrans %} {% endifnotequal %}

    @@ -37,7 +37,7 @@ @@ -75,7 +75,7 @@ diff --git a/mayan/apps/main/templates/main/generic_list_subtemplate.html b/mayan/apps/main/templates/main/generic_list_subtemplate.html index 37c3acc8e7..e97b4d048a 100644 --- a/mayan/apps/main/templates/main/generic_list_subtemplate.html +++ b/mayan/apps/main/templates/main/generic_list_subtemplate.html @@ -13,7 +13,7 @@ {% if side_bar %}

    - {{ title|capfirst }} + {{ title }}

    @@ -22,9 +22,9 @@

    {% ifnotequal page_obj.paginator.num_pages 1 %} - {% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}List of {{ title }} ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %} + {% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}{{ title }} ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %} {% else %} - {% blocktrans with page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ total }}){% endblocktrans %} + {% blocktrans with page_obj.paginator.object_list|length as total %}{{ title }} ({{ total }}){% endblocktrans %} {% endifnotequal %}

    @@ -40,7 +40,7 @@ @@ -74,15 +74,15 @@ {% endif %} {% for column in extra_columns_preffixed %} - {{ column.name|capfirst }} + {{ column.name }} {% endfor %} {% for column in object_list.0|get_model_list_columns %} - {{ column.name|capfirst }} + {{ column.name }} {% endfor %} {% for column in extra_columns %} - {{ column.name|capfirst }} + {{ column.name }} {% endfor %} {% if not hide_links %} @@ -160,7 +160,7 @@ diff --git a/mayan/apps/main/templates/main/generic_subtemplate.html b/mayan/apps/main/templates/main/generic_subtemplate.html index 4a6257639d..3320b8d6d9 100644 --- a/mayan/apps/main/templates/main/generic_subtemplate.html +++ b/mayan/apps/main/templates/main/generic_subtemplate.html @@ -1,10 +1,10 @@ {% if side_bar %}
    -

    {{ title|capfirst }}

    +

    {{ title }}

    {% else %} -
    -

    {{ title|capfirst }}

    +
    +

    {{ title }}

    {% endif %} diff --git a/mayan/apps/main/templates/main/generic_template.html b/mayan/apps/main/templates/main/generic_template.html index 7d042dd647..2b0820d149 100644 --- a/mayan/apps/main/templates/main/generic_template.html +++ b/mayan/apps/main/templates/main/generic_template.html @@ -1,6 +1,6 @@ {% extends 'main/base.html' %} -{% block title %} :: {{ title|capfirst }}{% endblock %} +{% block title %} :: {{ title }}{% endblock %} {% block content %} {% include 'main/generic_subtemplate.html' %} diff --git a/mayan/apps/main/templates/main/statistics.html b/mayan/apps/main/templates/main/statistics.html index a74991d088..ce3633075a 100644 --- a/mayan/apps/main/templates/main/statistics.html +++ b/mayan/apps/main/templates/main/statistics.html @@ -1,6 +1,6 @@ {% extends 'main/base.html' %} -{% block title %} :: {{ title|capfirst }}{% endblock %} +{% block title %} :: {{ title }}{% endblock %} {% block content %} {% for block in blocks %} diff --git a/mayan/apps/main/templates/main/tools.html b/mayan/apps/main/templates/main/tools.html index 1c970f4ecd..26f0c2d4a9 100644 --- a/mayan/apps/main/templates/main/tools.html +++ b/mayan/apps/main/templates/main/tools.html @@ -1,11 +1,11 @@ {% extends 'main/base.html' %} -{% block title %} :: {{ title|capfirst }}{% endblock %} +{% block title %} :: {{ title }}{% endblock %} {% block content %} {% for key, value in blocks.items %}
    -

    {{ value.title|capfirst }}

    +

    {{ value.title }}