Merge pull request #1741 from emanuelschuetze/translations

Updated English translation strings.
This commit is contained in:
Norman Jäckel 2015-12-07 15:36:18 +01:00
commit d368bedfc9
13 changed files with 62 additions and 67 deletions

View File

@ -300,7 +300,7 @@ class SpeakerManager(models.Manager):
"""
if self.filter(user=user, item=item, begin_time=None).exists():
raise OpenSlidesError(
_('%(user)s is already on the list of speakers of item %(id)s.')
_('%(user)s is already on the list of speakers of %(id)s.')
% {'user': user, 'id': item.id})
if isinstance(user, AnonymousUser):
raise OpenSlidesError(

View File

@ -76,7 +76,7 @@
<div class="col-sm-12 text-right">
<!-- hidden item filter -->
<input type="checkbox" ng-model="filter.noHiddenItems" ng-true-value="1" ng-false-value="">
<translate> Hide internal agenda items</translate>
<translate> Hide internal items</translate>
<!-- closed filter -->
<input type="checkbox" ng-model="filter.noClosedItems" ng-true-value="false" ng-false-value="">
<translate> Hide closed items</translate>
@ -132,7 +132,7 @@
<input type="checkbox" ng-model="item.selected">
<!-- agenda data columns -->
<td ng-if="!item.quickEdit" ng-mouseover="item.hover=true" ng-mouseleave="item.hover=false">
<span ng-if="item.type == 2" title="'Hidden agenda item'|translate"><i class="fa fa-ban"></i></span>
<span ng-if="item.type == 2" title="'Hidden item'|translate"><i class="fa fa-ban"></i></span>
<strong>
<a href="" ng-click="open(item)">
<span ng-repeat="n in [].constructor(item.parentCount) track by $index">&ndash;</span>
@ -190,7 +190,7 @@
<label>
<!-- item type: AGENDA_ITEM = 1, HIDDEN_ITEM = 2 -->
<input type="checkbox" ng-model="item.type" ng-true-value="2" ng-false-value="1">
<translate> Hidden agenda item</translate>
<translate> Hidden item</translate>
</label>
</div>
<div class="col-xs-6">

View File

@ -359,9 +359,9 @@ class AssignmentPoll(RESTModelMixin, CollectDefaultVotesMixin,
def get_vote_values(self):
if self.yesnoabstain:
return [ugettext_noop('Yes'), ugettext_noop('No'), ugettext_noop('Abstain')]
return ['Yes', 'No', 'Abstain']
else:
return [ugettext_noop('Votes')]
return ['Votes']
def get_ballot(self):
return self.assignment.polls.filter(id__lte=self.pk).count()

View File

@ -346,6 +346,9 @@ angular.module('OpenSlidesApp.assignments.site', ['OpenSlidesApp.assignments'])
$scope.alert = { type: 'danger', msg: data.detail, show: true };
});
};
// Just mark some vote value strings for translation.
gettext('Yes'), gettext('No'), gettext('Abstain');
}
])

View File

@ -114,14 +114,18 @@
</div>
<div class="results">
<div ng-repeat="option in poll.options">
<strong>{{ option.candidate.get_full_name() }}</strong>
<div ng-if="option.votes.length > 0">
<div ng-repeat="vote in option.votes">
{{ vote.value}}: {{ vote.weight}}
</div>
<div ng-if="poll.yesnoabstain && option.votes.length > 0">
<strong>{{ option.candidate.get_full_name() }}</strong><br>
{{ option.votes[0].value | translate }}: {{ option.votes[0].weight }}<br>
{{ option.votes[1].value | translate }}: {{ option.votes[1].weight }}<br>
{{ option.votes[2].value | translate }}: {{ option.votes[2].weight }}
<hr class="smallhr">
</div>
<div ng-if="!poll.yesnoabstain && option.votes.length > 0">
{{ option.candidate.get_full_name() }}: {{ option.votes[0].weight}}
<hr class="smallhr">
</div>
</div>
<hr>
Valid votes: {{ poll.votesvalid }}<br>
Invalid votes: {{ poll.votesinvalid }}<br>
Votes cast: {{ poll.votescast }}

View File

@ -215,10 +215,10 @@ class AssignmentViewSet(ModelViewSet):
"""
assignment = self.get_object()
if not assignment.candidates.exists():
raise ValidationError({'detail': _('Can not create poll because there are no candidates.')})
raise ValidationError({'detail': _('Can not create ballot because there are no candidates.')})
with transaction.atomic():
assignment.create_poll()
return Response({'detail': _('Poll created successfully.')})
return Response({'detail': _('Ballot created successfully.')})
class AssignmentPollViewSet(UpdateModelMixin, DestroyModelMixin, GenericViewSet):
@ -522,7 +522,7 @@ class AssignmentPollPDF(PDFView):
{'circle': circle,
'yes': _("Yes"),
'no': _("No"),
'abstain': _("Abstention")},
'abstain': _("Abstain")},
stylesheet['Ballot_option_circle_YNA']))
if counter == 13:
cellcolumnA = cell

View File

@ -26,7 +26,8 @@ msgstr ""
msgid "About me"
msgstr ""
#: assignments/static/js/assignments/site.js:437
#: assignments/static/js/assignments/site.js:351
#: assignments/static/js/assignments/site.js:440
#: motions/static/templates/motions/motion-detail.html:135
#: motions/static/templates/motions/motion-detail.html:136
#: motions/static/templates/motions/motion-detail.html:186
@ -191,7 +192,7 @@ msgid "Comment"
msgstr ""
#: assignments/static/js/assignments/site.js:120
#: assignments/static/js/assignments/site.js:487
#: assignments/static/js/assignments/site.js:490
msgid "Comment on the ballot paper"
msgstr ""
@ -450,7 +451,7 @@ msgstr ""
#: agenda/static/templates/agenda/item-list.html:135
#: agenda/static/templates/agenda/item-list.html:193
msgid "Hidden agenda item"
msgid "Hidden item"
msgstr ""
#: agenda/static/templates/agenda/item-list.html:82
@ -458,7 +459,7 @@ msgid "Hide closed items"
msgstr ""
#: agenda/static/templates/agenda/item-list.html:79
msgid "Hide internal agenda items"
msgid "Hide internal items"
msgstr ""
#: core/static/js/core/site.js:86
@ -654,19 +655,20 @@ msgstr ""
msgid "New password"
msgstr ""
#: motions/static/templates/motions/motion-detail.html:222
msgid "New poll"
msgstr ""
#: core/static/templates/core/tag-form.html:10
msgid "New tag"
msgstr ""
#: motions/static/templates/motions/motion-detail.html:222
msgid "New vote"
msgstr ""
#: agenda/static/templates/agenda/item-detail.html:67
msgid "Next speakers:"
msgstr ""
#: assignments/static/js/assignments/site.js:428
#: assignments/static/js/assignments/site.js:351
#: assignments/static/js/assignments/site.js:431
#: motions/static/templates/motions/motion-detail.html:130
#: motions/static/templates/motions/motion-detail.html:131
#: motions/static/templates/motions/motion-detail.html:177
@ -1137,18 +1139,18 @@ msgstr ""
msgid "Vote"
msgstr ""
#: assignments/static/js/assignments/site.js:477
#: assignments/static/js/assignments/site.js:480
#: motions/static/templates/motions/motion-detail.html:150
#: motions/static/templates/motions/motion-detail.html:151
#: motions/static/templates/motions/motion-detail.html:214
msgid "Votes cast"
msgstr ""
#: assignments/static/js/assignments/site.js:469
#: assignments/static/js/assignments/site.js:472
msgid "Votes invalid"
msgstr ""
#: assignments/static/js/assignments/site.js:461
#: assignments/static/js/assignments/site.js:464
msgid "Votes valid"
msgstr ""
@ -1161,7 +1163,8 @@ msgid "Workflow"
msgstr ""
#: assignments/static/js/assignments/site.js:127
#: assignments/static/js/assignments/site.js:419
#: assignments/static/js/assignments/site.js:351
#: assignments/static/js/assignments/site.js:422
#: motions/static/templates/motions/motion-detail.html:125
#: motions/static/templates/motions/motion-detail.html:126
#: motions/static/templates/motions/motion-detail.html:168

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-30 20:59+0100\n"
"POT-Creation-Date: 2015-12-07 13:31+0100\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -228,24 +228,6 @@ msgstr ""
msgid "Comment on the ballot paper"
msgstr ""
#: assignments/models.py:362 assignments/views.py:523 motions/models.py:691
#: motions/pdf.py:125 motions/pdf.py:270
msgid "Yes"
msgstr ""
#: assignments/models.py:362 assignments/views.py:524 motions/models.py:691
#: motions/pdf.py:125 motions/pdf.py:272
msgid "No"
msgstr ""
#: assignments/models.py:362 motions/models.py:691
msgid "Abstain"
msgstr ""
#: assignments/models.py:364
msgid "Votes"
msgstr ""
#: assignments/serializers.py:119
#, python-format
msgid "You have to submit data for %d candidates."
@ -437,11 +419,11 @@ msgid "User %s was successfully unelected."
msgstr ""
#: assignments/views.py:218
msgid "Can not create poll because there are no candidates."
msgid "Can not create ballot because there are no candidates."
msgstr ""
#: assignments/views.py:221 motions/views.py:252
msgid "Poll created successfully."
#: assignments/views.py:221
msgid "Ballot created successfully."
msgstr ""
#: assignments/views.py:275
@ -504,8 +486,16 @@ msgid_plural "%d available posts"
msgstr[0] ""
msgstr[1] ""
#: assignments/views.py:523 motions/pdf.py:125 motions/pdf.py:270
msgid "Yes"
msgstr ""
#: assignments/views.py:524 motions/pdf.py:125 motions/pdf.py:272
msgid "No"
msgstr ""
#: assignments/views.py:525 motions/pdf.py:125 motions/pdf.py:274
msgid "Abstention"
msgid "Abstain"
msgstr ""
#: core/config.py:28 core/config.py:59
@ -803,7 +793,7 @@ msgstr ""
msgid "Vote result"
msgstr ""
#: motions/pdf.py:121
#: motions/pdf.py:121 motions/views.py:351
msgid "Vote"
msgstr ""
@ -1097,8 +1087,8 @@ msgstr ""
msgid "State set to"
msgstr ""
#: motions/views.py:351
msgid "Poll"
#: motions/views.py:252
msgid "Vote created successfully."
msgstr ""
#: poll/models.py:71
@ -1113,10 +1103,6 @@ msgstr ""
msgid "Disabled (no percents)"
msgstr ""
#: poll/models.py:152
msgid "votes"
msgstr ""
#: users/models.py:99 users/pdf.py:114
msgid "Username"
msgstr ""

View File

@ -687,8 +687,7 @@ class MotionPoll(RESTModelMixin, CollectDefaultVotesMixin, BasePoll):
option_class = MotionOption
"""The option class, witch links between this object the the votes."""
vote_values = [
ugettext_noop('Yes'), ugettext_noop('No'), ugettext_noop('Abstain')]
vote_values = ['Yes', 'No', 'Abstain']
"""The possible anwers for the poll. 'Yes, 'No' and 'Abstain'."""
def __str__(self):

View File

@ -122,7 +122,7 @@ def motion_to_pdf(pdf, motion):
stylesheet['Bold']))
cell6b.append(Paragraph(
"%s: %s <br/> %s: %s <br/> %s: %s <br/> %s %s %s" %
(_("Yes"), yes, _("No"), no, _("Abstention"), abstain, valid, invalid, votescast),
(_("Yes"), yes, _("No"), no, _("Abstain"), abstain, valid, invalid, votescast),
stylesheet['Normal']))
cell6b.append(Spacer(0, 0.2 * cm))
motion_data.append([cell6a, cell6b])
@ -271,7 +271,7 @@ def motion_poll_to_pdf(pdf, poll):
cell.append(Paragraph("<font name='circlefont' size='15'>%s</font> <font name='Ubuntu'>%s</font>"
% (circle, _("No")), stylesheet['Ballot_option']))
cell.append(Paragraph("<font name='circlefont' size='15'>%s</font> <font name='Ubuntu'>%s</font>"
% (circle, _("Abstention")), stylesheet['Ballot_option']))
% (circle, _("Abstain")), stylesheet['Ballot_option']))
data = []
# get ballot papers config values
ballot_papers_selection = config["motions_pdf_ballot_papers_selection"]

View File

@ -219,7 +219,7 @@
</ol>
<button ng-if="motion.isAllowed('create_poll')" ng-click="create_poll()" class="btn btn-default btn-sm">
<i class="fa fa-bar-chart fa-lg"></i>
<translate>New poll</translate>
<translate>New vote</translate>
</button>
</div>
<div class="col-sm-1"></div>

View File

@ -249,7 +249,7 @@ class MotionViewSet(ModelViewSet):
motion.create_poll()
except WorkflowError as e:
raise ValidationError({'detail': e})
return Response({'detail': _('Poll created successfully.')})
return Response({'detail': _('Vote created successfully.')})
class MotionPollViewSet(UpdateModelMixin, DestroyModelMixin, GenericViewSet):
@ -348,7 +348,7 @@ class PollPDFView(PDFView):
"""
Return the filename for the PDF.
"""
return u'%s%s_%s' % (_("Motion"), str(self.get_object().poll_number), _("Poll"))
return u'%s%s_%s' % (_("Motion"), str(self.get_object().poll_number), _("Vote"))
def get_template(self, buffer):
return SimpleDocTemplate(

View File

@ -3,7 +3,7 @@ import locale
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy, ugettext_noop
from django.utils.translation import ugettext_lazy
from openslides.utils.models import MinMaxIntegerField
@ -149,7 +149,7 @@ class BasePoll(models.Model):
"""
Base poll class.
"""
vote_values = [ugettext_noop('votes')]
vote_values = ['Votes']
class Meta:
abstract = True