diff --git a/openslides/application/models.py b/openslides/application/models.py index 015e81414..7d7674252 100644 --- a/openslides/application/models.py +++ b/openslides/application/models.py @@ -320,8 +320,11 @@ class Application(models.Model, SlideMixin): actions = [] actions = self.get_allowed_actions(user) if status not in actions and not force: - raise NameError('The application status is: %s. You can not set' \ - ' the status to %s.' % (self.status, status)) + raise NameError(_('The application 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 diff --git a/openslides/application/views.py b/openslides/application/views.py index 2dc03030b..8e8fd39c7 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -321,6 +321,8 @@ def permit(request, application_id): messages.success(request, _("Application was successfully permitted.")) except Application.DoesNotExist: pass + except NameError, e: + messages.error(request, e) return redirect(reverse('application_view', args=[application_id])) @permission_required('application.can_manage_application') @@ -334,6 +336,8 @@ def notpermit(request, application_id): messages.success(request, _("Application was successfully rejected.")) except Application.DoesNotExist: pass + except NameError, e: + messages.error(request, e) return redirect(reverse('application_view', args=[application_id])) @template('application/view.html') diff --git a/openslides/locale/de/LC_MESSAGES/django.mo b/openslides/locale/de/LC_MESSAGES/django.mo index 3b8bcebf6..873e4112f 100644 Binary files a/openslides/locale/de/LC_MESSAGES/django.mo and b/openslides/locale/de/LC_MESSAGES/django.mo differ diff --git a/openslides/locale/de/LC_MESSAGES/django.po b/openslides/locale/de/LC_MESSAGES/django.po index bc8070654..4a6532c7d 100644 --- a/openslides/locale/de/LC_MESSAGES/django.po +++ b/openslides/locale/de/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: OpenSlides 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-23 23:14+0200\n" +"POT-Creation-Date: 2012-07-24 07:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emanuel Schuetze \n" "Language-Team: German\n" @@ -28,13 +28,13 @@ msgstr "Englisch" msgid "Parent item" msgstr "Elternelement" -#: agenda/models.py:42 application/forms.py:40 application/models.py:525 +#: agenda/models.py:42 application/forms.py:40 application/models.py:528 #: application/templates/application/view.html:249 config/forms.py:61 #: projector/models.py:32 msgid "Title" msgstr "Titel" -#: agenda/models.py:43 application/forms.py:41 application/models.py:526 +#: agenda/models.py:43 application/forms.py:41 application/models.py:529 #: application/templates/application/view.html:250 projector/models.py:33 msgid "Text" msgstr "Text" @@ -101,8 +101,8 @@ msgid "Item %s was successfully deleted." msgstr "Eintrag %s wurde erfolgreich gelöscht." #: agenda/views.py:196 agenda/views.py:211 -#: agenda/templates/agenda/overview.html:46 application/models.py:559 -#: application/views.py:489 application/views.py:814 application/views.py:865 +#: agenda/templates/agenda/overview.html:46 application/models.py:562 +#: application/views.py:493 application/views.py:818 application/views.py:869 #: application/templates/application/view.html:82 #: application/templates/projector/Application.html:37 #: assignment/models.py:240 assignment/views.py:557 @@ -115,8 +115,8 @@ msgid "Yes" msgstr "Ja" #: agenda/views.py:197 agenda/views.py:212 -#: agenda/templates/agenda/overview.html:47 application/models.py:559 -#: application/views.py:489 application/views.py:814 application/views.py:866 +#: agenda/templates/agenda/overview.html:47 application/models.py:562 +#: application/views.py:493 application/views.py:818 application/views.py:870 #: application/templates/application/view.html:83 #: application/templates/projector/Application.html:38 #: assignment/models.py:240 assignment/views.py:558 @@ -323,7 +323,7 @@ msgstr "Löschen" msgid "Edit" msgstr "Bearbeiten" -#: application/forms.py:43 application/models.py:527 application/views.py:833 +#: application/forms.py:43 application/models.py:530 application/views.py:837 #: application/templates/application/view.html:232 #: application/templates/application/view.html:252 #: application/templates/projector/Application.html:77 @@ -338,14 +338,14 @@ msgstr "Triviale Änderung" msgid "Trivial changes don't create a new version." msgstr "Triviale Änderungen erzeugen keine neue Version." -#: application/forms.py:56 application/models.py:63 application/views.py:745 +#: application/forms.py:56 application/models.py:63 application/views.py:749 #: application/templates/application/overview.html:41 #: application/templates/application/view.html:18 #: application/templates/projector/Application.html:55 msgid "Submitter" msgstr "Antragsteller/in" -#: application/forms.py:68 application/models.py:65 application/views.py:764 +#: application/forms.py:68 application/models.py:65 application/views.py:768 #: application/templates/application/view.html:25 msgid "Supporters" msgstr "Unterstützer/innen" @@ -531,24 +531,34 @@ msgid "%s is not a valid status." msgstr "%s ist kein gültiger Status." #: application/models.py:317 +#, python-format msgid "The application status is already '%s.'" msgstr "Der Antragsstatus ist bereits '%s'." -#: application/models.py:329 +#: application/models.py:323 +#, python-format +msgid "" +"The application status is: '%(currentstatus)s'. You can not set the status " +"to '%(newstatus)s'." +msgstr "" +"Der Antragsstatus ist: '%(currentstatus)s'. Sie können den Status nicht auf " +"'%(newstatus)s' setzen." + +#: application/models.py:332 msgid "Status modified" msgstr "Status geändert" -#: application/models.py:432 +#: application/models.py:435 msgid "by" msgstr "von" -#: application/models.py:440 application/templates/application/view.html:213 +#: application/models.py:443 application/templates/application/view.html:213 #: application/templates/application/widget.html:27 #: application/templates/projector/Application.html:65 msgid "no number" msgstr "ohne Nummer" -#: application/models.py:441 application/views.py:705 application/views.py:847 +#: application/models.py:444 application/views.py:709 application/views.py:851 #: application/templates/application/poll_view.html:7 #: application/templates/application/poll_view.html:12 #: application/templates/application/view.html:7 @@ -560,35 +570,35 @@ msgstr "ohne Nummer" msgid "Application" msgstr "Antrag" -#: application/models.py:466 +#: application/models.py:469 msgid "Poll created" msgstr "Abstimmung erstellt" -#: application/models.py:517 +#: application/models.py:520 msgid "Can see application" msgstr "Darf Anträge sehen" -#: application/models.py:518 +#: application/models.py:521 msgid "Can create application" msgstr "Darf Anträge erstellen" -#: application/models.py:519 +#: application/models.py:522 msgid "Can support application" msgstr "Darf Anträge unterstützen" -#: application/models.py:520 +#: application/models.py:523 msgid "Can manage application" msgstr "Darf Anträge verwalten" -#: application/models.py:560 assignment/models.py:241 +#: application/models.py:563 assignment/models.py:241 msgid "Abstain" msgstr "Enthaltung" -#: application/models.py:586 +#: application/models.py:589 msgid "The Assembly may decide," msgstr "Die Versammlung möge beschließen," -#: application/models.py:589 application/views.py:698 application/views.py:927 +#: application/models.py:592 application/views.py:702 application/views.py:931 #: application/templates/application/base_application.html:9 #: application/templates/application/overview.html:7 #: application/templates/application/overview.html:10 @@ -613,7 +623,7 @@ msgstr "Neuer Antrag wurde erfolgreich angelegt." msgid "Application was successfully modified." msgstr "Antrag wurde erfolgreich geändert." -#: application/views.py:264 application/views.py:669 assignment/views.py:129 +#: application/views.py:264 application/views.py:673 assignment/views.py:129 #: participant/views.py:185 participant/views.py:316 participant/views.py:354 #: participant/views.py:377 participant/views.py:538 utils/views.py:166 #: utils/views.py:184 utils/views.py:208 @@ -647,139 +657,139 @@ msgstr "Antragsnummer wurde erfolgreich gesetzt." msgid "Application was successfully permitted." msgstr "Antrag wurde erfolgreich zugelassen." -#: application/views.py:334 +#: application/views.py:336 msgid "Application was successfully rejected." msgstr "Antrag wurde erfolgreich verworfen." -#: application/views.py:348 +#: application/views.py:352 #, python-format msgid "Application status was set to: %s." msgstr "Antragsstatus wurde gesetzt auf: %s" -#: application/views.py:364 +#: application/views.py:368 msgid "Application status was reset." msgstr "Antragsstatus wurde zurückgesetzt." -#: application/views.py:378 +#: application/views.py:382 msgid "You have support the application successfully." msgstr "Sie haben den Antrag erfolgreich unterstützt." -#: application/views.py:392 +#: application/views.py:396 msgid "You have unsupport the application successfully." msgstr "Sie haben dem Antrag erfolgreich Ihre Unterstützung entzogen." -#: application/views.py:406 +#: application/views.py:410 msgid "New vote was successfully created." msgstr "Neue Abstimmung erfolgreich angelegt." -#: application/views.py:422 +#: application/views.py:426 msgid "Poll deleted" msgstr "Abstimmung gelöscht" -#: application/views.py:423 +#: application/views.py:427 msgid "Poll was successfully deleted." msgstr "Abstimmung wurde erfolgreich gelöscht." -#: application/views.py:425 +#: application/views.py:429 #, python-format msgid "the %s. poll" msgstr "die %s. Abstimmung" -#: application/views.py:463 application/views.py:472 +#: application/views.py:467 application/views.py:476 #, python-format msgid "You can not delete application %s." msgstr "Sie können Antrag %s nicht löschen." -#: application/views.py:468 application/views.py:476 +#: application/views.py:472 application/views.py:480 #, python-format msgid "Application %s was successfully deleted." msgstr "Antrag %s wurde erfolgreich gelöscht." -#: application/views.py:478 +#: application/views.py:482 msgid "Invalid request" msgstr "Ungültige Anfrage" -#: application/views.py:497 +#: application/views.py:501 msgid "Do you really want to delete multiple applications?" msgstr "Soll %s wirklich gelöscht werden?" -#: application/views.py:499 participant/views.py:214 participant/views.py:337 +#: application/views.py:503 participant/views.py:214 participant/views.py:337 #, python-format msgid "Do you really want to delete %s?" msgstr "Soll %s wirklich gelöscht werden?" -#: application/views.py:523 +#: application/views.py:527 msgid "Poll was updated" msgstr "Abstimmung wurde aktualisiert" -#: application/views.py:540 +#: application/views.py:544 #, python-format msgid "Version %s accepted." msgstr "Version %s akzeptiert." -#: application/views.py:542 +#: application/views.py:546 #, python-format msgid "Do you really want to permit version %s?" msgstr "Soll Version %s wirklich zugelassen werden?" -#: application/views.py:552 +#: application/views.py:556 #, python-format msgid "Version %s rejected." msgstr "Version %s zurückgewiesen." -#: application/views.py:554 +#: application/views.py:558 msgid "ERROR by rejecting the version." msgstr "FEHLER beim Zurückweisen der Version." -#: application/views.py:556 +#: application/views.py:560 #, python-format msgid "Do you really want to reject version %s?" msgstr "Soll Version %s wirklich zurückgewiesen werden?" -#: application/views.py:565 participant/views.py:395 +#: application/views.py:569 participant/views.py:395 msgid "" "The import function is available for the admin (without user profile) only." msgstr "" "Die Importfunktion ist nur für den superuser (ohne Nutzerprofil) verfügbar." -#: application/views.py:596 application/views.py:600 application/views.py:606 -#: application/views.py:609 participant/views.py:464 +#: application/views.py:600 application/views.py:604 application/views.py:610 +#: application/views.py:613 participant/views.py:464 #, python-format msgid "Ignoring malformed line %d in import file." msgstr "Fehlerhafte Zeile %d der Quelldatei wurde ignoriert." -#: application/views.py:655 +#: application/views.py:659 #, python-format msgid "%d application was successfully imported." msgid_plural "%d applications were successfully imported." msgstr[0] "%d Antrag wurde erfolgreich importiert." msgstr[1] "%d Anträge wurden erfolgreich importiert." -#: application/views.py:658 +#: application/views.py:662 #, python-format msgid "%d application was successfully modified." msgid_plural "%d applications were successfully modified." msgstr[0] "%d Antrag wurde erfolgreich geändert." msgstr[1] "%d Anträge wurden erfolgreich geändert." -#: application/views.py:661 +#: application/views.py:665 #, python-format msgid "%d new user was added." msgid_plural "%d new users were added." msgstr[0] "%d neuer Nutzer wurde erstellt." msgstr[1] "%d neue Nutzer wurden erstellt." -#: application/views.py:665 participant/views.py:534 +#: application/views.py:669 participant/views.py:534 msgid "Import aborted because of severe errors in the input file." msgstr "Import auf Grund von schweren Fehlern in der Quelldatei abgebrochen." -#: application/views.py:667 participant/views.py:536 +#: application/views.py:671 participant/views.py:536 msgid "Import file has wrong character encoding, only UTF-8 is supported!" msgstr "" "Die Quelldatei benutzt eine ungültige Zeichenkodierung, es wird nur UTF-8 " "wird unterstützt!" -#: application/views.py:671 +#: application/views.py:675 msgid "" "Attention: Existing applications will be modified if you import new " "applications with the same number." @@ -787,7 +797,7 @@ msgstr "" "Achtung: Existierende Anträge werden geändert wenn Sie neue Anträge mit " "identischer Nummer importieren." -#: application/views.py:672 +#: application/views.py:676 msgid "" "Attention: Importing an application without a number multiple times will " "create duplicates." @@ -795,19 +805,19 @@ msgstr "" "Achtung: Bei mehrfachem Import eines Antrags ohne Nummer können Duplikate " "entstehen." -#: application/views.py:719 application/templates/application/overview.html:84 +#: application/views.py:723 application/templates/application/overview.html:84 #: application/templates/application/widget.html:31 msgid "No applications available." msgstr "Keine Anträge vorhanden." -#: application/views.py:724 application/views.py:726 application/views.py:738 -#: application/views.py:740 +#: application/views.py:728 application/views.py:730 application/views.py:742 +#: application/views.py:744 #: application/templates/application/base_application.html:24 #: application/templates/projector/Application.html:63 msgid "Application No." msgstr "Antrag Nr." -#: application/views.py:778 application/templates/application/overview.html:20 +#: application/views.py:782 application/templates/application/overview.html:20 #: application/templates/application/overview.html:40 #: application/templates/application/view.html:37 #: application/templates/projector/Application.html:11 @@ -819,7 +829,7 @@ msgstr "Antrag Nr." msgid "Status" msgstr "Status" -#: application/views.py:797 application/templates/application/view.html:217 +#: application/views.py:801 application/templates/application/view.html:217 #: application/templates/application/view.html:247 config/models.py:131 #: config/templates/config/version.html:5 #: config/templates/config/version.html:8 @@ -827,12 +837,12 @@ msgstr "Status" msgid "Version" msgstr "Version" -#: application/views.py:807 application/templates/application/view.html:47 +#: application/views.py:811 application/templates/application/view.html:47 #: assignment/views.py:391 msgid "Vote results" msgstr "Abstimmungsergebnis" -#: application/views.py:813 +#: application/views.py:817 #: application/templates/application/base_application.html:55 #: application/templates/application/poll_view.html:8 #: application/templates/application/poll_view.html:13 @@ -842,7 +852,7 @@ msgstr "Abstimmungsergebnis" msgid "Vote" msgstr "Abstimmung" -#: application/views.py:814 application/views.py:867 +#: application/views.py:818 application/views.py:871 #: application/templates/application/view.html:84 #: application/templates/projector/Application.html:39 assignment/views.py:558 #: assignment/templates/assignment/view.html:160 @@ -850,14 +860,14 @@ msgstr "Abstimmung" msgid "Abstention" msgstr "Enthaltung" -#: application/views.py:814 application/templates/application/view.html:85 +#: application/views.py:818 application/templates/application/view.html:85 #: application/templates/projector/Application.html:40 #: assignment/templates/assignment/view.html:182 #: assignment/templates/projector/Assignment.html:101 msgid "Invalid" msgstr "Ungültig" -#: application/views.py:814 +#: application/views.py:818 #: application/templates/application/poll_view.html:35 #: application/templates/application/view.html:87 #: application/templates/projector/Application.html:42 assignment/views.py:442 @@ -869,21 +879,21 @@ msgstr "Ungültig" msgid "Votes cast" msgstr "Abgegebene Stimmen" -#: application/views.py:847 +#: application/views.py:851 msgid "Poll" msgstr "Abstimmung" -#: application/views.py:861 +#: application/views.py:865 #, python-format msgid "Application No. %s" msgstr "Antrag Nr. %s" -#: application/views.py:863 +#: application/views.py:867 #, python-format msgid "%d. Vote" msgstr "%d. Abstimmung" -#: application/views.py:920 +#: application/views.py:924 msgid "Application settings successfully saved." msgstr "Antrags-Einstellungen erfolgreich gespeichert." @@ -1913,7 +1923,7 @@ msgstr "" "Die Installation war erfolgreich! Verwende %(user)s (passwort: %(password)s) " "für die erste Anmeldung.
Wichtig: Ändere das Passwort " "nach der ersten Anmeldung! Anderenfalls erscheint diese Meldung weiterhin " -"für jeden und ist ein sicherheitsrisiko." +"für jeden und ist ein Sicherheitsrisiko." #: participant/views.py:592 #: participant/templates/participant/base_participant.html:12 @@ -2300,3 +2310,7 @@ msgstr "undefinierter-dateiname" #: utils/jsonfield/fields.py:21 msgid "Enter valid JSON" msgstr "Gebe valides JSON ein" + +#, fuzzy +#~ msgid "The application status is: '%(currentstatus)s'. " +#~ msgstr "Der Antragsstatus ist bereits '%s'."