i18n of publication creation page.

This commit is contained in:
Florian THIERRY
2024-09-21 20:57:05 +02:00
parent 36208ef071
commit 67c3d0b3e6
4 changed files with 16 additions and 4 deletions

View File

@@ -1 +1,7 @@
<app-publication-edition title="Creation of a new publication" [publication]="publication" [isSaving$]="isSaving$" (publicationSave)="onPublicationSave($event)"></app-publication-edition> <app-publication-edition
title="Creation of a new publication"
[publication]="publication"
[isSaving$]="isSaving$"
(publicationSave)="onPublicationSave($event)"
i18n-title>
</app-publication-edition>

View File

@@ -63,13 +63,13 @@ export class PublicationCreationComponent implements OnInit {
this.isSavingSubject.next(true); this.isSavingSubject.next(true);
this.publicationRestService.create(publication) this.publicationRestService.create(publication)
.then(() => { .then(() => {
this.snackBar.open('Publication created succesfully!', 'Close', { duration: 5000 }); this.snackBar.open($localize`Publication created succesfully!`, $localize`Close`, { duration: 5000 });
this.router.navigate(['/my-publications']); this.router.navigate(['/my-publications']);
}) })
.catch(error => { .catch(error => {
const errorMessage = 'An error occured while saving new publication.'; const errorMessage = $localize`An error occured while saving new publication.`;
console.error(errorMessage, error); console.error(errorMessage, error);
this.snackBar.open(errorMessage, 'Close', { duration: 5000 }); this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 });
}) })
.finally(() => this.isSavingSubject.next(false)); .finally(() => this.isSavingSubject.next(false));
} }

View File

@@ -21,6 +21,9 @@
"5982957837973242128": "Vous n'avez rien publié...", "5982957837973242128": "Vous n'avez rien publié...",
"6147923540123489141": "Une erreur est survenue lors de la récupération de vos publications...", "6147923540123489141": "Une erreur est survenue lors de la récupération de vos publications...",
"3450287383703155559": "Vous n'êtes pas connecté. Veuillez vous connecter avant de réessayer.", "3450287383703155559": "Vous n'êtes pas connecté. Veuillez vous connecter avant de réessayer.",
"2804059545779555969": "Rédaction d'une nouvelle publication",
"4229813881636784544": "Publication créée avec succès !",
"1772332295232318552": "Une erreur est survenue lors de l'enregistrement de la nouvelle publication.",
"9035578711395348230": "Chargement du contenu de la publication...", "9035578711395348230": "Chargement du contenu de la publication...",
"570282468314450588": "La publication n'a pas pu être chargée...", "570282468314450588": "La publication n'a pas pu être chargée...",
"3861667381167371965": "Une erreur est survenue lors du chargement de la publication...", "3861667381167371965": "Une erreur est survenue lors du chargement de la publication...",

View File

@@ -21,6 +21,9 @@
"5982957837973242128": "There is no any publication...", "5982957837973242128": "There is no any publication...",
"6147923540123489141": "An error occurred while retrieving your publications...", "6147923540123489141": "An error occurred while retrieving your publications...",
"3450287383703155559": "You are unauthenticated. Please, log-in first.", "3450287383703155559": "You are unauthenticated. Please, log-in first.",
"2804059545779555969": "Creation of a new publication",
"4229813881636784544": "Publication created succesfully!",
"1772332295232318552": "An error occured while saving new publication.",
"9035578711395348230": "Publication content loading...", "9035578711395348230": "Publication content loading...",
"570282468314450588": "Publication failed to load...", "570282468314450588": "Publication failed to load...",
"3861667381167371965": "An error occurred while loading publication...", "3861667381167371965": "An error occurred while loading publication...",