[CST-6153] Show i18n message instead of server error response

This commit is contained in:
Giuseppe Digilio
2022-09-20 11:41:09 +02:00
parent f787491af4
commit 5099d0b18a
2 changed files with 7 additions and 4 deletions

View File

@@ -157,7 +157,8 @@ export class ProfilePageComponent implements OnInit {
); );
} else { } else {
this.notificationsService.error( this.notificationsService.error(
this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.title'), response.errorMessage this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.title'),
this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.change-failed')
); );
} }
}); });

View File

@@ -640,7 +640,7 @@
"bitstream-request-a-copy.alert.canDownload2": "here", "bitstream-request-a-copy.alert.canDownload2": "here",
"bitstream-request-a-copy.header": "Request a copy of the file", "bitstream-request-a-copy.header": "Request a copy of the file",
"bitstream-request-a-copy.intro": "Enter the following information to request a copy for the following item: ", "bitstream-request-a-copy.intro": "Enter the following information to request a copy for the following item: ",
"bitstream-request-a-copy.intro.bitstream.one": "Requesting the following file: ", "bitstream-request-a-copy.intro.bitstream.one": "Requesting the following file: ",
@@ -2984,7 +2984,7 @@
"process.detail.create" : "Create similar process", "process.detail.create" : "Create similar process",
"process.detail.actions": "Actions", "process.detail.actions": "Actions",
"process.detail.delete.button": "Delete process", "process.detail.delete.button": "Delete process",
"process.detail.delete.header": "Delete process", "process.detail.delete.header": "Delete process",
@@ -3037,7 +3037,7 @@
"process.bulk.delete.success": "{{count}} process(es) have been succesfully deleted", "process.bulk.delete.success": "{{count}} process(es) have been succesfully deleted",
"profile.breadcrumbs": "Update Profile", "profile.breadcrumbs": "Update Profile",
@@ -3093,6 +3093,8 @@
"profile.security.form.notifications.error.title": "Error changing passwords", "profile.security.form.notifications.error.title": "Error changing passwords",
"profile.security.form.notifications.error.change-failed": "An error occurred while trying to change the password. Please check if the current password is correct.",
"profile.security.form.notifications.error.not-long-enough": "The password has to be at least 6 characters long.", "profile.security.form.notifications.error.not-long-enough": "The password has to be at least 6 characters long.",
"profile.security.form.notifications.error.not-same": "The provided passwords are not the same.", "profile.security.form.notifications.error.not-same": "The provided passwords are not the same.",