From c52f8f3ca7bc72e2f003993f386f2fb330aff3b7 Mon Sep 17 00:00:00 2001
From: Oskar Hahn
Date: Sun, 5 Aug 2012 22:31:20 +0200
Subject: [PATCH 1/2] changed application to motion and permitted to authorized
in message-strings
---
openslides/agenda/views.py | 2 +-
openslides/application/forms.py | 18 +-
openslides/application/models.py | 41 +-
.../application/base_application.html | 18 +-
.../templates/application/edit.html | 8 +-
.../templates/application/import.html | 6 +-
.../templates/application/overview.html | 26 +-
.../templates/application/poll_view.html | 4 +-
.../templates/application/view.html | 12 +-
.../templates/application/widget.html | 4 +-
.../templates/projector/Application.html | 6 +-
openslides/application/views.py | 62 +--
openslides/config/models.py | 2 +-
openslides/locale/de/LC_MESSAGES/django.mo | Bin 35757 -> 35724 bytes
openslides/locale/de/LC_MESSAGES/django.po | 423 +++++++++---------
openslides/participant/forms.py | 8 +-
openslides/participant/views.py | 20 +-
17 files changed, 331 insertions(+), 329 deletions(-)
diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py
index 9e5f69ac3..e9c7b835f 100644
--- a/openslides/agenda/views.py
+++ b/openslides/agenda/views.py
@@ -54,7 +54,7 @@ class Overview(TemplateView):
context = self.get_context_data(**kwargs)
if not request.user.has_perm('agenda.can_manage_agenda'):
messages.error(request,
- _('You are not permitted to manage the agenda.'))
+ _('You are not authorized to manage the agenda.'))
return self.render_to_response(context)
transaction.commit()
for item in Item.objects.all():
diff --git a/openslides/application/forms.py b/openslides/application/forms.py
index 2d4bf5518..94ee7d466 100644
--- a/openslides/application/forms.py
+++ b/openslides/application/forms.py
@@ -76,16 +76,16 @@ class ApplicationImportForm(forms.Form, CssClassMixin):
)
import_permitted = forms.BooleanField(
required=False,
- label=_("Import applications with status \"permitted\""),
- help_text=_('Set the initial status for each application to '
- '"permitted"'),
+ label=_("Import motions with status \"authorized\""),
+ help_text=_('Set the initial status for each motion to '
+ '"authorized"'),
)
class ConfigForm(forms.Form, CssClassMixin):
application_min_supporters = forms.IntegerField(
widget=forms.TextInput(attrs={'class':'small-input'}),
- label=_("Number of (minimum) required supporters for a application"),
+ label=_("Number of (minimum) required supporters for a motion"),
initial=4,
min_value=0,
max_value=8,
@@ -94,7 +94,7 @@ class ConfigForm(forms.Form, CssClassMixin):
application_preamble = forms.CharField(
widget=forms.TextInput(),
required=False,
- label=_("Application preamble")
+ label=_("Motion preamble")
)
application_pdf_ballot_papers_selection = forms.ChoiceField(
widget=forms.Select(),
@@ -115,17 +115,17 @@ class ConfigForm(forms.Form, CssClassMixin):
application_pdf_title = forms.CharField(
widget=forms.TextInput(),
required=False,
- label=_("Title for PDF document (all applications)")
+ label=_("Title for PDF document (all motions)")
)
application_pdf_preamble = forms.CharField(
widget=forms.Textarea(),
required=False,
- label=_("Preamble text for PDF document (all applications)")
+ label=_("Preamble text for PDF document (all motions)")
)
application_allow_trivial_change = forms.BooleanField(
label=_("Allow trivial changes"),
- help_text=_('Warning: Trivial changes undermine the application ' \
- 'permission system.'),
+ help_text=_('Warning: Trivial changes undermine the motions '
+ 'autorisation system.'),
required=False,
)
diff --git a/openslides/application/models.py b/openslides/application/models.py
index c06b4716e..904c8f85b 100644
--- a/openslides/application/models.py
+++ b/openslides/application/models.py
@@ -47,7 +47,7 @@ class Application(models.Model, SlideMixin):
('adj', _('Adjourned')),
('noc', _('Not Concerned')),
('com', _('Commited a bill')),
- ('nop', _('Rejected (not permitted)')),
+ ('nop', _('Rejected (not authorized)')),
('rev', _('Needs Review')), # Where is this status used?
#additional actions:
# edit
@@ -99,14 +99,14 @@ class Application(models.Model, SlideMixin):
self.save(nonewversion=True)
version.rejected = False
version.save()
- self.writelog(_("Version %d permitted") % (version.aid, ),
+ self.writelog(_("Version %d authorized") % (version.aid, ),
user)
def reject_version(self, version, user = None):
if version.id > self.permitted.id:
version.rejected = True
version.save()
- self.writelog(pgettext("Rejected means not permitted", "Version %d rejected")
+ self.writelog(pgettext("Rejected means not authorized", "Version %d rejected")
% (version.aid, ), user)
return True
return False
@@ -137,9 +137,9 @@ class Application(models.Model, SlideMixin):
if self.status == "pub" and not self.enough_supporters:
note.append(_("Searching for supporters."))
if self.status == "pub" and self.permitted is None:
- note.append(_("Not yet permitted."))
+ note.append(_("Not yet authorized."))
elif self.unpermitted_changes and self.permitted:
- note.append(_("Not yet permitted changes."))
+ note.append(_("Not yet authorized changes."))
return note
@property
@@ -286,7 +286,7 @@ class Application(models.Model, SlideMixin):
self.set_number()
self.permitted = aversion
self.save()
- self.writelog(_("Version %s permitted") % (aversion.aid), user)
+ self.writelog(_("Version %s authorized") % (aversion.aid), user)
return self.permitted
def notpermit(self, user=None):
@@ -300,7 +300,7 @@ class Application(models.Model, SlideMixin):
if self.number is None:
self.set_number()
self.save()
- self.writelog(_("Version %s not permitted") % (self.last_version.aid), user)
+ self.writelog(_("Version %s not authorized") % (self.last_version.aid), user)
def set_status(self, user, status, force=False):
"""
@@ -312,19 +312,22 @@ class Application(models.Model, SlideMixin):
error = False
break
if error:
+ #TODO: Use the Right Error
raise NameError(_('%s is not a valid status.') % status)
if self.status == status:
- raise NameError(_('The application status is already \'%s.\'') \
+ #TODO: Use the Right Error
+ raise NameError(_('The motion status is already \'%s.\'') \
% self.status)
actions = []
actions = self.get_allowed_actions(user)
if status not in actions and not force:
- raise NameError(_('The application status is: \'%(currentstatus)s\'. '\
- 'You can not set the status to \'%(newstatus)s\'.') % {
- 'currentstatus': self.status,
- 'newstatus': status
- })
+ #TODO: Use the Right Error
+ raise NameError(_(
+ 'The motion status is: \'%(currentstatus)s\'. '
+ 'You can not set the status to \'%(newstatus)s\'.') % {
+ 'currentstatus': self.status,
+ 'newstatus': status})
oldstatus = self.get_status_display()
self.status = status
@@ -444,7 +447,7 @@ class Application(models.Model, SlideMixin):
def get_agenda_title_supplement(self):
number = self.number or '[%s]' % ugettext('no number')
- return '(%s %s)' % (ugettext('Application'), number)
+ return '(%s %s)' % (ugettext('motion'), number)
def __getattr__(self, name):
"""
@@ -520,10 +523,10 @@ class Application(models.Model, SlideMixin):
class Meta:
permissions = (
- ('can_see_application', ugettext_noop("Can see application")),
- ('can_create_application', ugettext_noop("Can create application")),
- ('can_support_application', ugettext_noop("Can support application")),
- ('can_manage_application', ugettext_noop("Can manage application")),
+ ('can_see_application', ugettext_noop("Can see motions")),
+ ('can_create_application', ugettext_noop("Can create motions")),
+ ('can_support_application', ugettext_noop("Can support motions")),
+ ('can_manage_application', ugettext_noop("Can manage motions")),
)
@@ -592,7 +595,7 @@ def default_config(sender, key, **kwargs):
'application_preamble': _('The Assembly may decide,'),
'application_pdf_ballot_papers_selection': 'CUSTOM_NUMBER',
'application_pdf_ballot_papers_number': '8',
- 'application_pdf_title': _('Applications'),
+ 'application_pdf_title': _('Motions'),
'application_pdf_preamble': '',
'application_allow_trivial_change': False,
}.get(key)
diff --git a/openslides/application/templates/application/base_application.html b/openslides/application/templates/application/base_application.html
index 03322c352..c886215ef 100644
--- a/openslides/application/templates/application/base_application.html
+++ b/openslides/application/templates/application/base_application.html
@@ -6,16 +6,16 @@
{% block submenu %}
{% url application_overview as url_applicationoverview %}
- {% trans "Applications" %}
+ {% trans "Motions" %}
{# second submenu #}
@@ -31,18 +31,18 @@
{# view application #}
{% url application_view application.id as url_applicationview %}
- - {% trans 'View application' %}
+ - {% trans 'View motion' %}
{# edit application #}
{% if "edit" in actions %}
{% url application_edit application.id as url_applicationedit %}
- - {% trans 'Edit application' %}
+ - {% trans 'Edit motion' %}
{% endif %}
{# delete application #}
{% if "delete" in actions %}
- - {% trans 'Delete application' %}
+ - {% trans 'Delete motion' %}
{% endif %}
{# PDF #}
- - {% trans 'Application as PDF' %}
+ - {% trans 'Motion as PDF' %}
{# activate and polls #}
{% if perms.projector.can_manage_projector %}
-
diff --git a/openslides/application/templates/application/edit.html b/openslides/application/templates/application/edit.html
index fd07579b9..aa97ecc04 100644
--- a/openslides/application/templates/application/edit.html
+++ b/openslides/application/templates/application/edit.html
@@ -5,17 +5,17 @@
{% block title %}
{{ block.super }} –
{% if application %}
- {% trans "Edit application" %}
+ {% trans "Edit motion" %}
{% else %}
- {% trans "New application" %}
+ {% trans "New motion" %}
{% endif %}
{% endblock %}
{% block content %}
{% if application %}
-
{% trans "Edit application" %}
+ {% trans "Edit motion" %}
{% else %}
- {% trans "New application" %}
+ {% trans "New motion" %}
{% endif %}
{{ applications|length }}
- {% blocktrans count counter=applications|length %}application{% plural %}applications{% endblocktrans %}
+ {% blocktrans count counter=applications|length %}motion{% plural %}motions{% endblocktrans %}
diff --git a/openslides/application/templates/application/poll_view.html b/openslides/application/templates/application/poll_view.html
index 6a25277bf..67facddf5 100644
--- a/openslides/application/templates/application/poll_view.html
+++ b/openslides/application/templates/application/poll_view.html
@@ -4,12 +4,12 @@
{% load staticfiles %}
{% block title %}
- {{ block.super }} – {% trans "Application" %} "{{ application.public_version.title }}"
+ {{ block.super }} – {% trans "Motion" %} "{{ application.public_version.title }}"
– {{ ballot }}. {% trans "Vote" %}
{% endblock %}
{% block content %}
- {{ application.public_version.title }} ({% trans "Application" %}
+ {{ application.public_version.title }} ({% trans "Motion" %}
{{ application.number }}) – {{ ballot }}. {% trans "Vote" %}
{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}