From 052daa2b19e2d514af366d49aa88f7a0e7c7d383 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Mon, 19 Mar 2018 11:58:16 +0100 Subject: [PATCH] Fixing translations (fixes #3607, fixes #3604). --- openslides/agenda/static/js/agenda/csv.js | 2 +- openslides/motions/static/js/motions/csv.js | 6 +++--- openslides/motions/static/js/motions/docx.js | 2 +- openslides/topics/static/js/topics/csv.js | 2 +- openslides/users/static/js/users/csv.js | 4 ++-- openslides/users/static/js/users/site.js | 7 ++++--- openslides/users/static/templates/users/group-edit.html | 2 +- openslides/users/static/templates/users/group-list.html | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/openslides/agenda/static/js/agenda/csv.js b/openslides/agenda/static/js/agenda/csv.js index 863266f3f..9de5fcb93 100644 --- a/openslides/agenda/static/js/agenda/csv.js +++ b/openslides/agenda/static/js/agenda/csv.js @@ -32,7 +32,7 @@ angular.module('OpenSlidesApp.agenda.csv', []) row.push('"' + (item.is_hidden ? '1' : '') + '"'); csvRows.push(row); }); - CsvDownload(csvRows, 'agenda-export.csv'); + CsvDownload(csvRows, gettextCatalog.getString('Agenda') + '.csv'); }, }; } diff --git a/openslides/motions/static/js/motions/csv.js b/openslides/motions/static/js/motions/csv.js index c165212a4..c839498ae 100644 --- a/openslides/motions/static/js/motions/csv.js +++ b/openslides/motions/static/js/motions/csv.js @@ -38,7 +38,7 @@ angular.module('OpenSlidesApp.motions.csv', []) params = {}; } _.defaults(params, { - filename: 'motions-export.csv', + filename: gettextCatalog.getString('motions') + '.csv', changeRecommendationMode: Config.get('motions_recommendation_text_mode').value, include: { text: true, @@ -101,7 +101,7 @@ angular.module('OpenSlidesApp.motions.csv', []) csvRows.push(row); }); - CsvDownload(csvRows, 'motions-export.csv'); + CsvDownload(csvRows, params.filename); }, downloadExample: function () { var csvRows = [makeHeaderline({ include: { @@ -118,7 +118,7 @@ angular.module('OpenSlidesApp.motions.csv', []) ['B1', 'Title 2', 'Text 2', 'Reason 2', 'Submitter B', 'Category B', '', 'Block A'], ['' , 'Title 3', 'Text 3', '', '', '', '', ''], ]; - CsvDownload(csvRows, 'motions-example.csv'); + CsvDownload(csvRows, gettextCatalog.getString('motions-example') + '.csv'); }, }; } diff --git a/openslides/motions/static/js/motions/docx.js b/openslides/motions/static/js/motions/docx.js index 90a78623a..7d0baa8e4 100644 --- a/openslides/motions/static/js/motions/docx.js +++ b/openslides/motions/static/js/motions/docx.js @@ -182,7 +182,7 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx']) converter = Html2DocxConverter.createInstance(); params = _.clone(params || {}); // Clone this to avoid sideeffects. _.defaults(params, { - filename: 'motions-export.docx', + filename: gettextCatalog.getString('motions') + '.docx', changeRecommendationMode: Config.get('motions_recommendation_text_mode').value, include: { text: true, diff --git a/openslides/topics/static/js/topics/csv.js b/openslides/topics/static/js/topics/csv.js index cd5f6c01c..68fa7e9e8 100644 --- a/openslides/topics/static/js/topics/csv.js +++ b/openslides/topics/static/js/topics/csv.js @@ -23,7 +23,7 @@ angular.module('OpenSlidesApp.topics.csv', []) ['Demo 2', 'Demo text 2', '1:30', '', ''] ]; - CsvDownload(csvRows, 'agenda-example.csv'); + CsvDownload(csvRows, gettextCatalog.getString('agenda-example') + '.csv'); }, }; } diff --git a/openslides/users/static/js/users/csv.js b/openslides/users/static/js/users/csv.js index 74ce706ca..d0ac2cb84 100644 --- a/openslides/users/static/js/users/csv.js +++ b/openslides/users/static/js/users/csv.js @@ -41,7 +41,7 @@ angular.module('OpenSlidesApp.users.csv', []) row.push('"' + user.email + '"'); csvRows.push(row); }); - CsvDownload(csvRows, 'users-export.csv'); + CsvDownload(csvRows, gettextCatalog.getString('participants') + '.csv'); }, downloadExample: function () { @@ -65,7 +65,7 @@ angular.module('OpenSlidesApp.users.csv', []) ['', '', 'Executive Board', '', '', '', '', '', '', '1', '', ''], ]; - CsvDownload(csvRows, 'users-example.csv'); + CsvDownload(csvRows, gettextCatalog.getString('participants-example') + '.csv'); } }; } diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 5b63cd566..c2ced0f02 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -1590,14 +1590,15 @@ angular.module('OpenSlidesApp.users.site', [ '$scope', 'Group', 'group', + 'gettextCatalog', 'ErrorMessage', - function($scope, Group, group, ErrorMessage) { + function($scope, Group, group, gettextCatalog, ErrorMessage) { $scope.group = group; - $scope.new_name = group.name; + $scope.new_name = gettextCatalog.getString(group.name); $scope.alert = {}; $scope.save = function() { - var old_name = $scope.group.name; + var old_name = gettextCatalog.getString($scope.group.name); $scope.group.name = $scope.new_name; Group.save($scope.group).then( function (success) { diff --git a/openslides/users/static/templates/users/group-edit.html b/openslides/users/static/templates/users/group-edit.html index fdd3e7cd9..57d4e8342 100644 --- a/openslides/users/static/templates/users/group-edit.html +++ b/openslides/users/static/templates/users/group-edit.html @@ -7,7 +7,7 @@