From 0c1b52d734093254c6eccbf6f67217a0fa81628e Mon Sep 17 00:00:00 2001 From: Florian THIERRY Date: Sat, 21 Sep 2024 21:03:34 +0200 Subject: [PATCH] i18n for publication search page. --- .../search-publications.component.html | 8 ++++---- .../search-publications/search-publications.service.ts | 4 ++-- frontend/src/locale/messages-fr.json | 6 +++++- frontend/src/locale/messages.json | 6 +++++- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/pages/search-publications/search-publications.component.html b/frontend/src/app/pages/search-publications/search-publications.component.html index 4151968..68d89c5 100644 --- a/frontend/src/app/pages/search-publications/search-publications.component.html +++ b/frontend/src/app/pages/search-publications/search-publications.component.html @@ -1,13 +1,13 @@ -

Search results

+

Search results

@if((isLoading$ | async) === true) { -

Search in progress...

+

Search in progress...

} @else if((isLoaded$ | async) === true) { @if((publications$ | async)?.length) { } @else { - No any result. + No any result. } } @else { - No any result. + No any result. } diff --git a/frontend/src/app/pages/search-publications/search-publications.service.ts b/frontend/src/app/pages/search-publications/search-publications.service.ts index 51660af..b1268be 100644 --- a/frontend/src/app/pages/search-publications/search-publications.service.ts +++ b/frontend/src/app/pages/search-publications/search-publications.service.ts @@ -36,9 +36,9 @@ export class SearchPublicationsService { }) .catch(error => { if (error.status !== 404) { - const errorMessage = 'An error occured while retrieving publications.'; + const errorMessage = $localize`An error occured while retrieving publications.`; console.error(errorMessage, error); - this.snackBar.open(errorMessage, 'Close', { duration: 5000 }); + this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 }); } }) .finally(() => { diff --git a/frontend/src/locale/messages-fr.json b/frontend/src/locale/messages-fr.json index 2f589f8..0d2b2f1 100644 --- a/frontend/src/locale/messages-fr.json +++ b/frontend/src/locale/messages-fr.json @@ -34,6 +34,10 @@ "3861667381167371965": "Une erreur est survenue lors du chargement de la publication...", "3189372093194446122": "Suppression de la publication", "7149611045520326321": "Êtes vous sûr de vouloir supprimer cette publication ?", - "4353366709080867962": "Publication supprimée" + "4353366709080867962": "Publication supprimée", + "1460318440531551596": "Résultats de la recherche", + "886526241743571962": "Recherche des publications...", + "3467080651873197381": "Il n'y a aucun résultat.", + "8212807341111457015": "Une erreur est survenue lors de la recherche des publications.." } } \ No newline at end of file diff --git a/frontend/src/locale/messages.json b/frontend/src/locale/messages.json index 990d713..23b7d89 100644 --- a/frontend/src/locale/messages.json +++ b/frontend/src/locale/messages.json @@ -34,6 +34,10 @@ "3861667381167371965": "An error occurred while loading publication...", "3189372093194446122": "Publication deletion", "7149611045520326321": "Are you sure you want to delete this publication?", - "4353366709080867962": "Publication deleted" + "4353366709080867962": "Publication deleted", + "1460318440531551596": "Search results", + "886526241743571962": "Search in progress...", + "3467080651873197381": "No any result.", + "8212807341111457015": "An error occured while retrieving publications." } } \ No newline at end of file