From b81704a88f1f37df71281c044f003a1fe14e2b47 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Tue, 1 Dec 2015 13:45:54 +0100 Subject: [PATCH] Fixed translations in agendaSupplement. --- openslides/agenda/static/js/agenda/base.js | 12 ++++++------ openslides/assignments/static/js/assignments/base.js | 2 +- openslides/core/static/js/core/site.js | 8 ++++---- openslides/motions/static/js/motions/base.js | 2 +- .../static/templates/motions/motion-list.html | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index 81cee7e79..12da9bc59 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -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); diff --git a/openslides/assignments/static/js/assignments/base.js b/openslides/assignments/static/js/assignments/base.js index f101b4507..bfb11841f 100644 --- a/openslides/assignments/static/js/assignments/base.js +++ b/openslides/assignments/static/js/assignments/base.js @@ -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; diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js index b0bcea1ee..dc3e23a95 100644 --- a/openslides/core/static/js/core/site.js +++ b/openslides/core/static/js/core/site.js @@ -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'} }]; diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index fd50b87f5..80d72ddc0 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -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; diff --git a/openslides/motions/static/templates/motions/motion-list.html b/openslides/motions/static/templates/motions/motion-list.html index 426ad87f6..ae87a1e33 100644 --- a/openslides/motions/static/templates/motions/motion-list.html +++ b/openslides/motions/static/templates/motions/motion-list.html @@ -71,7 +71,7 @@ - {{ motions.length }} {{ "motion" | translate }}, + {{ motions.length }} {{ "motions" | translate }}, {{(motions|filter:{selected:true}).length}} {{ "selected" | translate }}