inject missing dependency for translations

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/3245/head
Florian Kraft 9 years ago
parent 0b70f375d5
commit ee4c8cfa14
  1. 1
      config/locales/js-en.yml
  2. 2
      frontend/app/ui_components/index.js
  3. 3
      frontend/app/ui_components/notification-box-directive.js
  4. 5
      frontend/app/work_packages/controllers/details-tab-overview-controller.js
  5. 1
      frontend/app/work_packages/controllers/index.js

@ -164,6 +164,7 @@ en:
label_rejected_files_reason: "These files cannot be uploaded as their size is greater than %{maximumFilesize}"
label_wait: "Please wait for configuration..."
label_upload_counter: "%{done} of %{count} files finished"
label_successful_update: 'Successful update'
text_are_you_sure: "Are you sure?"

@ -105,7 +105,7 @@ angular.module('openproject.uiComponents')
.directive('wikiToolbar', [require('./wiki-toolbar-directive')])
.directive('zoomSlider', ['I18n', require('./zoom-slider-directive')])
.directive('notifications', [require('./notifications-directive')])
.directive('notificationBox', [require('./notification-box-directive')])
.directive('notificationBox', ['I18n', require('./notification-box-directive')])
.directive('uploadProgress', [require('./upload-progress-directive')])
.directive('attachmentIcon', [require('./attachment-icon-directive')])
.filter('ancestorsExpanded', require('./filters/ancestors-expanded-filter'))

@ -26,11 +26,12 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
module.exports = function() {
module.exports = function(I18n) {
var notificationBoxController = function(scope) {
scope.uploadCount = 0;
scope.show = false;
scope.I18n = I18n;
scope.canBeHidden = function() {
return scope.content.uploads.length > 5;

@ -32,7 +32,8 @@ module.exports = function(
WorkPackageFieldService,
EditableFieldsState,
WorkPackageDisplayHelper,
NotificationsService
NotificationsService,
I18n
) {
var vm = this;
@ -79,7 +80,7 @@ module.exports = function(
});
});
$scope.$on('workPackageUpdatedInEditor', function() {
NotificationsService.addSuccess('Successful update');
NotificationsService.addSuccess(I18n.t('js.label_successful_update'));
});
}
};

@ -42,6 +42,7 @@ angular.module('openproject.workPackages.controllers')
'EditableFieldsState',
'WorkPackagesDisplayHelper',
'NotificationsService',
'I18n',
require('./details-tab-overview-controller')
])
.constant('ADD_WATCHER_SELECT_INDEX', -1)

Loading…
Cancel
Save