Fixed translations in agendaSupplement.

This commit is contained in:
Emanuel Schuetze 2015-12-01 13:45:54 +01:00
parent 3dd3a2f4fd
commit b81704a88f
5 changed files with 13 additions and 13 deletions

View File

@ -26,7 +26,8 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
'Speaker',
'jsDataModel',
'Projector',
function(DS, Speaker, jsDataModel, Projector) {
'gettextCatalog',
function(DS, Speaker, jsDataModel, Projector, gettextCatalog) {
var name = 'agenda/item';
return DS.defineResource({
name: name,
@ -50,11 +51,10 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
// in the DS store.
title = this.title;
}
return _.trim(
title + ' ' + (
this.getContentResource().agendaSupplement || ''
)
);
if (this.getContentResource().agendaSupplement) {
title = title + ' (' + gettextCatalog.getString(this.getContentResource().agendaSupplement) + ')';
}
return title;
},
isProjected: function () {
var projector = Projector.get(1);

View File

@ -77,7 +77,7 @@ angular.module('OpenSlidesApp.assignments', [])
return DS.defineResource({
name: name,
useClass: jsDataModel,
agendaSupplement: '(' + gettext('Election') + ')',
agendaSupplement: gettext('Election'),
methods: {
getResourceName: function () {
return name;

View File

@ -450,9 +450,9 @@ angular.module('OpenSlidesApp.core.site', [
// Provide generic customslide form fields for create and update view
.factory('CustomslideFormFieldFactory', [
'gettext',
'gettextCatalog',
'CKEditorOptions',
function (gettext, CKEditorOptions) {
function (gettextCatalog, CKEditorOptions) {
return {
getFormFields: function () {
return [
@ -460,7 +460,7 @@ angular.module('OpenSlidesApp.core.site', [
key: 'title',
type: 'input',
templateOptions: {
label: gettext('Title'),
label: gettextCatalog.getString('Title'),
required: true
}
},
@ -468,7 +468,7 @@ angular.module('OpenSlidesApp.core.site', [
key: 'text',
type: 'textarea',
templateOptions: {
label: gettext('Text')
label: gettextCatalog.getString('Text')
},
ngModelElAttrs: {'ckeditor': 'CKEditorOptions'}
}];

View File

@ -168,7 +168,7 @@ angular.module('OpenSlidesApp.motions', ['OpenSlidesApp.users'])
return DS.defineResource({
name: name,
useClass: jsDataModel,
agendaSupplement: '(' + gettext('Motion') + ')',
agendaSupplement: gettext('Motion'),
methods: {
getResourceName: function () {
return name;

View File

@ -71,7 +71,7 @@
</div>
<i class="spacer">
{{ motions.length }} {{ "motion" | translate }}<span ng-if="(motions|filter:{selected:true}).length > 0">,
{{ motions.length }} {{ "motions" | translate }}<span ng-if="(motions|filter:{selected:true}).length > 0">,
{{(motions|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
</i>
<table class="table table-striped table-bordered table-hover">