From 77e3b56b65ae8ae77dc98e7ef30e4795bbf3dc80 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 3 Jan 2026 13:48:24 +0200 Subject: [PATCH] Translate search --- web/components/filters/search.tsx | 12 +++++++----- web/messages/fr.json | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/web/components/filters/search.tsx b/web/components/filters/search.tsx index a762c9ab..4d5871be 100644 --- a/web/components/filters/search.tsx +++ b/web/components/filters/search.tsx @@ -18,6 +18,7 @@ import toast from "react-hot-toast"; import {FilterFields} from "common/filters"; import {DisplayUser} from "common/api/user-types"; import {useChoices} from "web/hooks/use-choices"; +import {useT} from "web/lib/locale"; function isOrderBy(input: string): input is FilterFields['orderBy'] { return ['last_online_time', 'created_time', 'compatibility_score'].includes( @@ -134,6 +135,7 @@ export const Search = (props: { const [isHolding, setIsHolding] = useState(false); const [bookmarked, setBookmarked] = useState(false); const [loadingBookmark, setLoadingBookmark] = useState(false); + const t = useT() const [openBookmarks, setOpenBookmarks] = useState(false); const [openStarBookmarks, setOpenStarBookmarks] = useState(false); const user = useUser() @@ -200,11 +202,11 @@ export const Search = (props: { value={filters.orderBy || 'created_time'} className={'w-18 border-ink-300 rounded-md'} > - + {youProfile && ( - + )} - + {(profileCount ?? 0) > 0 && ( -

{profileCount} {(profileCount ?? 0) > 1 ? 'people' : 'person'}

+

{profileCount} {(profileCount ?? 0) > 1 ? t('common.people', 'people') : t('common.person', 'person')}

)} diff --git a/web/messages/fr.json b/web/messages/fr.json index de335ffb..abeece5d 100644 --- a/web/messages/fr.json +++ b/web/messages/fr.json @@ -848,6 +848,13 @@ "profile.comments.update_error": "Échec de la mise à jour des paramètres de recommandation", "profile.comments.current_user_hint": "Les autres utilisateurs peuvent vous laisser des recommandations ici.", "profile.comments.other_user_hint": "Si vous les connaissez, écrivez quelque chose de sympa qui enrichira leur profil.", + "common.new": "Nouveau", + "common.compatible": "Compatible", + "common.active": "Actif", + "common.saved": "Enregistré !", + "common.notified": "Être notifié", + "common.people": "personnes", + "common.person": "personne", "profile.comments.feature_disabled_self": "Cette fonctionnalité est désactivée", "profile.comments.feature_disabled_other": "{name} a désactivé les recommandations des autres utilisateurs.", "multi-checkbox.search_or_add": "Chercher ou ajouter",