diff --git a/app/assets/javascripts/angular/directives/components/modal-loading-directive.js b/app/assets/javascripts/angular/directives/components/modal-loading-directive.js
index ec329ece1b..c8ba7ea431 100644
--- a/app/assets/javascripts/angular/directives/components/modal-loading-directive.js
+++ b/app/assets/javascripts/angular/directives/components/modal-loading-directive.js
@@ -33,6 +33,9 @@ angular.module('openproject.uiComponents')
return {
restrict: 'E',
templateUrl: '/templates/components/modal_loading.html',
- scope: true
+ scope: true,
+ link: function(scope, element, attributes) {
+ scope.I18n = I18n;
+ }
};
}]);
diff --git a/app/assets/javascripts/angular/directives/components/progress-bar-directive.js b/app/assets/javascripts/angular/directives/components/progress-bar-directive.js
index 6183b41648..b6501118d2 100644
--- a/app/assets/javascripts/angular/directives/components/progress-bar-directive.js
+++ b/app/assets/javascripts/angular/directives/components/progress-bar-directive.js
@@ -29,7 +29,7 @@
// TODO move to UI components
angular.module('openproject.uiComponents')
-.directive('progressBar', [function() {
+.directive('progressBar', ['I18n', function(I18n) {
return {
restrict: 'EA',
replace: true,
@@ -40,6 +40,8 @@ angular.module('openproject.uiComponents')
},
templateUrl: '/templates/components/progress_bar.html',
link: function(scope) {
+ scope.I18n = I18n;
+
// apply defaults
scope.width = scope.width || '100px';
scope.legend = scope.legend || '';
diff --git a/app/assets/javascripts/angular/directives/components/table-pagination-directive.js b/app/assets/javascripts/angular/directives/components/table-pagination-directive.js
index 46beab0af3..08759de63d 100644
--- a/app/assets/javascripts/angular/directives/components/table-pagination-directive.js
+++ b/app/assets/javascripts/angular/directives/components/table-pagination-directive.js
@@ -28,7 +28,7 @@
angular.module('openproject.uiComponents')
-.directive('tablePagination', ['PaginationService', function(PaginationService) {
+.directive('tablePagination', ['I18n', 'PaginationService', function(I18n, PaginationService) {
return {
restrict: 'EA',
templateUrl: '/templates/components/table_pagination.html',
@@ -37,6 +37,7 @@ angular.module('openproject.uiComponents')
updateResults: '&'
},
link: function(scope, element, attributes) {
+ scope.I18n = I18n;
scope.paginationOptions = PaginationService.getPaginationOptions();
scope.selectPerPage = function(perPage){
diff --git a/app/assets/javascripts/angular/directives/work_packages/filter-clear-directive.js b/app/assets/javascripts/angular/directives/work_packages/filter-clear-directive.js
index fba4ffd3d2..8bd503f8b5 100644
--- a/app/assets/javascripts/angular/directives/work_packages/filter-clear-directive.js
+++ b/app/assets/javascripts/angular/directives/work_packages/filter-clear-directive.js
@@ -28,12 +28,13 @@
angular.module('openproject.workPackages.directives')
-.directive('filterClear', [function(){
+.directive('filterClear', ['I18n', function(I18n){
return {
restrict: 'E',
templateUrl: '/templates/work_packages/filter_clear.html',
scope: true,
link: function(scope, element, attributes) {
+ scope.I18n = I18n;
scope.clearQuery = function(){
scope.$emit('queryResetRequired');
};
diff --git a/config/locales/js-de.yml b/config/locales/js-de.yml
index f2a7e38df5..0d7d711e22 100644
--- a/config/locales/js-de.yml
+++ b/config/locales/js-de.yml
@@ -75,18 +75,22 @@ de:
label_in_more_than: "in mehr als"
label_less_or_equal: "<="
label_less_than_ago: "vor weniger als"
+ label_loading: "Lade..."
label_me: "ich"
label_menu_collapse: "ausblenden"
label_menu_expand: "einblenden"
label_more_than_ago: "vor mehr als"
label_move_column_left: "Spalte nach links verschieben"
label_move_column_right: "Spalte nach rechts verschieben"
+ label_next: "Weiter"
label_no_data: "Nichts anzuzeigen"
label_none: "kein"
label_not_contains: "enthält nicht"
label_not_equals: "ist nicht"
label_open_menu: "Menü öffnen"
label_open_work_packages: "offen"
+ label_previous: "Zurück"
+ label_per_page: "Pro Seite:"
label_remove_columns: "Ausgewählte Spalten entfernen"
label_sort_by: "Sortiere nach"
label_sorted_by: "sortiert nach"
@@ -97,6 +101,7 @@ de:
label_this_week: "aktuelle Woche"
label_today: "heute"
label_work_package: "Arbeitspaket"
+ label_total_progress: "Gesamtfortschritt"
text_are_you_sure: "Sind Sie sicher?"
@@ -220,6 +225,7 @@ de:
insert_columns: "Spalten hinzufügen ..."
filters: "Filter"
display_sums: "Summen anzeigen"
+ button_clear: "Zurücksetzen"
toolbar:
settings:
columns: "Spalten ..."
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index e26964c6da..ee58e10e92 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -75,18 +75,22 @@ en:
label_in_more_than: "in more than"
label_less_or_equal: "<="
label_less_than_ago: "less than days ago"
+ label_loading: "Loading..."
label_me: "me"
label_menu_collapse: "collapse"
label_menu_expand: "expand"
label_more_than_ago: "more than days ago"
label_move_column_left: "Move column left"
label_move_column_right: "Move column right"
+ label_next: "Next"
label_no_data: "No data to display"
label_none: "none"
label_not_contains: "doesn't contain"
label_not_equals: "is not"
label_open_menu: "Open menu"
label_open_work_packages: "open"
+ label_previous: "Previous"
+ label_per_page: "Per page:"
label_remove_columns: "Remove selected columns"
label_sort_by: "Sort by"
label_sorted_by: "sorted by"
@@ -96,6 +100,7 @@ en:
label_today: "today"
label_this_week: "this week"
label_work_package: "Work package"
+ label_total_progress: "Total progress"
text_are_you_sure: "Are you sure?"
@@ -223,6 +228,7 @@ en:
insert_columns: "Insert columns ..."
filters: "Filters"
display_sums: "Display Sums"
+ button_clear: "Clear"
toolbar:
settings:
columns: "Columns ..."
diff --git a/karma/tests/directives/components/table_pagination-test.js b/karma/tests/directives/components/table_pagination-test.js
index 3b569cf456..7d06918e94 100644
--- a/karma/tests/directives/components/table_pagination-test.js
+++ b/karma/tests/directives/components/table_pagination-test.js
@@ -32,13 +32,14 @@ describe('tablePagination Directive', function () {
beforeEach(angular.mock.module('openproject.uiComponents', 'openproject.services'));
beforeEach(module('templates'));
- beforeEach(inject(function ($rootScope, $compile) {
- var html;
+ beforeEach(inject(function ($rootScope, $compile, _I18n_) {
+ var html, I18n, t;;
html = '