Closes #153: fix missing localization string

This commit is contained in:
Benjamin Gamard 2017-11-10 22:56:42 +01:00
parent 84d4d3b165
commit e74f86e118
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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",

View File

@ -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",