Merge pull request #1725 from normanjaeckel/Fixes

Several fixes.
This commit is contained in:
Norman Jäckel 2015-11-30 21:12:59 +01:00
commit 6cfa7f2309
7 changed files with 611 additions and 486 deletions

View File

@ -11,7 +11,7 @@
</div> </div>
<div class="details"> <div class="details">
<p class="lead" translate>Drag and drop items to change the order of the agenda. Your modification will be saved directly.</p> <p class="lead" translate>Drag and drop items to change the order of the agenda. Your modification will be saved immediately.</p>
<div ui-tree callbacks="treeOptions"> <div ui-tree callbacks="treeOptions">
<ol ui-tree-nodes="" ng-model="items" id="tree-root"> <ol ui-tree-nodes="" ng-model="items" id="tree-root">

View File

@ -2,7 +2,6 @@ from django.conf import settings
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.db import models from django.db import models
from django.utils.datastructures import SortedDict from django.utils.datastructures import SortedDict
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy, ugettext_noop from django.utils.translation import ugettext_lazy, ugettext_noop
from openslides.agenda.models import Item, Speaker from openslides.agenda.models import Item, Speaker
@ -355,9 +354,6 @@ class AssignmentPoll(RESTModelMixin, CollectDefaultVotesMixin,
blank=True, blank=True,
verbose_name=ugettext_lazy("Comment on the ballot paper")) verbose_name=ugettext_lazy("Comment on the ballot paper"))
def __str__(self):
return _("Ballot %d") % self.get_ballot()
def get_assignment(self): def get_assignment(self):
return self.assignment return self.assignment

View File

@ -1,4 +1,4 @@
<h1 translate>Ballot {{ ballot }}</h1> <h1><translate>Ballot</translate> {{ ballot }}</h1>
<form name="assignmentpollForm" ng-submit="save(model)"> <form name="assignmentpollForm" ng-submit="save(model)">
<formly-form model="model" fields="formFields"> <formly-form model="model" fields="formFields">

View File

@ -248,7 +248,7 @@ class AssignmentPDF(PDFView):
try: try:
assignment = Assignment.objects.get(pk=self.kwargs['pk']) assignment = Assignment.objects.get(pk=self.kwargs['pk'])
filename = u'%s-%s' % ( filename = u'%s-%s' % (
_("Assignment"), _("Election"),
assignment.title.replace(' ', '_')) assignment.title.replace(' ', '_'))
except: except:
filename = _("Elections") filename = _("Elections")
@ -272,7 +272,7 @@ class AssignmentPDF(PDFView):
assignments = Assignment.objects.all() assignments = Assignment.objects.all()
if not assignments: # No assignments existing if not assignments: # No assignments existing
story.append(Paragraph( story.append(Paragraph(
_("No assignments available."), stylesheet['Heading3'])) _("No elections available."), stylesheet['Heading3']))
else: # Print all assignments else: # Print all assignments
# List of assignments # List of assignments
for assignment in assignments: for assignment in assignments:

File diff suppressed because it is too large Load Diff

View File

@ -5,66 +5,66 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-21 00:01+0100\n" "POT-Creation-Date: 2015-11-30 20:59+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"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: agenda/models.py:136 #: agenda/models.py:160
msgid "Agenda item" msgid "Agenda item"
msgstr "" msgstr ""
#: agenda/models.py:137 #: agenda/models.py:161
msgid "Hidden item" msgid "Hidden item"
msgstr "" msgstr ""
#: agenda/models.py:139 #: agenda/models.py:163
msgid "Number" msgid "Number"
msgstr "" msgstr ""
#: agenda/models.py:144 users/models.py:137 #: agenda/models.py:168 users/models.py:137
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#: agenda/models.py:149 #: agenda/models.py:173
msgid "Closed" msgid "Closed"
msgstr "" msgstr ""
#: agenda/models.py:157 #: agenda/models.py:181
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: agenda/models.py:174 core/models.py:130 #: agenda/models.py:198 core/models.py:130
msgid "Weight" msgid "Weight"
msgstr "" msgstr ""
#: agenda/models.py:195 #: agenda/models.py:219
msgid "List of speakers is closed" msgid "List of speakers is closed"
msgstr "" msgstr ""
#: agenda/models.py:202 #: agenda/models.py:226
msgid "Can see agenda" msgid "Can see agenda"
msgstr "" msgstr ""
#: agenda/models.py:203 #: agenda/models.py:227
msgid "Can manage agenda" msgid "Can manage agenda"
msgstr "" msgstr ""
#: agenda/models.py:204 #: agenda/models.py:228
msgid "Can see hidden items and time scheduling of agenda" msgid "Can see hidden items and time scheduling of agenda"
msgstr "" msgstr ""
#: agenda/models.py:307 #: agenda/models.py:303
#, python-format #, python-format
msgid "%(user)s is already on the list of speakers of item %(id)s." msgid "%(user)s is already on the list of speakers of item %(id)s."
msgstr "" msgstr ""
#: agenda/models.py:311 #: agenda/models.py:307
msgid "An anonymous user can not be on lists of speakers." msgid "An anonymous user can not be on lists of speakers."
msgstr "" msgstr ""
#: agenda/models.py:351 #: agenda/models.py:347
msgid "Can put oneself on the list of speakers" msgid "Can put oneself on the list of speakers"
msgstr "" msgstr ""
@ -81,8 +81,8 @@ msgid "Input format: DD.MM.YYYY HH:MM"
msgstr "" msgstr ""
#: agenda/signals.py:34 agenda/signals.py:43 agenda/signals.py:53 #: agenda/signals.py:34 agenda/signals.py:43 agenda/signals.py:53
#: agenda/signals.py:60 agenda/signals.py:72 agenda/views.py:230 #: agenda/signals.py:60 agenda/signals.py:72 agenda/views.py:240
#: agenda/views.py:231 #: agenda/views.py:241
msgid "Agenda" msgid "Agenda"
msgstr "" msgstr ""
@ -114,149 +114,149 @@ msgstr ""
msgid "Roman" msgid "Roman"
msgstr "" msgstr ""
#: agenda/views.py:104 #: agenda/views.py:105
msgid "The list of speakers is closed." msgid "The list of speakers is closed."
msgstr "" msgstr ""
#: agenda/views.py:113 #: agenda/views.py:114
msgid "User does not exist." msgid "User does not exist."
msgstr "" msgstr ""
#: agenda/views.py:121 #: agenda/views.py:122
#, python-format #, python-format
msgid "User %s was successfully added to the list of speakers." msgid "User %s was successfully added to the list of speakers."
msgstr "" msgstr ""
#: agenda/views.py:139 #: agenda/views.py:140
msgid "You are not on the list of speakers." msgid "You are not on the list of speakers."
msgstr "" msgstr ""
#: agenda/views.py:147 agenda/views.py:177 #: agenda/views.py:148 agenda/views.py:178
msgid "Speaker does not exist." msgid "Speaker does not exist."
msgstr "" msgstr ""
#: agenda/views.py:151 #: agenda/views.py:152
#, python-format #, python-format
msgid "Speaker %s was successfully removed from the list of speakers." msgid "Speaker %s was successfully removed from the list of speakers."
msgstr "" msgstr ""
#: agenda/views.py:172 #: agenda/views.py:173
msgid "The list of speakers is empty." msgid "The list of speakers is empty."
msgstr "" msgstr ""
#: agenda/views.py:179 #: agenda/views.py:180
msgid "User is now speaking." msgid "User is now speaking."
msgstr "" msgstr ""
#: agenda/views.py:190 #: agenda/views.py:191
#, python-format #, python-format
msgid "There is no one speaking at the moment according to %(item)s." msgid "There is no one speaking at the moment according to %(item)s."
msgstr "" msgstr ""
#: agenda/views.py:192 #: agenda/views.py:193
msgid "The speech is finished now." msgid "The speech is finished now."
msgstr "" msgstr ""
#: assignments/models.py:30 #: agenda/views.py:230
msgid "The agenda has been numbered."
msgstr ""
#: assignments/models.py:29
msgid "candidate" msgid "candidate"
msgstr "" msgstr ""
#: assignments/models.py:31 assignments/views.py:413 #: assignments/models.py:30 assignments/views.py:414
msgid "elected" msgid "elected"
msgstr "" msgstr ""
#: assignments/models.py:32 #: assignments/models.py:31
msgid "blocked" msgid "blocked"
msgstr "" msgstr ""
#: assignments/models.py:65 #: assignments/models.py:64
msgid "Searching for candidates" msgid "Searching for candidates"
msgstr "" msgstr ""
#: assignments/models.py:66 #: assignments/models.py:65
msgid "Voting" msgid "Voting"
msgstr "" msgstr ""
#: assignments/models.py:67 #: assignments/models.py:66
msgid "Finished" msgid "Finished"
msgstr "" msgstr ""
#: assignments/models.py:72 core/models.py:124 core/signals.py:126 #: assignments/models.py:71 core/models.py:124 core/signals.py:126
#: mediafiles/models.py:19 motions/models.py:554 users/models.py:124 #: mediafiles/models.py:19 motions/models.py:554 users/models.py:124
#: users/pdf.py:26 #: users/pdf.py:26
msgid "Title" msgid "Title"
msgstr "" msgstr ""
#: assignments/models.py:79 #: assignments/models.py:78
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: assignments/models.py:85 assignments/views.py:302 #: assignments/models.py:84 assignments/views.py:303
msgid "Number of members to be elected" msgid "Number of members to be elected"
msgstr "" msgstr ""
#: assignments/models.py:93 #: assignments/models.py:92
msgid "Default comment on the ballot paper" msgid "Default comment on the ballot paper"
msgstr "" msgstr ""
#: assignments/models.py:121 #: assignments/models.py:120
msgid "Can see elections" msgid "Can see elections"
msgstr "" msgstr ""
#: assignments/models.py:122 #: assignments/models.py:121
msgid "Can nominate another participant" msgid "Can nominate another participant"
msgstr "" msgstr ""
#: assignments/models.py:123 #: assignments/models.py:122
msgid "Can nominate oneself" msgid "Can nominate oneself"
msgstr "" msgstr ""
#: assignments/models.py:124 #: assignments/models.py:123
msgid "Can manage elections" msgid "Can manage elections"
msgstr "" msgstr ""
#: assignments/models.py:127 assignments/views.py:442 assignments/views.py:459 #: assignments/models.py:126 assignments/views.py:251 assignments/views.py:443
#: assignments/views.py:460
msgid "Election" msgid "Election"
msgstr "" msgstr ""
#: assignments/models.py:357 #: assignments/models.py:355
msgid "Comment on the ballot paper" msgid "Comment on the ballot paper"
msgstr "" msgstr ""
#: assignments/models.py:360 #: assignments/models.py:362 assignments/views.py:523 motions/models.py:691
#, python-format
msgid "Ballot %d"
msgstr ""
#: assignments/models.py:367 assignments/views.py:522 motions/models.py:691
#: motions/pdf.py:125 motions/pdf.py:270 #: motions/pdf.py:125 motions/pdf.py:270
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
#: assignments/models.py:367 assignments/views.py:523 motions/models.py:691 #: assignments/models.py:362 assignments/views.py:524 motions/models.py:691
#: motions/pdf.py:125 motions/pdf.py:272 #: motions/pdf.py:125 motions/pdf.py:272
msgid "No" msgid "No"
msgstr "" msgstr ""
#: assignments/models.py:367 motions/models.py:691 #: assignments/models.py:362 motions/models.py:691
msgid "Abstain" msgid "Abstain"
msgstr "" msgstr ""
#: assignments/models.py:369 #: assignments/models.py:364
msgid "Votes" msgid "Votes"
msgstr "" msgstr ""
#: assignments/serializers.py:114 #: assignments/serializers.py:119
#, python-format #, python-format
msgid "You have to submit data for %d candidates." msgid "You have to submit data for %d candidates."
msgstr "" msgstr ""
#: assignments/serializers.py:118 motions/serializers.py:168 #: assignments/serializers.py:123 motions/serializers.py:168
#, python-format #, python-format
msgid "You have to submit data for %d vote values." msgid "You have to submit data for %d vote values."
msgstr "" msgstr ""
#: assignments/serializers.py:122 motions/serializers.py:172 #: assignments/serializers.py:127 motions/serializers.py:172
#, python-format #, python-format
msgid "Vote value %s is invalid." msgid "Vote value %s is invalid."
msgstr "" msgstr ""
@ -281,7 +281,7 @@ msgstr ""
#: assignments/signals.py:51 assignments/signals.py:60 #: assignments/signals.py:51 assignments/signals.py:60
#: assignments/signals.py:71 assignments/signals.py:78 #: assignments/signals.py:71 assignments/signals.py:78
#: assignments/signals.py:81 assignments/signals.py:90 #: assignments/signals.py:81 assignments/signals.py:90
#: assignments/views.py:253 #: assignments/views.py:254
msgid "Elections" msgid "Elections"
msgstr "" msgstr ""
@ -387,84 +387,85 @@ msgstr ""
#: assignments/views.py:169 #: assignments/views.py:169
#, python-format #, python-format
msgid "User %s does not want to be an candidate." msgid "User %s does not want to be a candidate. Only a manager can do this."
msgstr "" msgstr ""
#: assignments/views.py:174 #: assignments/views.py:173
#, python-format
msgid "User %s is already nominated."
msgstr ""
#: assignments/views.py:175
#, python-format #, python-format
msgid "User %s was nominated successfully." msgid "User %s was nominated successfully."
msgstr "" msgstr ""
#: assignments/views.py:181 #: assignments/views.py:182
msgid "" msgid ""
"You can not delete someones candidature to this election because it is " "You can not delete someones candidature to this election because it is "
"finished." "finished."
msgstr "" msgstr ""
#: assignments/views.py:184 #: assignments/views.py:185
#, python-format #, python-format
msgid "User %s has no status in this election." msgid "User %s has no status in this election."
msgstr "" msgstr ""
#: assignments/views.py:186 #: assignments/views.py:187
#, python-format #, python-format
msgid "Candidate %s was withdrawn/unblocked successfully." msgid "Candidate %s was withdrawn/unblocked successfully."
msgstr "" msgstr ""
#: assignments/views.py:198 #: assignments/views.py:199
#, python-format #, python-format
msgid "User %s is not a candidate of this election." msgid "User %s is not a candidate of this election."
msgstr "" msgstr ""
#: assignments/views.py:200 #: assignments/views.py:201
#, python-format #, python-format
msgid "User %s was successfully elected." msgid "User %s was successfully elected."
msgstr "" msgstr ""
#: assignments/views.py:204 #: assignments/views.py:205
#, python-format #, python-format
msgid "User %s is not an elected candidate of this election." msgid "User %s is not an elected candidate of this election."
msgstr "" msgstr ""
#: assignments/views.py:207 #: assignments/views.py:208
#, python-format #, python-format
msgid "User %s was successfully unelected." msgid "User %s was successfully unelected."
msgstr "" msgstr ""
#: assignments/views.py:217 #: assignments/views.py:218
msgid "Can not create poll because there are no candidates." msgid "Can not create poll because there are no candidates."
msgstr "" msgstr ""
#: assignments/views.py:220 motions/views.py:252 #: assignments/views.py:221 motions/views.py:252
msgid "Poll created successfully." msgid "Poll created successfully."
msgstr "" msgstr ""
#: assignments/views.py:250 #: assignments/views.py:275
msgid "Assignment" msgid "No elections available."
msgstr "" msgstr ""
#: assignments/views.py:274 #: assignments/views.py:294
msgid "No assignments available."
msgstr ""
#: assignments/views.py:293
#, python-format #, python-format
msgid "Election: %s" msgid "Election: %s"
msgstr "" msgstr ""
#: assignments/views.py:309 assignments/views.py:337 #: assignments/views.py:310 assignments/views.py:338
msgid "Candidates" msgid "Candidates"
msgstr "" msgstr ""
#: assignments/views.py:333 #: assignments/views.py:334
msgid "Election result" msgid "Election result"
msgstr "" msgstr ""
#: assignments/views.py:339 #: assignments/views.py:340
msgid "ballot" msgid "ballot"
msgstr "" msgstr ""
#: assignments/views.py:358 #: assignments/views.py:359
#, python-format #, python-format
msgid "" msgid ""
"Y: %(YES)s\n" "Y: %(YES)s\n"
@ -472,38 +473,38 @@ msgid ""
"A: %(ABSTAIN)s" "A: %(ABSTAIN)s"
msgstr "" msgstr ""
#: assignments/views.py:369 motions/pdf.py:115 poll/models.py:82 #: assignments/views.py:370 motions/pdf.py:115 poll/models.py:82
msgid "Valid votes" msgid "Valid votes"
msgstr "" msgstr ""
#: assignments/views.py:380 motions/pdf.py:117 poll/models.py:84 #: assignments/views.py:381 motions/pdf.py:117 poll/models.py:84
msgid "Invalid votes" msgid "Invalid votes"
msgstr "" msgstr ""
#: assignments/views.py:391 motions/pdf.py:119 poll/models.py:86 #: assignments/views.py:392 motions/pdf.py:119 poll/models.py:86
msgid "Votes cast" msgid "Votes cast"
msgstr "" msgstr ""
#: assignments/views.py:466 #: assignments/views.py:467
#, python-format #, python-format
msgid "%d. ballot" msgid "%d. ballot"
msgstr "" msgstr ""
#: assignments/views.py:468 #: assignments/views.py:469
#, python-format #, python-format
msgid "%d candidate" msgid "%d candidate"
msgid_plural "%d candidates" msgid_plural "%d candidates"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: assignments/views.py:470 #: assignments/views.py:471
#, python-format #, python-format
msgid "%d available post" msgid "%d available post"
msgid_plural "%d available posts" msgid_plural "%d available posts"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: assignments/views.py:524 motions/pdf.py:125 motions/pdf.py:274 #: assignments/views.py:525 motions/pdf.py:125 motions/pdf.py:274
msgid "Abstention" msgid "Abstention"
msgstr "" msgstr ""
@ -636,8 +637,8 @@ msgstr ""
#: core/signals.py:86 #: core/signals.py:86
msgid "" msgid ""
"You can replace the logo. Just copy a file to \"static/img/logo.png\" in " "You can replace the logo. Just copy a file to \"static/img/logo-projector.png"
"your OpenSlides data path." "\" in your OpenSlides data path."
msgstr "" msgstr ""
#: core/signals.py:89 core/signals.py:97 core/signals.py:105 #: core/signals.py:89 core/signals.py:97 core/signals.py:105

View File

@ -42,7 +42,7 @@
<li><translate>Default groups</translate>: <li><translate>Default groups</translate>:
<translate>Delegate</translate> <code>3</code>, <translate>Delegate</translate> <code>3</code>,
<translate>Staff</translate> <code>4</code> <translate>Staff</translate> <code>4</code>
<li translate>At least first name or lastname have to be filled in. All <li translate>At least first name or last name have to be filled in. All
other fields are optional and may be empty. other fields are optional and may be empty.
<li translate>The header in first line is required. <li translate>The header in first line is required.
<li translate>Required CSV file encoding is UTF-8. <li translate>Required CSV file encoding is UTF-8.