Remove blind capitalization of messages
This commit is contained in:
@@ -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':
|
||||
|
||||
@@ -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<span>%s</span>' % (content_type_icon(content_type), capfirst(label)))
|
||||
return mark_safe('%s<span>%s</span>' % (content_type_icon(content_type), label))
|
||||
|
||||
@@ -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):
|
||||
</button>
|
||||
''' % {
|
||||
'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'</div>')
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
<form action="{% url 'common:set_language' %}" method="post">{% csrf_token %}
|
||||
<select name="language" onchange="this.form.submit()">
|
||||
{% 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 %}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
<div class="content">
|
||||
<h2 class="title">{{ value.title|capfirst }}</h2>
|
||||
<h2 class="title">{{ value.title }}</h2>
|
||||
<div class="inner">
|
||||
<p>
|
||||
<ul class="undecorated_list">
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
{{ title|capfirst }}
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="content">
|
||||
<p>
|
||||
@@ -21,9 +21,9 @@
|
||||
<div class="content">
|
||||
<h2 class="title">
|
||||
{% 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 %}
|
||||
</h2>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="group navform wat-cf">
|
||||
{% for link in multi_item_links %}
|
||||
<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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
<div class="group navform wat-cf">
|
||||
{% for link in multi_item_links %}
|
||||
<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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
{{ title|capfirst }}
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="content">
|
||||
<p>
|
||||
@@ -22,9 +22,9 @@
|
||||
<div class="content">
|
||||
<h2 class="title">
|
||||
{% 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 %}
|
||||
</h2>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<div class="group navform wat-cf" style="margin-bottom: 0px;">
|
||||
{% for link in multi_item_links %}
|
||||
<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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -74,15 +74,15 @@
|
||||
{% endif %}
|
||||
|
||||
{% for column in extra_columns_preffixed %}
|
||||
<th>{{ column.name|capfirst }}</th>
|
||||
<th>{{ column.name }}</th>
|
||||
{% endfor %}
|
||||
|
||||
{% for column in object_list.0|get_model_list_columns %}
|
||||
<th>{{ column.name|capfirst }}</th>
|
||||
<th>{{ column.name }}</th>
|
||||
{% endfor %}
|
||||
|
||||
{% for column in extra_columns %}
|
||||
<th>{{ column.name|capfirst }}</th>
|
||||
<th>{{ column.name }}</th>
|
||||
{% endfor %}
|
||||
|
||||
{% if not hide_links %}
|
||||
@@ -160,7 +160,7 @@
|
||||
<div class="group navform wat-cf" style="margin-bottom: 0px;">
|
||||
{% for link in multi_item_links %}
|
||||
<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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>{{ title|capfirst }}</h3>
|
||||
<h3>{{ title }}</h3>
|
||||
<div class="content">
|
||||
{% else %}
|
||||
<div class="content">
|
||||
<h2 class="title">{{ title|capfirst }}</h2>
|
||||
<div class="content">
|
||||
<h2 class="title">{{ title }}</h2>
|
||||
<div class="inner">
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends 'main/base.html' %}
|
||||
|
||||
{% block title %} :: {{ title|capfirst }}{% endblock %}
|
||||
{% block title %} :: {{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'main/generic_subtemplate.html' %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends 'main/base.html' %}
|
||||
|
||||
{% block title %} :: {{ title|capfirst }}{% endblock %}
|
||||
{% block title %} :: {{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for block in blocks %}
|
||||
|
||||
@@ -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 %}
|
||||
<div class="content">
|
||||
<h2 class="title">{{ value.title|capfirst }}</h2>
|
||||
<h2 class="title">{{ value.title }}</h2>
|
||||
<div class="inner">
|
||||
<p>
|
||||
<ul class="undecorated_list">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.template.defaultfilters import capfirst
|
||||
|
||||
|
||||
class MultiItemForm(forms.Form):
|
||||
@@ -8,7 +7,7 @@ class MultiItemForm(forms.Form):
|
||||
actions = kwargs.pop('actions', [])
|
||||
super(MultiItemForm, self).__init__(*args, **kwargs)
|
||||
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
|
||||
|
||||
action = forms.ChoiceField(label=_(u'Multi item action'))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% get_main_setting "DISABLE_ICONS" as disable_icons %}
|
||||
|
||||
{% 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 %}
|
||||
<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 %}
|
||||
|
||||
@@ -6,7 +6,6 @@ from django.conf import settings
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.template import RequestContext, Variable
|
||||
from django.template.defaultfilters import capfirst
|
||||
from django.utils.safestring import mark_safe
|
||||
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'],
|
||||
'icon': link.get('icon', 'link_button.png'),
|
||||
'static_url': settings.STATIC_URL,
|
||||
'string': capfirst(link['text']),
|
||||
'string': link['text'],
|
||||
'image_alt': _(u'icon'),
|
||||
})
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user