From 83baa29b2ee8640a0a3ed519a3a9ca9f09f97881 Mon Sep 17 00:00:00 2001 From: Till Breuer Date: Tue, 1 Apr 2014 10:49:19 +0200 Subject: [PATCH] Fix some I18n --- .../angular/directives/components/icon-wrapper-directive.js | 4 ++-- .../directives/components/toggled-multiselect-directive.js | 6 ++++-- .../directives/work_packages/query-filter-directive.js | 3 ++- .../work_packages/work-packages-loading-directive.js | 4 +--- config/locales/js-de.yml | 1 + config/locales/js-en.yml | 1 + public/templates/components/icon_wrapper.html | 4 ++-- public/templates/components/toggled_multiselect.html | 4 ++-- public/templates/work_packages/query_filters.html | 2 +- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/angular/directives/components/icon-wrapper-directive.js b/app/assets/javascripts/angular/directives/components/icon-wrapper-directive.js index f73c9b69f6..a96df0c7bd 100644 --- a/app/assets/javascripts/angular/directives/components/icon-wrapper-directive.js +++ b/app/assets/javascripts/angular/directives/components/icon-wrapper-directive.js @@ -1,11 +1,11 @@ // TODO move to UI components angular.module('openproject.uiComponents') -.directive('iconWrapper', ['I18n', function(I18n){ +.directive('iconWrapper', [function(){ return { restrict: 'EA', replace: true, - scope: { iconName: '@', title: '=iconTitle' }, + scope: { iconName: '@', title: '@iconTitle' }, templateUrl: '/templates/components/icon_wrapper.html' }; }]); diff --git a/app/assets/javascripts/angular/directives/components/toggled-multiselect-directive.js b/app/assets/javascripts/angular/directives/components/toggled-multiselect-directive.js index 5d9394e973..58c16e3ac5 100644 --- a/app/assets/javascripts/angular/directives/components/toggled-multiselect-directive.js +++ b/app/assets/javascripts/angular/directives/components/toggled-multiselect-directive.js @@ -1,17 +1,19 @@ // TODO move to UI components angular.module('openproject.uiComponents') -.directive('toggledMultiselect', ['WorkPackagesHelper', function(WorkPackagesHelper){ +.directive('toggledMultiselect', ['WorkPackagesHelper', 'I18n', function(WorkPackagesHelper, I18n){ return { restrict: 'EA', replace: true, scope: { name: '=', values: '=', - availableOptions: '=', + availableOptions: '=' }, templateUrl: '/templates/components/toggled_multiselect.html', link: function(scope, element, attributes){ + scope.I18n = I18n; + scope.toggleMultiselect = function(){ scope.isMultiselect = !scope.isMultiselect; }; diff --git a/app/assets/javascripts/angular/directives/work_packages/query-filter-directive.js b/app/assets/javascripts/angular/directives/work_packages/query-filter-directive.js index 9fe2901d47..ebfe0f48fa 100644 --- a/app/assets/javascripts/angular/directives/work_packages/query-filter-directive.js +++ b/app/assets/javascripts/angular/directives/work_packages/query-filter-directive.js @@ -6,7 +6,8 @@ angular.module('openproject.workPackages.directives') restrict: 'A', scope: true, link: function(scope, element, attributes) { - scope.isLoading = false; // don't shadow isLoading as its used for a different purpose in this context + scope.I18n = I18n; + scope.isLoading = false; // shadow isLoading as its used for a different purpose in this context scope.showValueOptionsAsSelect = ['list', 'list_optional', 'list_status', 'list_subprojects', 'list_model'].indexOf(scope.query.getFilterType(scope.filter.name)) !== -1; diff --git a/app/assets/javascripts/angular/directives/work_packages/work-packages-loading-directive.js b/app/assets/javascripts/angular/directives/work_packages/work-packages-loading-directive.js index cb3974d8a0..cf8bee1221 100644 --- a/app/assets/javascripts/angular/directives/work_packages/work-packages-loading-directive.js +++ b/app/assets/javascripts/angular/directives/work_packages/work-packages-loading-directive.js @@ -5,8 +5,6 @@ angular.module('openproject.workPackages.directives') return { restrict: 'E', templateUrl: '/templates/work_packages/work_packages_loading.html', - scope: true, - link: function(scope, element, attributes) { - } + scope: true }; }]); diff --git a/config/locales/js-de.yml b/config/locales/js-de.yml index 0c6c1fad00..96a47f2729 100644 --- a/config/locales/js-de.yml +++ b/config/locales/js-de.yml @@ -4,6 +4,7 @@ de: hide: "Verbergen" loading: "Lädt ..." button_check_all: "Alles auswählen" + button_delete: "Löschen" button_uncheck_all: "Alles abwählen" description_available_columns: "Verfügbare Spalten" description_select_work_package: "Arbeitspaket auswählen" diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml index 90637c6a69..9c24cff42b 100644 --- a/config/locales/js-en.yml +++ b/config/locales/js-en.yml @@ -4,6 +4,7 @@ en: hide: "Hide" loading: "Loading ..." button_check_all: "Check all" + button_delete: "Delete" button_uncheck_all: "Uncheck all" description_available_columns: "Available Columns" description_select_work_package: "Select work package" diff --git a/public/templates/components/icon_wrapper.html b/public/templates/components/icon_wrapper.html index 0105370eb5..a5979cb606 100644 --- a/public/templates/components/icon_wrapper.html +++ b/public/templates/components/icon_wrapper.html @@ -1,3 +1,3 @@ - - + + {{title}} diff --git a/public/templates/components/toggled_multiselect.html b/public/templates/components/toggled_multiselect.html index ecbc61c002..15b476717f 100644 --- a/public/templates/components/toggled_multiselect.html +++ b/public/templates/components/toggled_multiselect.html @@ -22,8 +22,8 @@ - + + icon-title="{{I18n.t('js.work_packages.label_enable_multi_select')}}"/> diff --git a/public/templates/work_packages/query_filters.html b/public/templates/work_packages/query_filters.html index ae53a86ec7..55f00263ae 100644 --- a/public/templates/work_packages/query_filters.html +++ b/public/templates/work_packages/query_filters.html @@ -142,7 +142,7 @@