Update translation keys for service and training messages

This commit is contained in:
Matteo Gheza 2024-01-07 22:23:33 +01:00
parent 8e2547fa4d
commit 053eaffec1
4 changed files with 12 additions and 4 deletions

View File

@ -206,13 +206,13 @@ export class EditServiceComponent implements OnInit {
values.id = this.serviceId; values.id = this.serviceId;
this.api.post("services", values).then((res) => { this.api.post("services", values).then((res) => {
console.log(res); console.log(res);
this.translate.get('edit_service.service_added_successfully').subscribe((res: string) => { this.translate.get('edit_service.service_updated_successfully').subscribe((res: string) => {
this.toastr.success(res); this.toastr.success(res);
}); });
this.submittingForm = false; this.submittingForm = false;
}).catch((err) => { }).catch((err) => {
console.error(err); console.error(err);
this.translate.get('edit_service.service_add_failed').subscribe((res: string) => { this.translate.get('edit_service.service_update_failed').subscribe((res: string) => {
this.toastr.error(res); this.toastr.error(res);
}); });
this.submittingForm = false; this.submittingForm = false;

View File

@ -120,13 +120,13 @@ export class EditTrainingComponent implements OnInit {
values.id = this.trainingId; values.id = this.trainingId;
this.api.post("trainings", values).then((res) => { this.api.post("trainings", values).then((res) => {
console.log(res); console.log(res);
this.translate.get('edit_training.training_added_successfully').subscribe((res: string) => { this.translate.get('edit_training.training_updated_successfully').subscribe((res: string) => {
this.toastr.success(res); this.toastr.success(res);
}); });
this.submittingForm = false; this.submittingForm = false;
}).catch((err) => { }).catch((err) => {
console.error(err); console.error(err);
this.translate.get('edit_training.training_add_failed').subscribe((res: string) => { this.translate.get('edit_training.training_update_failed').subscribe((res: string) => {
this.toastr.error(res); this.toastr.error(res);
}); });
this.submittingForm = false; this.submittingForm = false;

View File

@ -82,6 +82,8 @@
"type_added_successfully": "Type added successfully", "type_added_successfully": "Type added successfully",
"service_added_successfully": "Service added successfully", "service_added_successfully": "Service added successfully",
"service_add_failed": "Service could not be added. Please try again", "service_add_failed": "Service could not be added. Please try again",
"service_updated_successfully": "Service updated successfully",
"service_update_failed": "Service could not be updated. Please try again",
"service_load_failed": "Service could not be loaded. Please try again", "service_load_failed": "Service could not be loaded. Please try again",
"users_load_failed": "Users could not be loaded. Please try again", "users_load_failed": "Users could not be loaded. Please try again",
"types_load_failed": "Types could not be loaded. Please try again", "types_load_failed": "Types could not be loaded. Please try again",
@ -95,6 +97,8 @@
"other_crew_members": "Other crew members", "other_crew_members": "Other crew members",
"training_added_successfully": "Training added successfully", "training_added_successfully": "Training added successfully",
"training_add_failed": "Training could not be added. Please try again", "training_add_failed": "Training could not be added. Please try again",
"training_updated_successfully": "Training updated successfully",
"training_update_failed": "Training could not be updated. Please try again",
"training_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi", "training_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi",
"users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi" "users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi"
}, },

View File

@ -82,6 +82,8 @@
"type_added_successfully": "Tipologia aggiunta con successo", "type_added_successfully": "Tipologia aggiunta con successo",
"service_added_successfully": "Intervento aggiunto con successo", "service_added_successfully": "Intervento aggiunto con successo",
"service_add_failed": "Errore durante l'aggiunta dell'intervento. Riprovare più tardi", "service_add_failed": "Errore durante l'aggiunta dell'intervento. Riprovare più tardi",
"service_updated_successfully": "Intervento aggiornato con successo",
"service_update_failed": "Errore durante l'aggiornamento dell'intervento. Riprovare più tardi",
"service_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi", "service_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi",
"users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi", "users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi",
"types_load_failed": "Errore durante il caricamento delle tipologie di intervento. Riprovare più tardi", "types_load_failed": "Errore durante il caricamento delle tipologie di intervento. Riprovare più tardi",
@ -95,6 +97,8 @@
"other_crew_members": "Altri membri della squadra", "other_crew_members": "Altri membri della squadra",
"training_added_successfully": "Esercitazione aggiunta con successo", "training_added_successfully": "Esercitazione aggiunta con successo",
"training_add_failed": "Errore durante l'aggiunta dell'esercitazione. Riprovare più tardi", "training_add_failed": "Errore durante l'aggiunta dell'esercitazione. Riprovare più tardi",
"training_updated_successfully": "Esercitazione aggiornata con successo",
"training_update_failed": "Errore durante l'aggiornamento dell'esercitazione. Riprovare più tardi",
"training_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi", "training_load_failed": "Errore durante il caricamento dell'intervento. Riprovare più tardi",
"users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi" "users_load_failed": "Errore durante il caricamento degli utenti. Riprovare più tardi"
}, },