Try translate finalize errors messages on Pt.

This commit is contained in:
Kristian Ntavidi 2021-07-13 10:42:36 +03:00
parent e793f10828
commit c33ffc153b
2 changed files with 8 additions and 2 deletions

View File

@ -310,7 +310,11 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
}
onUpdateCallbackError(error) {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('DATASET-UPLOAD.SNACK-BAR.UNSUCCESSFUL'), SnackBarNotificationLevel.Error);
this.uiNotificationService.snackBarNotification(error.error.message ? this.tryTranslate( error.error.message) : this.language.instant('DATASET-UPLOAD.SNACK-BAR.UNSUCCESSFUL'), SnackBarNotificationLevel.Error);
}
tryTranslate(errorMessage: string): string{
return errorMessage.replace('Field value of', this.language.instant('Field value of'))
.replace('must be filled', this.language.instant('must be filled'));
}
public getOrcidPath(): string {

View File

@ -1801,5 +1801,7 @@
"You cannot Remove Datamanagement Plan with Datasets": "Não pode remover o Plano de Gestão de Dados porque contém pelo menos um modelo de dados associado",
"Failed to create DOI for the Data Management Plan.": "Não foi possível criar um DOI para o Plano de Gestão de Dados",
"No entity found for query": "Não foi possível eliminar o item pretendido",
"Index: 0, Size: 0" : "Ficheiro a importar deverá ser em formato .json"
"Index: 0, Size: 0" : "Ficheiro a importar deverá ser em formato .json",
"Field value of": "O campo",
"must be filled": "deve ser preenchido"
}