Remove blind capitalization of messages

This commit is contained in:
Roberto Rosario
2014-09-13 01:24:21 -04:00
parent 3a4b983f9d
commit 0cb9a78df4
17 changed files with 34 additions and 39 deletions

View File

@@ -7,7 +7,6 @@ import types
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.db.models.base import ModelBase from django.db.models.base import ModelBase
from django.template.defaultfilters import capfirst
from common.models import AnonymousUserSingleton from common.models import AnonymousUserSingleton
@@ -111,7 +110,7 @@ class EncapsulatedObject(object):
def __unicode__(self): def __unicode__(self):
if isinstance(self.source_object, ModelBase): 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': elif self.ct_fullname == 'auth.user':
return u'%s %s' % (self.source_object._meta.verbose_name, self.source_object.get_full_name()) return u'%s %s' % (self.source_object._meta.verbose_name, self.source_object.get_full_name())
elif self.ct_fullname == 'common.anonymoususersingleton': elif self.ct_fullname == 'common.anonymoususersingleton':

View File

@@ -3,7 +3,6 @@ from __future__ import absolute_import
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.db.models.base import ModelBase from django.db.models.base import ModelBase
from django.template.defaultfilters import capfirst
from .literals import CONTENT_TYPE_ICON_MAP from .literals import CONTENT_TYPE_ICON_MAP
@@ -24,4 +23,4 @@ def object_w_content_type_icon(obj):
else: else:
label = unicode(obj) label = unicode(obj)
return mark_safe('%s<span>%s</span>' % (content_type_icon(content_type), capfirst(label))) return mark_safe('%s<span>%s</span>' % (content_type_icon(content_type), label))

View File

@@ -2,7 +2,6 @@ from __future__ import absolute_import
from django import forms from django import forms
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.template.defaultfilters import capfirst
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import ugettext from django.utils.translation import ugettext
@@ -37,7 +36,7 @@ class SmartLinkImageWidget(forms.widgets.Widget):
</button> </button>
''' % { ''' % {
'famfam': link.get('famfam', u'link'), '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]) 'action': reverse(link.get('view'), args=[value['current_document'].pk, value['smart_link_instance'].pk])
}) })
output.append(u'</div>') output.append(u'</div>')

View File

@@ -182,7 +182,7 @@
<form action="{% url 'common:set_language' %}" method="post">{% csrf_token %} <form action="{% url 'common:set_language' %}" method="post">{% csrf_token %}
<select name="language" onchange="this.form.submit()"> <select name="language" onchange="this.form.submit()">
{% for lang in LANGUAGES %} {% for lang in LANGUAGES %}
<option value="{{ lang.0 }}" {% if lang.0 == LANGUAGE_CODE %}selected="selected"{% endif %}>{{ lang.0|language_name_local|capfirst }}</option> <option value="{{ lang.0 }}" {% if lang.0 == LANGUAGE_CODE %}selected="selected"{% endif %}>{{ lang.0|language_name_local }}</option>
{% endfor %} {% endfor %}
</select> </select>
</form> </form>

View File

@@ -1,7 +1,7 @@
{% load i18n %} {% load i18n %}
{% if title %} {% if title %}
{{ title|capfirst }} {{ title }}
{% else %} {% else %}
{% if read_only %} {% if read_only %}
{% if object_name %} {% if object_name %}
@@ -20,7 +20,7 @@
{% if object_name %} {% if object_name %}
{% blocktrans %}Create new {{ object_name }}{% endblocktrans %} {% blocktrans %}Create new {{ object_name }}{% endblocktrans %}
{% else %} {% else %}
{% trans "Create" %} {% trans 'Create' %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@@ -1,11 +1,11 @@
{% extends 'main/base.html' %} {% extends 'main/base.html' %}
{% block title %} :: {{ title|capfirst }}{% endblock %} {% block title %} :: {{ title }}{% endblock %}
{% block content %} {% block content %}
{% for key, value in blocks.items %} {% for key, value in blocks.items %}
<div class="content"> <div class="content">
<h2 class="title">{{ value.title|capfirst }}</h2> <h2 class="title">{{ value.title }}</h2>
<div class="inner"> <div class="inner">
<p> <p>
<ul class="undecorated_list"> <ul class="undecorated_list">

View File

@@ -5,7 +5,7 @@
{% load navigation_tags %} {% load navigation_tags %}
{% load subtemplates_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 %} {% block sidebar %}
{% for subtemplate in sidebar_subtemplates_list %} {% for subtemplate in sidebar_subtemplates_list %}

View File

@@ -5,7 +5,7 @@
{% load navigation_tags %} {% load navigation_tags %}
{% load subtemplates_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 %} {% block sidebar %}
{% for subtemplate in sidebar_subtemplates_list %} {% for subtemplate in sidebar_subtemplates_list %}

View File

@@ -12,7 +12,7 @@
{% if side_bar %} {% if side_bar %}
<div class="block"> <div class="block">
<h3> <h3>
{{ title|capfirst }} {{ title }}
</h3> </h3>
<div class="content"> <div class="content">
<p> <p>
@@ -21,9 +21,9 @@
<div class="content"> <div class="content">
<h2 class="title"> <h2 class="title">
{% ifnotequal page_obj.paginator.num_pages 1 %} {% 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 %} {% 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 %} {% endifnotequal %}
</h2> </h2>
@@ -37,7 +37,7 @@
<div class="group navform wat-cf"> <div class="group navform wat-cf">
{% for link in multi_item_links %} {% for link in multi_item_links %}
<button class="button" type="submit" name="action" value="{{ link.url }}"> <button class="button" type="submit" name="action" value="{{ link.url }}">
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }} {% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
</button> </button>
{% endfor %} {% endfor %}
</div> </div>
@@ -75,7 +75,7 @@
<div class="group navform wat-cf"> <div class="group navform wat-cf">
{% for link in multi_item_links %} {% for link in multi_item_links %}
<button class="button" type="submit" name="action" value="{{ link.url }}"> <button class="button" type="submit" name="action" value="{{ link.url }}">
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }} {% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
</button> </button>
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -13,7 +13,7 @@
{% if side_bar %} {% if side_bar %}
<div class="block"> <div class="block">
<h3> <h3>
{{ title|capfirst }} {{ title }}
</h3> </h3>
<div class="content"> <div class="content">
<p> <p>
@@ -22,9 +22,9 @@
<div class="content"> <div class="content">
<h2 class="title"> <h2 class="title">
{% ifnotequal page_obj.paginator.num_pages 1 %} {% 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 %} {% 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 %} {% endifnotequal %}
</h2> </h2>
@@ -40,7 +40,7 @@
<div class="group navform wat-cf" style="margin-bottom: 0px;"> <div class="group navform wat-cf" style="margin-bottom: 0px;">
{% for link in multi_item_links %} {% for link in multi_item_links %}
<button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;"> <button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;">
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }} {% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
</button> </button>
{% endfor %} {% endfor %}
</div> </div>
@@ -74,15 +74,15 @@
{% endif %} {% endif %}
{% for column in extra_columns_preffixed %} {% for column in extra_columns_preffixed %}
<th>{{ column.name|capfirst }}</th> <th>{{ column.name }}</th>
{% endfor %} {% endfor %}
{% for column in object_list.0|get_model_list_columns %} {% for column in object_list.0|get_model_list_columns %}
<th>{{ column.name|capfirst }}</th> <th>{{ column.name }}</th>
{% endfor %} {% endfor %}
{% for column in extra_columns %} {% for column in extra_columns %}
<th>{{ column.name|capfirst }}</th> <th>{{ column.name }}</th>
{% endfor %} {% endfor %}
{% if not hide_links %} {% if not hide_links %}
@@ -160,7 +160,7 @@
<div class="group navform wat-cf" style="margin-bottom: 0px;"> <div class="group navform wat-cf" style="margin-bottom: 0px;">
{% for link in multi_item_links %} {% for link in multi_item_links %}
<button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;"> <button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;">
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }} {% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
</button> </button>
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -1,10 +1,10 @@
{% if side_bar %} {% if side_bar %}
<div class="block"> <div class="block">
<h3>{{ title|capfirst }}</h3> <h3>{{ title }}</h3>
<div class="content"> <div class="content">
{% else %} {% else %}
<div class="content"> <div class="content">
<h2 class="title">{{ title|capfirst }}</h2> <h2 class="title">{{ title }}</h2>
<div class="inner"> <div class="inner">
{% endif %} {% endif %}

View File

@@ -1,6 +1,6 @@
{% extends 'main/base.html' %} {% extends 'main/base.html' %}
{% block title %} :: {{ title|capfirst }}{% endblock %} {% block title %} :: {{ title }}{% endblock %}
{% block content %} {% block content %}
{% include 'main/generic_subtemplate.html' %} {% include 'main/generic_subtemplate.html' %}

View File

@@ -1,6 +1,6 @@
{% extends 'main/base.html' %} {% extends 'main/base.html' %}
{% block title %} :: {{ title|capfirst }}{% endblock %} {% block title %} :: {{ title }}{% endblock %}
{% block content %} {% block content %}
{% for block in blocks %} {% for block in blocks %}

View File

@@ -1,11 +1,11 @@
{% extends 'main/base.html' %} {% extends 'main/base.html' %}
{% block title %} :: {{ title|capfirst }}{% endblock %} {% block title %} :: {{ title }}{% endblock %}
{% block content %} {% block content %}
{% for key, value in blocks.items %} {% for key, value in blocks.items %}
<div class="content"> <div class="content">
<h2 class="title">{{ value.title|capfirst }}</h2> <h2 class="title">{{ value.title }}</h2>
<div class="inner"> <div class="inner">
<p> <p>
<ul class="undecorated_list"> <ul class="undecorated_list">

View File

@@ -1,6 +1,5 @@
from django import forms from django import forms
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.template.defaultfilters import capfirst
class MultiItemForm(forms.Form): class MultiItemForm(forms.Form):
@@ -8,7 +7,7 @@ class MultiItemForm(forms.Form):
actions = kwargs.pop('actions', []) actions = kwargs.pop('actions', [])
super(MultiItemForm, self).__init__(*args, **kwargs) super(MultiItemForm, self).__init__(*args, **kwargs)
choices = [('', '------')] choices = [('', '------')]
choices.extend([(action[0], capfirst(action[1])) for action in actions]) choices.extend([(action[0], action[1]) for action in actions])
self.fields['action'].choices = choices self.fields['action'].choices = choices
action = forms.ChoiceField(label=_(u'Multi item action')) action = forms.ChoiceField(label=_(u'Multi item action'))

View File

@@ -3,7 +3,7 @@
{% get_main_setting "DISABLE_ICONS" as disable_icons %} {% get_main_setting "DISABLE_ICONS" as disable_icons %}
{% if link.disabled %} {% if link.disabled %}
<a class="{{ link.class }}" style="cursor: default;" href="#">{% if link.famfam and not disable_icons %}<span class="famfam inactive famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} <a class="{{ link.class }}" style="cursor: default;" href="#">{% if link.famfam and not disable_icons %}<span class="famfam inactive famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
{% else %} {% else %}
<a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} <a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
{% endif %} {% endif %}

View File

@@ -6,7 +6,6 @@ from django.conf import settings
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.template import RequestContext, Variable from django.template import RequestContext, Variable
from django.template.defaultfilters import capfirst
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
@@ -44,7 +43,7 @@ def render_widget(request, link):
'url': reverse(link['view']) if 'view' in link else link['url'], 'url': reverse(link['view']) if 'view' in link else link['url'],
'icon': link.get('icon', 'link_button.png'), 'icon': link.get('icon', 'link_button.png'),
'static_url': settings.STATIC_URL, 'static_url': settings.STATIC_URL,
'string': capfirst(link['text']), 'string': link['text'],
'image_alt': _(u'icon'), 'image_alt': _(u'icon'),
}) })
else: else: