Merge pull request #1734 from emanuelschuetze/fixTranslationAgendaSupplement

Fixed translations in agendaSupplement.
This commit is contained in:
Oskar Hahn 2015-12-01 14:22:41 +01:00
commit acbe929706
5 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

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