Remove translations for projector exception messages.

This commit is contained in:
Norman Jäckel 2015-11-21 00:00:31 +01:00
parent 1ef41b68bd
commit c5f5fbf203
7 changed files with 14 additions and 65 deletions

View File

@ -1,5 +1,3 @@
from django.utils.translation import ugettext as _
from openslides.core.exceptions import ProjectorException
from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -25,7 +23,7 @@ class ItemListSlide(ProjectorElement):
if pk is not None:
# Children slide.
if not Item.objects.filter(pk=pk).exists():
raise ProjectorException(_('Item does not exist.'))
raise ProjectorException('Item does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id', 'tree')
@ -56,9 +54,9 @@ class ItemDetailSlide(ProjectorElement):
def get_context(self):
pk = self.config_entry.get('id')
if pk is None:
raise ProjectorException(_('Id must not be None.'))
raise ProjectorException('Id must not be None.')
if not Item.objects.filter(pk=pk).exists():
raise ProjectorException(_('Item does not exist.'))
raise ProjectorException('Item does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')

View File

@ -1,5 +1,3 @@
from django.utils.translation import ugettext as _
from openslides.core.exceptions import ProjectorException
from openslides.core.views import TagViewSet
from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -21,7 +19,7 @@ class AssignmentSlide(ProjectorElement):
if pk is not None:
# Detail slide.
if not Assignment.objects.filter(pk=pk).exists():
raise ProjectorException(_('Election does not exist.'))
raise ProjectorException('Election does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')

View File

@ -1,5 +1,4 @@
from django.utils.timezone import now
from django.utils.translation import ugettext as _
from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -17,7 +16,7 @@ class CustomSlideSlide(ProjectorElement):
def get_context(self):
if not CustomSlide.objects.filter(pk=self.config_entry.get('id')).exists():
raise ProjectorException(_('Custom slide does not exist.'))
raise ProjectorException('Custom slide does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')
@ -84,11 +83,11 @@ class Countdown(ProjectorElement):
Raises ProjectorException if the given data are invalid.
"""
if not isinstance(config_data.get('countdown_time'), (int, float)):
raise ProjectorException(_('Invalid countdown time. Use integer or float.'))
raise ProjectorException('Invalid countdown time. Use integer or float.')
if config_data.get('status') not in ('running', 'stop'):
raise ProjectorException(_("Invalid status. Use 'running' or 'stop'."))
raise ProjectorException("Invalid status. Use 'running' or 'stop'.")
if config_data.get('default') is not None and not isinstance(config_data.get('default'), int):
raise ProjectorException(_('Invalid default value. Use integer.'))
raise ProjectorException('Invalid default value. Use integer.')
@classmethod
def control(cls, action, projector_id=1, index=0):
@ -139,4 +138,4 @@ class Message(ProjectorElement):
def get_context(self):
if self.config_entry.get('message') is None:
raise ProjectorException(_('No message given.'))
raise ProjectorException('No message given.')

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-20 23:22+0100\n"
"POT-Creation-Date: 2015-11-21 00:01+0100\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -68,14 +68,6 @@ msgstr ""
msgid "Can put oneself on the list of speakers"
msgstr ""
#: agenda/projector.py:28 agenda/projector.py:61
msgid "Item does not exist."
msgstr ""
#: agenda/projector.py:59
msgid "Id must not be None."
msgstr ""
#: agenda/signals.py:18
msgid "Invalid input."
msgstr ""
@ -126,7 +118,7 @@ msgstr ""
msgid "The list of speakers is closed."
msgstr ""
#: agenda/views.py:113 users/projector.py:17
#: agenda/views.py:113
msgid "User does not exist."
msgstr ""
@ -254,10 +246,6 @@ msgstr ""
msgid "Votes"
msgstr ""
#: assignments/projector.py:24
msgid "Election does not exist."
msgstr ""
#: assignments/serializers.py:114
#, python-format
msgid "You have to submit data for %d candidates."
@ -605,26 +593,6 @@ msgstr ""
msgid "Can use the chat"
msgstr ""
#: core/projector.py:20
msgid "Custom slide does not exist."
msgstr ""
#: core/projector.py:87
msgid "Invalid countdown time. Use integer or float."
msgstr ""
#: core/projector.py:89
msgid "Invalid status. Use 'running' or 'stop'."
msgstr ""
#: core/projector.py:91
msgid "Invalid default value. Use integer."
msgstr ""
#: core/projector.py:142
msgid "No message given."
msgstr ""
#: core/signals.py:26
msgid "Event name"
msgstr ""
@ -763,10 +731,6 @@ msgstr ""
msgid "unknown"
msgstr ""
#: mediafiles/projector.py:20
msgid "File does not exist."
msgstr ""
#: motions/models.py:102
msgid "Can see motions"
msgstr ""
@ -860,10 +824,6 @@ msgstr ""
msgid "%d. Vote"
msgstr ""
#: motions/projector.py:24
msgid "Motion does not exist."
msgstr ""
#: motions/serializers.py:30
#, python-format
msgid "Workflow %(pk)d does not exist."

View File

@ -1,5 +1,3 @@
from django.utils.translation import ugettext as _
from openslides.core.exceptions import ProjectorException
from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -17,7 +15,7 @@ class MediafileSlide(ProjectorElement):
try:
Mediafile.objects.get(pk=self.config_entry.get('id'))
except Mediafile.DoesNotExist:
raise ProjectorException(_('File does not exist.'))
raise ProjectorException('File does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')

View File

@ -1,5 +1,3 @@
from django.utils.translation import ugettext as _
from openslides.core.exceptions import ProjectorException
from openslides.core.views import TagViewSet
from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -21,7 +19,7 @@ class MotionSlide(ProjectorElement):
if pk is not None:
# Detail slide.
if not Motion.objects.filter(pk=pk).exists():
raise ProjectorException(_('Motion does not exist.'))
raise ProjectorException('Motion does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')

View File

@ -1,5 +1,3 @@
from django.utils.translation import ugettext as _
from ..core.exceptions import ProjectorException
from ..utils.projector import ProjectorElement, ProjectorRequirement
from .models import User
@ -14,7 +12,7 @@ class UserSlide(ProjectorElement):
def get_context(self):
if not User.objects.filter(pk=self.config_entry.get('id')).exists():
raise ProjectorException(_('User does not exist.'))
raise ProjectorException('User does not exist.')
def get_requirements(self, config_entry):
pk = config_entry.get('id')