From 67c3d0b3e6bf69eab5a0f514afaf906641625706 Mon Sep 17 00:00:00 2001 From: Florian THIERRY Date: Sat, 21 Sep 2024 20:57:05 +0200 Subject: [PATCH] i18n of publication creation page. --- .../publication-creation.component.html | 8 +++++++- .../publication-creation.component.ts | 6 +++--- frontend/src/locale/messages-fr.json | 3 +++ frontend/src/locale/messages.json | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/pages/publication-creation/publication-creation.component.html b/frontend/src/app/pages/publication-creation/publication-creation.component.html index 18365be..afd1e70 100644 --- a/frontend/src/app/pages/publication-creation/publication-creation.component.html +++ b/frontend/src/app/pages/publication-creation/publication-creation.component.html @@ -1 +1,7 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/frontend/src/app/pages/publication-creation/publication-creation.component.ts b/frontend/src/app/pages/publication-creation/publication-creation.component.ts index b0deeb2..d929259 100644 --- a/frontend/src/app/pages/publication-creation/publication-creation.component.ts +++ b/frontend/src/app/pages/publication-creation/publication-creation.component.ts @@ -63,13 +63,13 @@ export class PublicationCreationComponent implements OnInit { this.isSavingSubject.next(true); this.publicationRestService.create(publication) .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']); }) .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); - this.snackBar.open(errorMessage, 'Close', { duration: 5000 }); + this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 }); }) .finally(() => this.isSavingSubject.next(false)); } diff --git a/frontend/src/locale/messages-fr.json b/frontend/src/locale/messages-fr.json index cc8b352..3bfe1fa 100644 --- a/frontend/src/locale/messages-fr.json +++ b/frontend/src/locale/messages-fr.json @@ -21,6 +21,9 @@ "5982957837973242128": "Vous n'avez rien publié...", "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.", + "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...", "570282468314450588": "La publication n'a pas pu être chargée...", "3861667381167371965": "Une erreur est survenue lors du chargement de la publication...", diff --git a/frontend/src/locale/messages.json b/frontend/src/locale/messages.json index 6501d28..896112c 100644 --- a/frontend/src/locale/messages.json +++ b/frontend/src/locale/messages.json @@ -21,6 +21,9 @@ "5982957837973242128": "There is no any publication...", "6147923540123489141": "An error occurred while retrieving your publications...", "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...", "570282468314450588": "Publication failed to load...", "3861667381167371965": "An error occurred while loading publication...",