Support for localized permissions on top of the untranslated django model.

This commit is contained in:
René Köcher 2012-04-14 09:28:28 +02:00
parent 3817a03aa8
commit 7e12e1d5e2
10 changed files with 215 additions and 150 deletions

View File

@ -16,7 +16,6 @@ except ImportError:
import simplejson as json import simplejson as json
from django.db import models from django.db import models
from django.utils.translation import ugettext as _
from mptt.models import MPTTModel, TreeForeignKey from mptt.models import MPTTModel, TreeForeignKey
@ -26,7 +25,7 @@ from projector.projector import SlideMixin
from projector.api import register_slidemodel from projector.api import register_slidemodel
from agenda.api import is_summary from agenda.api import is_summary
from utils.translation_ext import xugettext as _
class Item(MPTTModel, SlideMixin): class Item(MPTTModel, SlideMixin):
""" """
@ -124,8 +123,8 @@ class Item(MPTTModel, SlideMixin):
class Meta: class Meta:
permissions = ( permissions = (
('can_see_agenda', "Can see agenda"), ('can_see_agenda', _("Can see agenda", fixstr=True)),
('can_manage_agenda', "Can manage agenda"), ('can_manage_agenda', _("Can manage agenda", fixstr=True)),
) )
class MPTTMeta: class MPTTMeta:

View File

@ -15,7 +15,6 @@ from datetime import datetime
from django.db import models from django.db import models
from django.db.models import Max from django.db.models import Max
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from projector.api import register_slidemodel from projector.api import register_slidemodel
@ -24,6 +23,7 @@ from projector.models import SlideMixin
from participant.models import Profile from participant.models import Profile
from system import config from system import config
from utils.utils import _propper_unicode from utils.utils import _propper_unicode
from utils.translation_ext import xugettext as _
from poll.models import BaseOption, BasePoll, CountVotesCast, CountInvalid, Vote from poll.models import BaseOption, BasePoll, CountVotesCast, CountInvalid, Vote
@ -466,10 +466,10 @@ class Application(models.Model, SlideMixin):
class Meta: class Meta:
permissions = ( permissions = (
('can_see_application', "Can see application"), ('can_see_application', _("Can see application", fixstr=True)),
('can_create_application', "Can create application"), ('can_create_application', _("Can create application", fixstr=True)),
('can_support_application', "Can support application"), ('can_support_application', _("Can support application", fixstr=True)),
('can_manage_application', "Can manage application"), ('can_manage_application', _("Can manage application", fixstr=True)),
) )

View File

@ -11,14 +11,13 @@
""" """
from django.db import models from django.db import models
from django.utils.translation import ugettext as _
from participant.models import Profile from participant.models import Profile
from projector.projector import SlideMixin from projector.projector import SlideMixin
from projector.api import register_slidemodel from projector.api import register_slidemodel
from poll.models import BasePoll, CountInvalid, CountVotesCast, BaseOption, PublishPollMixin from poll.models import BasePoll, CountInvalid, CountVotesCast, BaseOption, PublishPollMixin
from utils.translation_ext import xugettext as _
class Assignment(models.Model, SlideMixin): class Assignment(models.Model, SlideMixin):
prefix = 'assignment' prefix = 'assignment'
@ -116,10 +115,10 @@ class Assignment(models.Model, SlideMixin):
class Meta: class Meta:
permissions = ( permissions = (
('can_see_assignment', "Can see assignment"), ('can_see_assignment', _("Can see assignment", fixstr=True)),
('can_nominate_other', "Can nominate another person"), ('can_nominate_other', _("Can nominate another person", fixstr=True)),
('can_nominate_self', "Can nominate themselves"), ('can_nominate_self', _("Can nominate themselves", fixstr=True)),
('can_manage_assignment', "Can manage assignment"), ('can_manage_assignment', _("Can manage assignment", fixstr=True)),
) )
register_slidemodel(Assignment, category=_('Elections')) register_slidemodel(Assignment, category=_('Elections'))

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-04-13 21:24+0200\n" "POT-Creation-Date: 2012-04-14 01:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,30 +33,38 @@ msgstr "Elternelement"
msgid "Countdown (in seconds)" msgid "Countdown (in seconds)"
msgstr "Countdown (in Sekunden)" msgstr "Countdown (in Sekunden)"
#: agenda/models.py:39 application/forms.py:41 #: agenda/models.py:38 application/forms.py:41
#: application/templates/application/view.html:249 projector/models.py:13 #: application/templates/application/view.html:249 projector/models.py:12
msgid "Title" msgid "Title"
msgstr "Titel" msgstr "Titel"
#: agenda/models.py:40 application/forms.py:42 #: agenda/models.py:39 application/forms.py:42
#: application/templates/application/view.html:250 projector/models.py:14 #: application/templates/application/view.html:250 projector/models.py:13
msgid "Text" msgid "Text"
msgstr "Text" msgstr "Text"
#: agenda/models.py:41 #: agenda/models.py:40
msgid "Transcript" msgid "Transcript"
msgstr "" msgstr ""
#: agenda/models.py:42 #: agenda/models.py:41
msgid "Closed" msgid "Closed"
msgstr "Abgeschlossen" msgstr "Abgeschlossen"
#: agenda/models.py:43 agenda/templates/agenda/overview.html:59 #: agenda/models.py:42 agenda/templates/agenda/overview.html:59
#: projector/models.py:15 #: projector/models.py:14
msgid "Weight" msgid "Weight"
msgstr "Gewichtung" msgstr "Gewichtung"
#: agenda/models.py:135 agenda/models.py:142 agenda/slides.py:7 #: agenda/models.py:126
msgid "Can see agenda"
msgstr "Kann die Tagesordnung sehen"
#: agenda/models.py:127
msgid "Can manage agenda"
msgstr "Kann die Tagesordnug verwalten"
#: agenda/models.py:134 agenda/models.py:141 agenda/slides.py:7
#: agenda/views.py:190 agenda/views.py:219 #: agenda/views.py:190 agenda/views.py:219
#: agenda/templates/agenda/base_agenda.html:9 #: agenda/templates/agenda/base_agenda.html:9
#: agenda/templates/agenda/overview.html:7 #: agenda/templates/agenda/overview.html:7
@ -67,7 +75,7 @@ msgstr "Gewichtung"
msgid "Agenda" msgid "Agenda"
msgstr "Tagesordnung" msgstr "Tagesordnung"
#: agenda/models.py:135 #: agenda/models.py:134
msgid "Agenda Item" msgid "Agenda Item"
msgstr "Tagesordnungseintrag" msgstr "Tagesordnungseintrag"
@ -76,7 +84,7 @@ msgstr "Tagesordnungseintrag"
msgid "Item <b>%s</b> and his children were successfully deleted." msgid "Item <b>%s</b> and his children were successfully deleted."
msgstr "Eintrag <b>%s</b> und seine Kindelemente wurde erfolgreich gelöscht." msgstr "Eintrag <b>%s</b> und seine Kindelemente wurde erfolgreich gelöscht."
#: agenda/views.py:171 #: agenda/views.py:171 utils/views.py:182
#, python-format #, python-format
msgid "Item <b>%s</b> was successfully deleted." msgid "Item <b>%s</b> was successfully deleted."
msgstr "Eintrag <b>%s</b> wurde erfolgreich gelöscht." msgstr "Eintrag <b>%s</b> wurde erfolgreich gelöscht."
@ -89,7 +97,7 @@ msgstr "Eintrag <b>%s</b> wurde erfolgreich gelöscht."
#: assignment/templates/assignment/view.html:190 #: assignment/templates/assignment/view.html:190
#: assignment/templates/projector/Assignment.html:71 #: assignment/templates/projector/Assignment.html:71
#: assignment/templates/projector/Assignment.html:75 utils/pdf.py:364 #: assignment/templates/projector/Assignment.html:75 utils/pdf.py:364
#: utils/pdf.py:444 utils/pdf.py:664 utils/utils.py:38 #: utils/pdf.py:444 utils/pdf.py:664 utils/utils.py:38 utils/views.py:190
msgid "Yes" msgid "Yes"
msgstr "Ja" msgstr "Ja"
@ -99,7 +107,7 @@ msgstr "Ja"
#: application/templates/projector/Application.html:34 #: application/templates/projector/Application.html:34
#: assignment/templates/assignment/view.html:187 #: assignment/templates/assignment/view.html:187
#: assignment/templates/projector/Assignment.html:72 utils/pdf.py:364 #: assignment/templates/projector/Assignment.html:72 utils/pdf.py:364
#: utils/pdf.py:445 utils/pdf.py:664 utils/utils.py:38 #: utils/pdf.py:445 utils/pdf.py:664 utils/utils.py:38 utils/views.py:190
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
@ -107,8 +115,8 @@ msgstr "Nein"
msgid "Yes, with all child items." msgid "Yes, with all child items."
msgstr "Ja, mit allen Kindelementen." msgstr "Ja, mit allen Kindelementen."
#: agenda/views.py:183 agenda/views.py:185 participant/views.py:194 #: agenda/views.py:183 agenda/views.py:185 participant/views.py:187
#: participant/views.py:307 utils/utils.py:46 #: participant/views.py:300 utils/utils.py:46 utils/views.py:187
#, python-format #, python-format
msgid "Do you really want to delete <b>%s</b>?" msgid "Do you really want to delete <b>%s</b>?"
msgstr "Soll <b>%s</b> wirklich gelöscht werden?" msgstr "Soll <b>%s</b> wirklich gelöscht werden?"
@ -258,7 +266,7 @@ msgstr "Antragsteller/in"
msgid "Supporters" msgid "Supporters"
msgstr "Unterstützer/innen" msgstr "Unterstützer/innen"
#: application/forms.py:58 participant/forms.py:87 #: application/forms.py:58 participant/forms.py:88
msgid "CSV File" msgid "CSV File"
msgstr "CSV-Datei" msgstr "CSV-Datei"
@ -306,115 +314,131 @@ msgstr "Titel für PDF-Dokuemt (alle Anträge)"
msgid "Preamble text for PDF document (all applications)" msgid "Preamble text for PDF document (all applications)"
msgstr "Einleitungstext für PDF-Dokument (alle Anträge)" msgstr "Einleitungstext für PDF-Dokument (alle Anträge)"
#: application/models.py:32 #: application/models.py:33
msgid "Published" msgid "Published"
msgstr "Veröffentlicht" msgstr "Veröffentlicht"
#: application/models.py:33 application/templates/application/overview.html:22 #: application/models.py:34 application/templates/application/overview.html:22
msgid "Permitted" msgid "Permitted"
msgstr "Zugelassen" msgstr "Zugelassen"
#: application/models.py:34 application/templates/application/overview.html:23 #: application/models.py:35 application/templates/application/overview.html:23
#: application/templates/application/view.html:174 #: application/templates/application/view.html:174
msgid "Accepted" msgid "Accepted"
msgstr "Angenommen" msgstr "Angenommen"
#: application/models.py:35 application/templates/application/overview.html:24 #: application/models.py:36 application/templates/application/overview.html:24
#: application/templates/application/view.html:179 #: application/templates/application/view.html:179
msgid "Rejected" msgid "Rejected"
msgstr "Abgelehnt" msgstr "Abgelehnt"
#: application/models.py:36 #: application/models.py:37
msgid "Withdrawed" msgid "Withdrawed"
msgstr "Zurückgezogen" msgstr "Zurückgezogen"
#: application/models.py:37 application/templates/application/view.html:187 #: application/models.py:38 application/templates/application/view.html:187
msgid "Adjourned" msgid "Adjourned"
msgstr "Vertagt" msgstr "Vertagt"
# please check! # please check!
#: application/models.py:38 application/templates/application/view.html:190 #: application/models.py:39 application/templates/application/view.html:190
msgid "Not Concerned" msgid "Not Concerned"
msgstr "Nicht befasst" msgstr "Nicht befasst"
# please check! # please check!
#: application/models.py:39 application/templates/application/view.html:193 #: application/models.py:40 application/templates/application/view.html:193
msgid "Commited a bill" msgid "Commited a bill"
msgstr "Verwiesen (in Ausschuss)" msgstr "Verwiesen (in Ausschuss)"
#: application/models.py:40 #: application/models.py:41
msgid "Rejected (not permitted)" msgid "Rejected (not permitted)"
msgstr "Verworfen (nicht zulässig)" msgstr "Verworfen (nicht zulässig)"
#: application/models.py:41 application/templates/application/overview.html:26 #: application/models.py:42 application/templates/application/overview.html:26
msgid "Needs Review" msgid "Needs Review"
msgstr "Benötigt Review" msgstr "Benötigt Review"
#: application/models.py:124 #: application/models.py:125
msgid "Searching for supporters." msgid "Searching for supporters."
msgstr "Auf Unterstützersuche." msgstr "Auf Unterstützersuche."
#: application/models.py:126 #: application/models.py:127
msgid "Not yet permitted." msgid "Not yet permitted."
msgstr "Noch nicht zugelassen." msgstr "Noch nicht zugelassen."
#: application/models.py:128 #: application/models.py:129
msgid "Not yet permitted changes." msgid "Not yet permitted changes."
msgstr "Noch nicht zugelassene Änderungen." msgstr "Noch nicht zugelassene Änderungen."
#: application/models.py:188 #: application/models.py:189
#, python-format #, python-format
msgid "Version %s modified" msgid "Version %s modified"
msgstr "Version %s bearbeitet" msgstr "Version %s bearbeitet"
#: application/models.py:197 #: application/models.py:198
#, python-format #, python-format
msgid "Version %s created" msgid "Version %s created"
msgstr "Version %s erstellt" msgstr "Version %s erstellt"
#: application/models.py:206 #: application/models.py:207
msgid "Supporters removed" msgid "Supporters removed"
msgstr "Unterstützer/innen gelöscht" msgstr "Unterstützer/innen gelöscht"
#: application/models.py:215 #: application/models.py:216
#, python-format #, python-format
msgid "Status reseted to: %s" msgid "Status reseted to: %s"
msgstr "Status zurückgesetzt auf: %s" msgstr "Status zurückgesetzt auf: %s"
#: application/models.py:228 application/views.py:170 #: application/models.py:229 application/views.py:170
#, python-format #, python-format
msgid "Supporter: +%s" msgid "Supporter: +%s"
msgstr "Unterstützer/in: +%s" msgstr "Unterstützer/in: +%s"
#: application/models.py:238 application/views.py:181 #: application/models.py:239 application/views.py:181
#, python-format #, python-format
msgid "Supporter: -%s" msgid "Supporter: -%s"
msgstr "Unterstützer/in: -%s" msgstr "Unterstützer/in: -%s"
#: application/models.py:254 #: application/models.py:255
#, python-format #, python-format
msgid "Number set: %s" msgid "Number set: %s"
msgstr "Nummer gesetzt: %s" msgstr "Nummer gesetzt: %s"
#: application/models.py:267 #: application/models.py:268
#, python-format #, python-format
msgid "Version %s permitted" msgid "Version %s permitted"
msgstr "Version %s zugelassen" msgstr "Version %s zugelassen"
#: application/models.py:281 #: application/models.py:282
#, python-format #, python-format
msgid "Version %s not permitted" msgid "Version %s not permitted"
msgstr "Version %s nicht zugelassen" msgstr "Version %s nicht zugelassen"
#: application/models.py:307 #: application/models.py:308
msgid "Status modified" msgid "Status modified"
msgstr "Status geändert" msgstr "Status geändert"
#: application/models.py:423 #: application/models.py:424
msgid "Poll created" msgid "Poll created"
msgstr "Abstimmung erstellt" msgstr "Abstimmung erstellt"
#: application/models.py:496 application/views.py:620 #: application/models.py:469
msgid "Can see application"
msgstr "Kann Anträge sehen"
#: application/models.py:470
msgid "Can create application"
msgstr "Kann Anträge erstellen"
#: application/models.py:471
msgid "Can support application"
msgstr "Kann Anträge unterstützen"
#: application/models.py:472
msgid "Can manage application"
msgstr "Kann Anträge verwalten"
#: application/models.py:497 application/views.py:630
#: application/templates/application/base_application.html:8 #: application/templates/application/base_application.html:8
#: application/templates/application/overview.html:6 #: application/templates/application/overview.html:6
#: application/templates/application/overview.html:9 #: application/templates/application/overview.html:9
@ -441,9 +465,9 @@ msgstr "Neuer Antrag wurde erfolgreich angelegt."
msgid "Application was successfully modified." msgid "Application was successfully modified."
msgstr "Antrag wurde erfolgreich geändert." msgstr "Antrag wurde erfolgreich geändert."
#: application/views.py:192 application/views.py:581 assignment/views.py:123 #: application/views.py:192 application/views.py:591 assignment/views.py:126
#: participant/views.py:171 participant/views.py:292 participant/views.py:321 #: participant/views.py:164 participant/views.py:285 participant/views.py:314
#: participant/views.py:466 system/views.py:53 utils/views.py:132 #: participant/views.py:472 system/views.py:53 utils/views.py:142
msgid "Please check the form for errors." msgid "Please check the form for errors."
msgstr "Bitte kontrollieren Sie das Formular nach Fehlern." msgstr "Bitte kontrollieren Sie das Formular nach Fehlern."
@ -546,45 +570,49 @@ msgstr "FEHLER beim Zurückweisen der Version."
msgid "Do you really want to reject version <b>%s</b>?" msgid "Do you really want to reject version <b>%s</b>?"
msgstr "Soll Version <b>%s</b> wirklich zurückgewiesen werden?" msgstr "Soll Version <b>%s</b> wirklich zurückgewiesen werden?"
#: application/views.py:487 participant/views.py:337 #: application/views.py:487 participant/views.py:330
msgid "" msgid ""
"The import function is available for the superuser (without user profile) " "The import function is available for the superuser (without user profile) "
"only." "only."
msgstr "" msgstr ""
"Die Importfunktion ist nur für den 'superuser' (ohne Nutzerprofil) verfügbar." "Die Importfunktion ist nur für den 'superuser' (ohne Nutzerprofil) verfügbar."
#: application/views.py:513 application/views.py:517 application/views.py:523 #: application/views.py:518 application/views.py:522 application/views.py:528
#: application/views.py:526 #: application/views.py:531 participant/views.py:399
#, python-format #, python-format
msgid "Ignoring malformed line %d in import file." msgid "Ignoring malformed line %d in import file."
msgstr "Fehlerhafte Zeile %d der Quelldatei wurde ignoriert." msgstr "Fehlerhafte Zeile %d der Quelldatei wurde ignoriert."
#: application/views.py:569 #: application/views.py:577
#, python-format #, python-format
msgid "%d application was successfully imported." msgid "%d application was successfully imported."
msgid_plural "%d applications were successfully imported." msgid_plural "%d applications were successfully imported."
msgstr[0] "%d Antrag wurde erfolgreich importiert." msgstr[0] "%d Antrag wurde erfolgreich importiert."
msgstr[1] "%d Anträge wurden erfolgreich importiert." msgstr[1] "%d Anträge wurden erfolgreich importiert."
#: application/views.py:572 #: application/views.py:580
#, python-format #, python-format
msgid "%d application was successfully modified." msgid "%d application was successfully modified."
msgid_plural "%d applications were successfully modified." msgid_plural "%d applications were successfully modified."
msgstr[0] "%d Antrag wurde erfolgreich geändert." msgstr[0] "%d Antrag wurde erfolgreich geändert."
msgstr[1] "%d Anträge wurden erfolgreich geändert." msgstr[1] "%d Anträge wurden erfolgreich geändert."
#: application/views.py:575 #: application/views.py:583
#, python-format #, python-format
msgid "%d new user was added." msgid "%d new user was added."
msgid_plural "%d new users were added." msgid_plural "%d new users were added."
msgstr[0] "%d neuer Nutzer wurde erstellt." msgstr[0] "%d neuer Nutzer wurde erstellt."
msgstr[1] "%d neue Nutzer wurden erstellt." msgstr[1] "%d neue Nutzer wurden erstellt."
#: application/views.py:579 participant/views.py:464 #: application/views.py:587 participant/views.py:468
msgid "Import aborted because of severe errors in the input file." msgid "Import aborted because of severe errors in the input file."
msgstr "Import auf Grund von schweren Fehlern in der Quelldatei abgebrochen." msgstr "Import auf Grund von schweren Fehlern in der Quelldatei abgebrochen."
#: application/views.py:583 #: application/views.py:589 participant/views.py:470
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:593
msgid "" msgid ""
"Attention: Existing applications will be modified if you import new " "Attention: Existing applications will be modified if you import new "
"applications with the same number." "applications with the same number."
@ -592,7 +620,7 @@ msgstr ""
"Achtung: Existierende Anträge werden geändert wenn Sie neue Anträge mit " "Achtung: Existierende Anträge werden geändert wenn Sie neue Anträge mit "
"identischer Nummer importieren." "identischer Nummer importieren."
#: application/views.py:584 #: application/views.py:594
msgid "" msgid ""
"Attention: Importing an application without a number multiple times will " "Attention: Importing an application without a number multiple times will "
"create duplicates." "create duplicates."
@ -600,7 +628,7 @@ msgstr ""
"Achtung: Bei mehrfachem Import eines Antrags ohne Nummer können Duplikate " "Achtung: Bei mehrfachem Import eines Antrags ohne Nummer können Duplikate "
"entstehen." "entstehen."
#: application/views.py:613 #: application/views.py:623
msgid "Application settings successfully saved." msgid "Application settings successfully saved."
msgstr "Antrags-Einstellungen erfolgreich gespeichert." msgstr "Antrags-Einstellungen erfolgreich gespeichert."
@ -741,12 +769,12 @@ msgid "Results of"
msgstr "Ergebnis der" msgstr "Ergebnis der"
#: application/templates/application/poll_view.html:23 #: application/templates/application/poll_view.html:23
#: assignment/templates/assignment/poll_view.html:13 poll/models.py:151 #: assignment/templates/assignment/poll_view.html:13 poll/models.py:154
msgid "majority" msgid "majority"
msgstr "Mehrheit" msgstr "Mehrheit"
#: application/templates/application/poll_view.html:23 #: application/templates/application/poll_view.html:23
#: assignment/templates/assignment/poll_view.html:13 poll/models.py:153 #: assignment/templates/assignment/poll_view.html:13 poll/models.py:156
msgid "undocumented" msgid "undocumented"
msgstr "nicht erfasst" msgstr "nicht erfasst"
@ -966,58 +994,74 @@ msgstr "Titel für PDF-Dokument (alle Wahlen)"
msgid "Preamble text for PDF document (all elections)" msgid "Preamble text for PDF document (all elections)"
msgstr "Einleitungstext für PDF-Dokument (alle Wahlen) " msgstr "Einleitungstext für PDF-Dokument (alle Wahlen) "
#: assignment/models.py:26 assignment/templates/assignment/overview.html:15 #: assignment/models.py:25 assignment/templates/assignment/overview.html:15
#: assignment/templates/assignment/view.html:30 #: assignment/templates/assignment/view.html:30
msgid "Searching for candidates" msgid "Searching for candidates"
msgstr "Auf Kandidatensuche" msgstr "Auf Kandidatensuche"
#: assignment/models.py:27 assignment/templates/assignment/overview.html:16 #: assignment/models.py:26 assignment/templates/assignment/overview.html:16
#: assignment/templates/assignment/view.html:32 #: assignment/templates/assignment/view.html:32
msgid "Voting" msgid "Voting"
msgstr "Im Wahlvorgang" msgstr "Im Wahlvorgang"
#: assignment/models.py:28 assignment/templates/assignment/overview.html:17 #: assignment/models.py:27 assignment/templates/assignment/overview.html:17
msgid "Finished" msgid "Finished"
msgstr "Abgeschlossen" msgstr "Abgeschlossen"
#: assignment/models.py:31 #: assignment/models.py:30
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: assignment/models.py:32 poll/models.py:86 #: assignment/models.py:31 poll/models.py:86
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
#: assignment/models.py:33 assignment/templates/assignment/view.html:18 #: assignment/models.py:32 assignment/templates/assignment/view.html:18
#: assignment/templates/projector/Assignment.html:20 utils/pdf.py:499 #: assignment/templates/projector/Assignment.html:20 utils/pdf.py:499
msgid "Number of available posts" msgid "Number of available posts"
msgstr "Anzahl der zur Wahl stehenden Posten" msgstr "Anzahl der zur Wahl stehenden Posten"
#: assignment/models.py:34 #: assignment/models.py:33
msgid "Short description (for ballot paper)" msgid "Short description (for ballot paper)"
msgstr "Kurzbeschreibung (für Stimmzettel)" msgstr "Kurzbeschreibung (für Stimmzettel)"
#: assignment/models.py:46 #: assignment/models.py:45
#, python-format #, python-format
msgid "%s is not a valid status." msgid "%s is not a valid status."
msgstr "%s ist kein gültiger Status." msgstr "%s ist kein gültiger Status."
#: assignment/models.py:48 #: assignment/models.py:47
#, python-format #, python-format
msgid "The assignment status is already %s." msgid "The assignment status is already %s."
msgstr "Der Wahlstatus ist bereits %s." msgstr "Der Wahlstatus ist bereits %s."
#: assignment/models.py:57 #: assignment/models.py:56
#, python-format #, python-format
msgid "<b>%s</b> is already a candidate." msgid "<b>%s</b> is already a candidate."
msgstr "<b>%s</b> ist bereits ein/e Kandidat/in." msgstr "<b>%s</b> ist bereits ein/e Kandidat/in."
#: assignment/models.py:67 #: assignment/models.py:66
#, python-format #, python-format
msgid "%s is no candidate" msgid "%s is no candidate"
msgstr "%s ist kein/e Kandidat/in" msgstr "%s ist kein/e Kandidat/in"
#: assignment/models.py:125 assignment/views.py:300 #: assignment/models.py:118
msgid "Can see assignment"
msgstr "Kann Wahlen sehen"
#: assignment/models.py:119
msgid "Can nominate another person"
msgstr "Kann eine andere Person wählen"
#: assignment/models.py:120
msgid "Can nominate themselves"
msgstr "Kann sich selbst wählen"
#: assignment/models.py:121
msgid "Can manage assignment"
msgstr "Kann Wahlen verwalten"
#: assignment/models.py:124 assignment/views.py:303
#: assignment/templates/assignment/base_assignment.html:13 #: assignment/templates/assignment/base_assignment.html:13
#: assignment/templates/assignment/overview.html:6 #: assignment/templates/assignment/overview.html:6
#: assignment/templates/assignment/overview.html:9 #: assignment/templates/assignment/overview.html:9
@ -1031,83 +1075,83 @@ msgstr "Wahlen"
msgid "Candidate <b>%s</b> was nominated successfully." msgid "Candidate <b>%s</b> was nominated successfully."
msgstr "Kandidat/in <b>%s</b> wurde erfolgreich vorgeschlagen." msgstr "Kandidat/in <b>%s</b> wurde erfolgreich vorgeschlagen."
#: assignment/views.py:115 #: assignment/views.py:118
msgid "New election was successfully created." msgid "New election was successfully created."
msgstr "Neue Wahl wurde erfolgreich angelegt." msgstr "Neue Wahl wurde erfolgreich angelegt."
#: assignment/views.py:117 #: assignment/views.py:120
msgid "Election was successfully modified." msgid "Election was successfully modified."
msgstr "Wahl wurde erfolgreich geändert." msgstr "Wahl wurde erfolgreich geändert."
#: assignment/views.py:137 #: assignment/views.py:140
#, python-format #, python-format
msgid "Election <b>%s</b> was successfully deleted." msgid "Election <b>%s</b> was successfully deleted."
msgstr "Wahl <b>%s</b> wurde erfolgreich gelöscht." msgstr "Wahl <b>%s</b> wurde erfolgreich gelöscht."
#: assignment/views.py:150 #: assignment/views.py:153
#, python-format #, python-format
msgid "Election status was set to: <b>%s</b>." msgid "Election status was set to: <b>%s</b>."
msgstr "Wahlstatus wurde gesetzt auf: <b>%s</b>." msgstr "Wahlstatus wurde gesetzt auf: <b>%s</b>."
#: assignment/views.py:161 #: assignment/views.py:164
msgid "You have set your candidature successfully." msgid "You have set your candidature successfully."
msgstr "Sie haben Ihre Kandidatur erfolgreich gesetzt." msgstr "Sie haben Ihre Kandidatur erfolgreich gesetzt."
#: assignment/views.py:166 #: assignment/views.py:169
msgid "You can't candidate. Your user account is only for administration." msgid "You can't candidate. Your user account is only for administration."
msgstr "" msgstr ""
"Sie können nicht kandidieren. Ihr Nutzerkonto ist nur zur Administration." "Sie können nicht kandidieren. Ihr Nutzerkonto ist nur zur Administration."
#: assignment/views.py:174 #: assignment/views.py:177
msgid "You have withdrawn your candidature successfully." msgid "You have withdrawn your candidature successfully."
msgstr "Sie haben Ihre Kandidatur erfolgreich zurückgezogen." msgstr "Sie haben Ihre Kandidatur erfolgreich zurückgezogen."
#: assignment/views.py:185 #: assignment/views.py:188
#, python-format #, python-format
msgid "Candidate <b>%s</b> was withdrawn successfully." msgid "Candidate <b>%s</b> was withdrawn successfully."
msgstr "Die Kandidatur von <b>%s</b> wurde erfolgreich zurückgezogen." msgstr "Die Kandidatur von <b>%s</b> wurde erfolgreich zurückgezogen."
#: assignment/views.py:188 #: assignment/views.py:191
#, python-format #, python-format
msgid "Do you really want to withdraw <b>%s</b> from the election?" msgid "Do you really want to withdraw <b>%s</b> from the election?"
msgstr "Soll <b>%s</b> wirklich von der Wahl zurückgezogen werden?" msgstr "Soll <b>%s</b> wirklich von der Wahl zurückgezogen werden?"
#: assignment/views.py:203 #: assignment/views.py:206
msgid "New ballot was successfully created." msgid "New ballot was successfully created."
msgstr "Neuer Wahlgang erfolgreich angelegt." msgstr "Neuer Wahlgang erfolgreich angelegt."
#: assignment/views.py:229 #: assignment/views.py:232
msgid "Poll successfully set to published." msgid "Poll successfully set to published."
msgstr "Abstimmung wurde erfolgreich veröffentlicht." msgstr "Abstimmung wurde erfolgreich veröffentlicht."
#: assignment/views.py:231 #: assignment/views.py:234
msgid "Poll successfully set to unpublished." msgid "Poll successfully set to unpublished."
msgstr "Abstimmung wurde erfolgreich unveröffentlicht." msgstr "Abstimmung wurde erfolgreich unveröffentlicht."
#: assignment/views.py:233 #: assignment/views.py:236
#, python-format #, python-format
msgid "Poll ID %d does not exist." msgid "Poll ID %d does not exist."
msgstr "Abstimmungs-ID %d existiert nicht." msgstr "Abstimmungs-ID %d existiert nicht."
#: assignment/views.py:244 #: assignment/views.py:247
#, python-format #, python-format
msgid "The %s. ballot was successfully deleted." msgid "The %s. ballot was successfully deleted."
msgstr "Der %s. Wahlgang wurde erfolgreich gelöscht." msgstr "Der %s. Wahlgang wurde erfolgreich gelöscht."
#: assignment/views.py:246 #: assignment/views.py:249
#, python-format #, python-format
msgid "the %s. ballot" msgid "the %s. ballot"
msgstr "der %s. Wahlgang" msgstr "der %s. Wahlgang"
#: assignment/views.py:259 #: assignment/views.py:262
msgid "not elected" msgid "not elected"
msgstr "nicht gewählt" msgstr "nicht gewählt"
#: assignment/views.py:262 utils/pdf.py:584 #: assignment/views.py:265 utils/pdf.py:584
msgid "elected" msgid "elected"
msgstr "gewählt" msgstr "gewählt"
#: assignment/views.py:293 #: assignment/views.py:296
msgid "Election settings successfully saved." msgid "Election settings successfully saved."
msgstr "Wahl-Einstellungen wurden erfolgreich gespeichert." msgstr "Wahl-Einstellungen wurden erfolgreich gespeichert."
@ -1267,27 +1311,27 @@ msgstr "Kandidat/in ist gewählt"
msgid "No ballots available." msgid "No ballots available."
msgstr "Keine Wahlgänge vorhanden." msgstr "Keine Wahlgänge vorhanden."
#: participant/forms.py:37 #: participant/forms.py:38
msgid "Keep applications, try to reassign submitter" msgid "Keep applications, try to reassign submitter"
msgstr "Anträge beibehalten, versuchen Antragssteller erneut zuzuweisen" msgstr "Anträge beibehalten, versuchen Antragssteller erneut zuzuweisen"
#: participant/forms.py:38 #: participant/forms.py:39
msgid "Keep applications, set status to \"needs review\"" msgid "Keep applications, set status to \"needs review\""
msgstr "Anträge beibehalten, Stauts auf \"Benötigt Review\" setzen" msgstr "Anträge beibehalten, Stauts auf \"Benötigt Review\" setzen"
#: participant/forms.py:39 #: participant/forms.py:40
msgid "Discard applications" msgid "Discard applications"
msgstr "Alle Anträge löschen" msgstr "Alle Anträge löschen"
#: participant/forms.py:43 participant/forms.py:52 #: participant/forms.py:44 participant/forms.py:53
msgid "First name" msgid "First name"
msgstr "Vorname" msgstr "Vorname"
#: participant/forms.py:44 participant/forms.py:53 #: participant/forms.py:45 participant/forms.py:54
msgid "Last name" msgid "Last name"
msgstr "Nachname" msgstr "Nachname"
#: participant/forms.py:88 #: participant/forms.py:89
msgid "For existing applications" msgid "For existing applications"
msgstr "Bei existierenden Anträgen" msgstr "Bei existierenden Anträgen"
@ -1341,88 +1385,99 @@ msgstr "Kommentar"
msgid "First Password" msgid "First Password"
msgstr "Erst-Passwort" msgstr "Erst-Passwort"
#: participant/views.py:163 #: participant/models.py:68
msgid "Can see participant"
msgstr "Kann Teilnehmer/inen sehen"
#: participant/models.py:69
msgid "Can manage participant"
msgstr "Kann Teilnehmer/inen verwalten"
#: participant/views.py:156
msgid "New participant was successfully created." msgid "New participant was successfully created."
msgstr "Neue/r Teilnehmer/in wurde erfolgreich angelegt." msgstr "Neue/r Teilnehmer/in wurde erfolgreich angelegt."
#: participant/views.py:165 #: participant/views.py:158
msgid "Participant was successfully modified." msgid "Participant was successfully modified."
msgstr "Teilnehmer/in wurde erfolgreich geändert." msgstr "Teilnehmer/in wurde erfolgreich geändert."
#: participant/views.py:192 #: participant/views.py:185
#, python-format #, python-format
msgid "Participant <b>%s</b> was successfully deleted." msgid "Participant <b>%s</b> was successfully deleted."
msgstr "Teilnehmer/in <b>%s</b> wurde erfolgreich gelöscht." msgstr "Teilnehmer/in <b>%s</b> wurde erfolgreich gelöscht."
#: participant/views.py:205 participant/views.py:224 #: participant/views.py:198 participant/views.py:217
#, python-format #, python-format
msgid "Participant %d does not exist." msgid "Participant %d does not exist."
msgstr "Teilnehmer/in %d existiert nicht." msgstr "Teilnehmer/in %d existiert nicht."
#: participant/views.py:270 #: participant/views.py:263
#, python-format #, python-format
msgid "Group name \"%s\" is reserved for internal use." msgid "Group name \"%s\" is reserved for internal use."
msgstr "Der Gruppenname \"%s\" ist für interne Verwendung reserviert." msgstr "Der Gruppenname \"%s\" ist für interne Verwendung reserviert."
#: participant/views.py:284 #: participant/views.py:277
msgid "New group was successfully created." msgid "New group was successfully created."
msgstr "Neue Gruppe wurde erfolgreich angelegt." msgstr "Neue Gruppe wurde erfolgreich angelegt."
#: participant/views.py:286 #: participant/views.py:279
msgid "Group was successfully modified." msgid "Group was successfully modified."
msgstr "Gruppe wurde erfolgreich geändert." msgstr "Gruppe wurde erfolgreich geändert."
#: participant/views.py:305 #: participant/views.py:298
#, python-format #, python-format
msgid "Group <b>%s</b> was successfully deleted." msgid "Group <b>%s</b> was successfully deleted."
msgstr "Gruppe <b>%s</b> wurde erfolgreich gelöscht." msgstr "Gruppe <b>%s</b> wurde erfolgreich gelöscht."
#: participant/views.py:319 #: participant/views.py:312
msgid "User settings successfully saved." msgid "User settings successfully saved."
msgstr "Nutzereinstellungen wurden erfolgreich gespeichert." msgstr "Nutzereinstellungen wurden erfolgreich gespeichert."
#: participant/views.py:385 #: participant/views.py:382
msgid "Supporters removed after user import." msgid "Supporters removed after user import."
msgstr "Unterstützer/innen nach Benutzerimport zurückgesetzt." msgstr "Unterstützer/innen nach Benutzerimport zurückgesetzt."
#: participant/views.py:432 #: participant/views.py:435
#, python-format #, python-format
msgid "Reassigned to \"%s\" after (re)importing users." msgid "Reassigned to \"%s\" after (re)importing users."
msgstr "Nach Benutzerimport erneut \"%s\" zugeordnet." msgstr "Nach Benutzerimport erneut \"%s\" zugeordnet."
#: participant/views.py:435 participant/views.py:449 #: participant/views.py:438 participant/views.py:452
#, python-format #, python-format
msgid "Could not reassing application %d - object not found!" msgid "Could not reassing application %d - object not found!"
msgstr "Antrag Id#%d konnte nicht neu zugewiesen werden - " msgstr ""
"Das Objekt wurde nicht gefunden!" "Antrag Id#%d konnte nicht neu zugewiesen werden - Das Objekt wurde nicht "
"gefunden!"
#: participant/views.py:452 #: participant/views.py:455
#, python-format #, python-format
msgid "%d application could not be reassigned and needs a review!" msgid "%d application could not be reassigned and needs a review!"
msgid_plural "%d applications could not be reassigned and need a review!" msgid_plural "%d applications could not be reassigned and need a review!"
msgstr[0] "%d Antrag konnte nicht neu zugewiesen werden and benötigt ein Review!" msgstr[0] ""
msgstr[1] "%d Anträge konnten nicht neu zugewiesen werden und benötigen ein Review!" "%d Antrag konnte nicht neu zugewiesen werden and benötigt ein Review!"
msgstr[1] ""
"%d Anträge konnten nicht neu zugewiesen werden und benötigen ein Review!"
#: participant/views.py:455 #: participant/views.py:458
#, python-format #, python-format
msgid "%d application was successfully reassigned." msgid "%d application was successfully reassigned."
msgid_plural "%d applications were successfully reassigned." msgid_plural "%d applications were successfully reassigned."
msgstr[0] "%d Antrag wurde erfolgreich neu zugewiesen." msgstr[0] "%d Antrag wurde erfolgreich neu zugewiesen."
msgstr[1] "%d Anträge wurden erfolgreich neu zugewiesen." msgstr[1] "%d Anträge wurden erfolgreich neu zugewiesen."
#: participant/views.py:458 #: participant/views.py:461
#, python-format #, python-format
msgid "%d application was discarded." msgid "%d application was discarded."
msgid_plural "%d applications were discarded." msgid_plural "%d applications were discarded."
msgstr[0] "%d Antrag wurde gelöscht." msgstr[0] "%d Antrag wurde gelöscht."
msgstr[1] "%d Anträge wurden gelöscht." msgstr[1] "%d Anträge wurden gelöscht."
#: participant/views.py:461 #: participant/views.py:465
#, python-format #, python-format
msgid "%d new participants were successfully imported." msgid "%d new participants were successfully imported."
msgstr "%d neue Teilnehmer/innen wurden erfolgreich importiert." msgstr "%d neue Teilnehmer/innen wurden erfolgreich importiert."
#: participant/views.py:468 #: participant/views.py:474
msgid "" msgid ""
"Attention: All existing participants will be removed if you import new " "Attention: All existing participants will be removed if you import new "
"participants." "participants."
@ -1430,29 +1485,30 @@ msgstr ""
"Achtung: Alle existierenden Teilnehmer/innen werden gelöscht, wenn Sie neue " "Achtung: Alle existierenden Teilnehmer/innen werden gelöscht, wenn Sie neue "
"Teilnehmer/innen importieren." "Teilnehmer/innen importieren."
#: participant/views.py:470 #: participant/views.py:476
msgid "Attention: Supporters from all existing applications will be removed." msgid "Attention: Supporters from all existing applications will be removed."
msgstr "" msgstr ""
"Achtung: Alle Unterstützer/innen werden von existiernden Anträgen gelöscht." "Achtung: Alle Unterstützer/innen werden von existiernden Anträgen gelöscht."
#: participant/views.py:471 #: participant/views.py:477
msgid "" msgid ""
"Attention: Applications which can't be mapped to new users will be set to " "Attention: Applications which can't be mapped to new users will be set to "
"'Needs Review'." "'Needs Review'."
msgstr "Achtung: Anträge welche keinem Nutzer zugeordnet werden können" msgstr ""
" bekommen automatisch den Status \"Benötigt Review\"." "Achtung: Anträge welche keinem Nutzer zugeordnet werden können bekommen "
"automatisch den Status \"Benötigt Review\"."
#: participant/views.py:483 #: participant/views.py:489
#, python-format #, python-format
msgid "The Password for <b>%s</b> was successfully reset." msgid "The Password for <b>%s</b> was successfully reset."
msgstr "Das Passwort für <b>%s</b> wurde erfolgreich zurückgesetzt." msgstr "Das Passwort für <b>%s</b> wurde erfolgreich zurückgesetzt."
#: participant/views.py:485 #: participant/views.py:491
#, python-format #, python-format
msgid "Do you really want to reset the password for <b>%s</b>?" msgid "Do you really want to reset the password for <b>%s</b>?"
msgstr "Soll das Passwort für <b>%s</b> wirklich zurückgesetzt werden?" msgstr "Soll das Passwort für <b>%s</b> wirklich zurückgesetzt werden?"
#: participant/views.py:493 #: participant/views.py:499
#: participant/templates/participant/base_participant.html:11 #: participant/templates/participant/base_participant.html:11
#: participant/templates/participant/overview.html:5 #: participant/templates/participant/overview.html:5
#: participant/templates/participant/overview.html:15 #: participant/templates/participant/overview.html:15
@ -1634,14 +1690,22 @@ msgstr "Ungültige Stimmen"
msgid "votes" msgid "votes"
msgstr "Stimmen" msgstr "Stimmen"
#: projector/models.py:26 projector/views.py:155 #: projector/models.py:21
msgid "Can manage the projector"
msgstr "Kann den Beamer verwalten"
#: projector/models.py:22
msgid "Can see projector"
msgstr "Kann den Beamer sehen"
#: projector/models.py:25 projector/views.py:155
#: projector/templates/projector/base_projector.html:6 #: projector/templates/projector/base_projector.html:6
#: projector/templates/projector/base_projector.html:11 #: projector/templates/projector/base_projector.html:11
#: projector/templates/projector/control.html:35 #: projector/templates/projector/control.html:35
msgid "Projector" msgid "Projector"
msgstr "Beamer" msgstr "Beamer"
#: projector/models.py:26 #: projector/models.py:25
msgid "Projector Slide" msgid "Projector Slide"
msgstr "Beamer-Folie" msgstr "Beamer-Folie"
@ -1751,6 +1815,10 @@ msgstr "Veranstaltungsort"
msgid "Event organizer" msgid "Event organizer"
msgstr "Veranstalter" msgstr "Veranstalter"
#: system/models.py:42
msgid "Can manage system configuration"
msgstr "Kann die Systemkonfiguration verwalten"
#: system/models.py:93 #: system/models.py:93
msgid "General" msgid "General"
msgstr "Allgemein" msgstr "Allgemein"

View File

@ -16,6 +16,7 @@ from django.contrib.auth.forms import AdminPasswordChangeForm
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin from utils.forms import CssClassMixin
from utils.translation_ext import LocalizedModelMultipleChoiceField
# required for USER_VISIBLE_PERMISSIONS # required for USER_VISIBLE_PERMISSIONS
from agenda.models import Item from agenda.models import Item
@ -67,7 +68,7 @@ class ProfileForm(ModelForm, CssClassMixin):
model = Profile model = Profile
class GroupForm(ModelForm, CssClassMixin): class GroupForm(ModelForm, CssClassMixin):
permissions = ModelMultipleChoiceField(queryset=Permission.objects.filter(codename__in=USER_VISIBLE_PERMISSIONS)) permissions = LocalizedModelMultipleChoiceField(queryset=Permission.objects.filter(codename__in=USER_VISIBLE_PERMISSIONS))
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(GroupForm, self).__init__(*args, **kwargs) super(GroupForm, self).__init__(*args, **kwargs)

View File

@ -13,8 +13,8 @@
from django.db import models from django.db import models
from django.db.models import Q from django.db.models import Q
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from utils.translation_ext import xugettext as _
from participant.api import gen_password from participant.api import gen_password
class Profile(models.Model): class Profile(models.Model):
@ -65,6 +65,6 @@ class Profile(models.Model):
class Meta: class Meta:
permissions = ( permissions = (
('can_see_participant', "Can see participant"), ('can_see_participant', _("Can see participant", fixstr=True)),
('can_manage_participant', "Can manage participant"), ('can_manage_participant', _("Can manage participant", fixstr=True)),
) )

View File

@ -11,11 +11,10 @@
""" """
from django.db import models from django.db import models
from django.utils.translation import ugettext as _
from projector.api import register_slidemodel from projector.api import register_slidemodel
from projector.models import SlideMixin from projector.models import SlideMixin
from utils.translation_ext import xugettext as _
class BaseOption(models.Model): class BaseOption(models.Model):
poll = models.ForeignKey('BasePoll') poll = models.ForeignKey('BasePoll')

View File

@ -1,11 +1,10 @@
from django.db import models from django.db import models
from django.utils.translation import ugettext as _
from api import register_slidemodel from api import register_slidemodel
from projector import SlideMixin from projector import SlideMixin
from system import config from system import config
from utils.translation_ext import xugettext as _
class ProjectorSlide(models.Model, SlideMixin): class ProjectorSlide(models.Model, SlideMixin):
prefix = 'ProjectorSlide' prefix = 'ProjectorSlide'
@ -19,8 +18,8 @@ class ProjectorSlide(models.Model, SlideMixin):
class Meta: class Meta:
permissions = ( permissions = (
('can_manage_projector', "Can manage the projector"), ('can_manage_projector', _("Can manage the projector", fixstr=True)),
('can_see_projector', "Can see projector"), ('can_see_projector', _("Can see projector", fixstr=True)),
) )
register_slidemodel(ProjectorSlide, category=_('Projector'), model_name=_('Projector Slide')) register_slidemodel(ProjectorSlide, category=_('Projector'), model_name=_('Projector Slide'))

View File

@ -13,7 +13,7 @@ from pickle import dumps, loads
import base64 import base64
from django.db import models from django.db import models
from django.utils.translation import ugettext as _ from utils.translation_ext import xugettext as _
DEFAULT_DATA = { DEFAULT_DATA = {
'event_name': 'OpenSlides', 'event_name': 'OpenSlides',
@ -39,7 +39,7 @@ class ConfigStore(models.Model):
class Meta: class Meta:
verbose_name = 'config' verbose_name = 'config'
permissions = ( permissions = (
('can_manage_system', "Can manage system configuration"), ('can_manage_system', _("Can manage system configuration", fixstr=True)),
) )
# TODO: # TODO: