diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentEdit.js b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentEdit.js index ce642fe9..99c07b60 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentEdit.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentEdit.js @@ -120,7 +120,7 @@ angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $ var fileUploadCount = _.size($scope.newFiles) + resolve.length; $scope.alerts.unshift({ type: 'success', - msg: 'Document successfully added (with ' + fileUploadCount + ' file' + (fileUploadCount > 1 ? 's' : '') + ')' + msg: $translate.instant('document.edit.document_added', { count: fileUploadCount }) }); $scope.resetForm(); @@ -182,7 +182,7 @@ angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $ $scope.alerts.unshift({ type: 'danger', msg: $translate.instant('document.edit.document_' + ($scope.isEdit() ? 'edited' : 'added') + '_with_errors') - + (data.responseJSON.type == 'QuotaReached' ? (' - ' + $translate.instant('document.edit.quota_reached')) : '') + + (data.responseJSON.type === 'QuotaReached' ? (' - ' + $translate.instant('document.edit.quota_reached')) : '') }); // Reset view and title diff --git a/docs-web/src/main/webapp/src/locale/en.json b/docs-web/src/main/webapp/src/locale/en.json index 348673e3..b9c57587 100644 --- a/docs-web/src/main/webapp/src/locale/en.json +++ b/docs-web/src/main/webapp/src/locale/en.json @@ -94,6 +94,7 @@ "edit": { "document_edited_with_errors": "Document successfully edited but some files cannot be uploaded", "document_added_with_errors": "Document successfully added but some files cannot be uploaded", + "document_added": "Document successfully added (with {{ count }} file{{ count > 1 ? 's' : '' }})", "quota_reached": "Quota reached", "primary_metadata": "Primary metadata", "title_placeholder": "A name given to the resource", diff --git a/docs-web/src/main/webapp/src/locale/fr.json b/docs-web/src/main/webapp/src/locale/fr.json index 95195578..d362175e 100644 --- a/docs-web/src/main/webapp/src/locale/fr.json +++ b/docs-web/src/main/webapp/src/locale/fr.json @@ -94,6 +94,7 @@ "edit": { "document_edited_with_errors": "Document modifié avec succès, mais certains fichiers n'ont pu être envoyés", "document_added_with_errors": "Document ajouté avec succès, mais certains fichiers n'ont pu être envoyés", + "document_added": "Document ajouté avec succès (avec {{ count }} fichier{{ count > 1 ? 's' : '' }})", "quota_reached": "Quota atteint", "primary_metadata": "Métadonnées principales", "title_placeholder": "Titre principal du document",