Merge pull request #1696 from normanjaeckel/RemoveTranslations

Remove translations for projector exception messages.
This commit is contained in:
Oskar Hahn 2015-11-22 22:03:02 +01:00
commit c6d9701369
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.core.exceptions import ProjectorException
from openslides.utils.projector import ProjectorElement, ProjectorRequirement from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -25,7 +23,7 @@ class ItemListSlide(ProjectorElement):
if pk is not None: if pk is not None:
# Children slide. # Children slide.
if not Item.objects.filter(pk=pk).exists(): 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): def get_requirements(self, config_entry):
pk = config_entry.get('id', 'tree') pk = config_entry.get('id', 'tree')
@ -56,9 +54,9 @@ class ItemDetailSlide(ProjectorElement):
def get_context(self): def get_context(self):
pk = self.config_entry.get('id') pk = self.config_entry.get('id')
if pk is None: 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(): 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): def get_requirements(self, config_entry):
pk = config_entry.get('id') 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.exceptions import ProjectorException
from openslides.core.views import TagViewSet from openslides.core.views import TagViewSet
from openslides.utils.projector import ProjectorElement, ProjectorRequirement from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -21,7 +19,7 @@ class AssignmentSlide(ProjectorElement):
if pk is not None: if pk is not None:
# Detail slide. # Detail slide.
if not Assignment.objects.filter(pk=pk).exists(): 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): def get_requirements(self, config_entry):
pk = config_entry.get('id') pk = config_entry.get('id')

View File

@ -1,5 +1,4 @@
from django.utils.timezone import now from django.utils.timezone import now
from django.utils.translation import ugettext as _
from openslides.utils.projector import ProjectorElement, ProjectorRequirement from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -17,7 +16,7 @@ class CustomSlideSlide(ProjectorElement):
def get_context(self): def get_context(self):
if not CustomSlide.objects.filter(pk=self.config_entry.get('id')).exists(): 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): def get_requirements(self, config_entry):
pk = config_entry.get('id') pk = config_entry.get('id')
@ -84,11 +83,11 @@ class Countdown(ProjectorElement):
Raises ProjectorException if the given data are invalid. Raises ProjectorException if the given data are invalid.
""" """
if not isinstance(config_data.get('countdown_time'), (int, float)): 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'): 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): 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 @classmethod
def control(cls, action, projector_id=1, index=0): def control(cls, action, projector_id=1, index=0):
@ -139,4 +138,4 @@ class Message(ProjectorElement):
def get_context(self): def get_context(self):
if self.config_entry.get('message') is None: 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 "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "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" "Language: en\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -68,14 +68,6 @@ msgstr ""
msgid "Can put oneself on the list of speakers" msgid "Can put oneself on the list of speakers"
msgstr "" 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 #: agenda/signals.py:18
msgid "Invalid input." msgid "Invalid input."
msgstr "" msgstr ""
@ -126,7 +118,7 @@ msgstr ""
msgid "The list of speakers is closed." msgid "The list of speakers is closed."
msgstr "" msgstr ""
#: agenda/views.py:113 users/projector.py:17 #: agenda/views.py:113
msgid "User does not exist." msgid "User does not exist."
msgstr "" msgstr ""
@ -254,10 +246,6 @@ msgstr ""
msgid "Votes" msgid "Votes"
msgstr "" msgstr ""
#: assignments/projector.py:24
msgid "Election does not exist."
msgstr ""
#: assignments/serializers.py:114 #: assignments/serializers.py:114
#, python-format #, python-format
msgid "You have to submit data for %d candidates." msgid "You have to submit data for %d candidates."
@ -605,26 +593,6 @@ msgstr ""
msgid "Can use the chat" msgid "Can use the chat"
msgstr "" 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 #: core/signals.py:26
msgid "Event name" msgid "Event name"
msgstr "" msgstr ""
@ -763,10 +731,6 @@ msgstr ""
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
#: mediafiles/projector.py:20
msgid "File does not exist."
msgstr ""
#: motions/models.py:102 #: motions/models.py:102
msgid "Can see motions" msgid "Can see motions"
msgstr "" msgstr ""
@ -860,10 +824,6 @@ msgstr ""
msgid "%d. Vote" msgid "%d. Vote"
msgstr "" msgstr ""
#: motions/projector.py:24
msgid "Motion does not exist."
msgstr ""
#: motions/serializers.py:30 #: motions/serializers.py:30
#, python-format #, python-format
msgid "Workflow %(pk)d does not exist." 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.core.exceptions import ProjectorException
from openslides.utils.projector import ProjectorElement, ProjectorRequirement from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -17,7 +15,7 @@ class MediafileSlide(ProjectorElement):
try: try:
Mediafile.objects.get(pk=self.config_entry.get('id')) Mediafile.objects.get(pk=self.config_entry.get('id'))
except Mediafile.DoesNotExist: except Mediafile.DoesNotExist:
raise ProjectorException(_('File does not exist.')) raise ProjectorException('File does not exist.')
def get_requirements(self, config_entry): def get_requirements(self, config_entry):
pk = config_entry.get('id') 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.exceptions import ProjectorException
from openslides.core.views import TagViewSet from openslides.core.views import TagViewSet
from openslides.utils.projector import ProjectorElement, ProjectorRequirement from openslides.utils.projector import ProjectorElement, ProjectorRequirement
@ -21,7 +19,7 @@ class MotionSlide(ProjectorElement):
if pk is not None: if pk is not None:
# Detail slide. # Detail slide.
if not Motion.objects.filter(pk=pk).exists(): 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): def get_requirements(self, config_entry):
pk = config_entry.get('id') pk = config_entry.get('id')

View File

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