From fbb0221493f2d9cbd64165265ad775b03358abbd Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 17 Jun 2026 00:23:43 +0200 Subject: [PATCH] Add missing translations --- common/messages/de.json | 38 +++++++++++++++++++ common/messages/fr.json | 38 +++++++++++++++++++ web/components/back-button.tsx | 4 +- web/components/profile-about.tsx | 22 ++++++----- web/components/profile/profile-info.tsx | 2 +- .../profile/profile-primary-info.tsx | 7 +++- 6 files changed, 98 insertions(+), 13 deletions(-) diff --git a/common/messages/de.json b/common/messages/de.json index fdadaac2..cdad43a4 100644 --- a/common/messages/de.json +++ b/common/messages/de.json @@ -707,6 +707,13 @@ "profile.age_older_than": "älter als {min} Jahre", "profile.age_younger_than": "jünger als {max} Jahre", "profile.at": "in", + "profile.activity": "Aktivität", + "profile.agreement.strongly_disagree": "Stark nicht einverstanden", + "profile.agreement.disagree": "Nicht einverstanden", + "profile.agreement.neutral": "Neutral", + "profile.agreement.agree": "Einverstanden", + "profile.agreement.strongly_agree": "Stark einverstanden", + "profile.alcohol": "Alkohol", "profile.basics.bio": "Biografie", "profile.basics.display_name": "Anzeigename", "profile.basics.subtitle": "Schreiben Sie Ihre eigene Biografie auf Ihre Weise.", @@ -750,8 +757,11 @@ "profile.cannabis.occasionally": "Gelegentlich (ein paar Mal pro Jahr)", "profile.cannabis.rarely": "Selten (probiert / ein paar Mal)", "profile.cannabis.regularly": "Regelmäßig (wöchentlich oder mehr)", + "profile.causes": "Ursachen", + "profile.children": "Kinder", "profile.comments.add_comment": "Kommentar hinzufügen", "profile.comments.current_user_hint": "Andere Benutzer können Ihnen hier Empfehlungen hinterlassen.", + "profile.comments.write_button": "Öffentliche Empfehlung schreiben", "profile.comments.disabled": "Empfehlungen deaktiviert", "profile.comments.disabling": "Empfehlungen anderer Benutzer werden deaktiviert", "profile.comments.enable_tooltip": "Empfehlungen anderer Benutzer aktivieren/deaktivieren", @@ -776,6 +786,8 @@ "profile.connect.title": "Verbinden", "profile.connect.update_preference_failed": "Fehler beim Aktualisieren der Einstellung", "profile.connection.default": "Verbindung", + "profile.connection_goals": "Verbindungsziele", + "profile.diet": "Ernährung", "profile.diet.keto": "Ketogen", "profile.diet.omnivore": "Omnivor", "profile.diet.other": "Andere", @@ -785,6 +797,7 @@ "profile.diet.vegan": "Vegan", "profile.doesnt_drink": "Trinkt nicht", "profile.doesnt_smoke": "Raucht nicht", + "profile.details": "Details", "profile.drinks": "Getränke", "profile.drinks_many": "{count} Getränke pro Monat", "profile.drinks_one": "1 Getränk pro Monat", @@ -794,6 +807,7 @@ "profile.education.masters": "Master", "profile.education.short_name": "Bildung", "profile.education.some-college": "Hochschulbildung", + "profile.ethnicity": "Ethnische Herkunft", "profile.gender": "Geschlecht", "profile.gender.agender": "Agender", "profile.gender.androgynous": "Androgyn", @@ -965,12 +979,31 @@ "profile.language.yue": "Yue", "profile.language.zhuang": "Zhuang", "profile.language.zulu": "Zulu", + "profile.languages": "Sprachen", "profile.last_online": "Zuletzt online {time}", + "profile.links": "Links", "profile.llm.extract.button_text": "Profildaten aus Text extrahieren", "profile.llm.extract.button_url": "Profildaten aus URL extrahieren", "profile.llm.extract.description": "Füllen Sie Ihr Profil automatisch aus, indem Sie einen Link (Notion, Google Docs, persönliche Website usw.) einfügen oder Ihren Inhalt direkt einfügen.", "profile.llm.extract.guidance": "Achtung: Wir verwenden Google AI, um Ihre Informationen zu extrahieren. Google kann diesen Inhalt verwenden, um seine Modelle zu verbessern. Bevorzugen Sie Privatsphäre? Füllen Sie das Formular einfach manuell aus — keine KI beteiligt.", "profile.llm.extract.placeholder": "Fügen Sie eine URL ein oder fügen Sie hier Ihren Profilinhalt ein.", + "profile.mbti": "MBTI", + "profile.mbti.INTJ": "Architekt", + "profile.mbti.INTP": "Logiker", + "profile.mbti.ENTJ": "Kommandant", + "profile.mbti.ENTP": "Debattierer", + "profile.mbti.INFJ": "Anwalt", + "profile.mbti.INFP": "Vermittler", + "profile.mbti.ENFJ": "Protagonist", + "profile.mbti.ENFP": "Kampagnenmacher", + "profile.mbti.ISTJ": "Logistiker", + "profile.mbti.ISFJ": "Verteidiger", + "profile.mbti.ESTJ": "Exekutiv", + "profile.mbti.ESFJ": "Konsul", + "profile.mbti.ISTP": "Virtuose", + "profile.mbti.ISFP": "Abenteurer", + "profile.mbti.ESTP": "Unternehmer", + "profile.mbti.ESFP": "Unterhalter", "profile.mutual": "Gegenseitig", "profile.mutual_interests": "Sie haben beide gemeinsame Interessen: {matches}", "profile.not_both_open_to_type": "Sie sind nicht beide für eine(n) {type} offen", @@ -1037,6 +1070,7 @@ "profile.optional.username_or_url": "Benutzername oder URL", "profile.optional.want_kids": "Ich möchte Kinder haben", "profile.optional.work": "Arbeit", + "profile.personality": "Persönlichkeit", "profile.orientation": "Orientierung", "profile.orientation.aceflux": "Aceflux", "profile.orientation.akioromantic": "Akioromantisch", @@ -1063,6 +1097,7 @@ "profile.political.conservative": "Konservativ", "profile.political.e/acc": "Effektiver Akzelerationismus", "profile.political.green": "Grün / Ökosozialismus", + "profile.politics": "Politik", "profile.political.liberal": "Liberal", "profile.political.libertarian": "Libertär", "profile.political.moderate": "Moderat / Zentrist", @@ -1074,6 +1109,7 @@ "profile.political.socialist": "Sozialistisch", "profile.political.technocratic": "Technokratisch", "profile.pref_you": "Bevorzugt, dass Sie", + "profile.psychedelics": "Psychedelika", "profile.psychedelics.label": "Psychedelika:", "profile.psychedelics.never_curious": "Nie, aber neugierig", "profile.psychedelics.never_not_interested": "Nie, nicht interessiert", @@ -1126,6 +1162,7 @@ "profile.smoker.no": "Nichtraucher", "profile.smoker.yes": "Raucher", "profile.smokes": "Raucht", + "profile.smoking": "Rauchen", "profile.substance_intention.ceremonial_spiritual": "Zeremoniell / spirituell", "profile.substance_intention.recreational": "Rekreativ", "profile.substance_intention.therapeutic": "Therapeutisch", @@ -1144,6 +1181,7 @@ "profile.wants_kids_2": "Neutral oder offen für Kinder", "profile.wants_kids_3": "Neigt dazu, Kinder zu wollen", "profile.wants_kids_4": "Möchte Kinder", + "profile.work": "Arbeit", "profile.wont_be_notified_unless_mutual": "Sie werden nicht benachrichtigt, es sei denn, das Interesse ist gegenseitig.", "profile_card.alt": "Profilkarte von {username}", "profile_card.crafting": "Profilkarte wird erstellt...", diff --git a/common/messages/fr.json b/common/messages/fr.json index d274cc8d..0585ace6 100644 --- a/common/messages/fr.json +++ b/common/messages/fr.json @@ -706,6 +706,13 @@ "profile.age_older_than": "plus de {min} ans", "profile.age_younger_than": "de moins de {max} ans", "profile.at": "à", + "profile.activity": "Activité", + "profile.agreement.strongly_disagree": "Fortement en désaccord", + "profile.agreement.disagree": "En désaccord", + "profile.agreement.neutral": "Neutre", + "profile.agreement.agree": "D'accord", + "profile.agreement.strongly_agree": "Fortement d'accord", + "profile.alcohol": "Alcool", "profile.basics.bio": "Biographie", "profile.basics.display_name": "Nom d'affichage", "profile.basics.subtitle": "Écrivez votre propre biographie à votre manière.", @@ -749,8 +756,11 @@ "profile.cannabis.occasionally": "Occasionnellement (quelques fois par an)", "profile.cannabis.rarely": "Rarement (essayé·e / quelques fois)", "profile.cannabis.regularly": "Régulièrement (quelques fois par semaine)", + "profile.causes": "Causes", + "profile.children": "Enfants", "profile.comments.add_comment": "Ajouter un commentaire", "profile.comments.current_user_hint": "Les autres utilisateurs peuvent vous laisser des recommandations ici.", + "profile.comments.write_button": "Écrire une recommandation publique", "profile.comments.disabled": "Recommandations désactivées", "profile.comments.disabling": "Désactivation des recommandations des autres utilisateurs", "profile.comments.enable_tooltip": "Activer/Désactiver les recommandations des autres utilisateurs", @@ -775,6 +785,8 @@ "profile.connect.title": "Entre vous", "profile.connect.update_preference_failed": "Échec de la mise à jour de la préférence", "profile.connection.default": "une relation", + "profile.connection_goals": "Objectifs de relation", + "profile.diet": "Régime alimentaire", "profile.diet.keto": "Cétogène", "profile.diet.omnivore": "Omnivore", "profile.diet.other": "Autre", @@ -784,6 +796,7 @@ "profile.diet.vegan": "Végan·e", "profile.doesnt_drink": "Ne boit pas", "profile.doesnt_smoke": "Ne fume pas", + "profile.details": "Détails", "profile.drinks": "Boissons", "profile.drinks_many": "{count} boissons par mois", "profile.drinks_one": "1 boisson par mois", @@ -793,6 +806,7 @@ "profile.education.masters": "Master", "profile.education.short_name": "Education", "profile.education.some-college": "Supérieur", + "profile.ethnicity": "Origine ethnique", "profile.gender": "Genre", "profile.gender.agender": "Agenre", "profile.gender.androgynous": "Androgyne", @@ -964,12 +978,31 @@ "profile.language.yue": "Yue", "profile.language.zhuang": "Zhuang", "profile.language.zulu": "Zoulou", + "profile.languages": "Langues", "profile.last_online": "Actif·ve {time}", + "profile.links": "Liens", "profile.llm.extract.button_text": "Extraire les données à partir du texte", "profile.llm.extract.button_url": "Extraire les données à ce lien", "profile.llm.extract.description": "Remplissez automatiquement votre profil en déposant un lien (Notion, Google Docs, site personnel, etc.) ou en collant directement votre contenu.", "profile.llm.extract.guidance": "Attention : nous utilisons Google AI pour extraire vos informations. Comme nous payons pour leur service, Google ne devrait pas utiliser ce contenu pour améliorer ses modèles — mais on ne sait jamais. Vous préférez garder les choses privées ? Remplissez simplement le formulaire manuellement — aucune IA impliquée.", "profile.llm.extract.placeholder": "Insérez une URL ou collez le contenu de votre profil ici.", + "profile.mbti": "MBTI", + "profile.mbti.INTJ": "Architecte", + "profile.mbti.INTP": "Logicien", + "profile.mbti.ENTJ": "Commandant", + "profile.mbti.ENTP": "Débateur", + "profile.mbti.INFJ": "Avocat", + "profile.mbti.INFP": "Médiateur", + "profile.mbti.ENFJ": "Protagoniste", + "profile.mbti.ENFP": "Campagneur", + "profile.mbti.ISTJ": "Logisticien", + "profile.mbti.ISFJ": "Défenseur", + "profile.mbti.ESTJ": "Exécutif", + "profile.mbti.ESFJ": "Consul", + "profile.mbti.ISTP": "Virtuose", + "profile.mbti.ISFP": "Aventurier", + "profile.mbti.ESTP": "Entrepreneur", + "profile.mbti.ESFP": "Animateur", "profile.mutual": "Mutuel", "profile.mutual_interests": "Vous avez tous les deux des intérêts communs : {matches}. Contactez-les ci-dessus!", "profile.not_both_open_to_type": "Vous n'êtes pas tous les deux ouverts à un(e) {type}", @@ -1036,6 +1069,7 @@ "profile.optional.username_or_url": "Nom d'utilisateur ou URL", "profile.optional.want_kids": "Je souhaite avoir des enfants", "profile.optional.work": "Domaine de travail", + "profile.personality": "Personnalité", "profile.orientation": "Orientation", "profile.orientation.aceflux": "Aceflux", "profile.orientation.akioromantic": "Akioromantique", @@ -1062,6 +1096,7 @@ "profile.political.conservative": "Conservateur·trice", "profile.political.e/acc": "Accélérationnisme efficace", "profile.political.green": "Vert·e / Éco-socialiste", + "profile.politics": "Politique", "profile.political.liberal": "Libéral·e (centre-gauche)", "profile.political.libertarian": "Libertarien·ne", "profile.political.moderate": "Modéré·e / Centriste", @@ -1073,6 +1108,7 @@ "profile.political.socialist": "Socialiste", "profile.political.technocratic": "Technocrate", "profile.pref_you": "Préfère que vous", + "profile.psychedelics": "Psychédéliques", "profile.psychedelics.label": "Psychédéliques :", "profile.psychedelics.never_curious": "Jamais, mais curieux·se", "profile.psychedelics.never_not_interested": "Jamais, pas intéressé·e", @@ -1125,6 +1161,7 @@ "profile.smoker.no": "Non-fumeur", "profile.smoker.yes": "Fumeur", "profile.smokes": "Fume", + "profile.smoking": "Tabagisme", "profile.substance_intention.ceremonial_spiritual": "Cérémoniel / spirituel", "profile.substance_intention.recreational": "Récréatif", "profile.substance_intention.therapeutic": "Thérapeutique", @@ -1143,6 +1180,7 @@ "profile.wants_kids_2": "Neutre ou ouvert·e à avoir des enfants", "profile.wants_kids_3": "Tend à vouloir des enfants", "profile.wants_kids_4": "Veut des enfants", + "profile.work": "Travail", "profile.wont_be_notified_unless_mutual": "Il/elle ne sera pas notifié(e) à moins que l'intérêt soit mutuel.", "profile_card.alt": "Carte de profil de {username}", "profile_card.crafting": "Création de la carte de profil...", diff --git a/web/components/back-button.tsx b/web/components/back-button.tsx index afd95c0d..6e8cce11 100644 --- a/web/components/back-button.tsx +++ b/web/components/back-button.tsx @@ -2,10 +2,12 @@ import {ChevronLeftIcon} from '@heroicons/react/24/outline' import clsx from 'clsx' import {useRouter} from 'next/router' import React, {useEffect, useState} from 'react' +import {useT} from 'web/lib/locale' export function BackButton(props: {className?: string}) { const {className} = props const router = useRouter() + const t = useT() const [canGoBack, setCanGoBack] = useState(false) // Can't put this in a useMemo to avoid the page jump else we'll get hydration errors. @@ -25,7 +27,7 @@ export function BackButton(props: {className?: string}) { )} > - Back + {t('common.back', 'Back')} ) } diff --git a/web/components/profile-about.tsx b/web/components/profile-about.tsx index d6dc8631..75df5096 100644 --- a/web/components/profile-about.tsx +++ b/web/components/profile-about.tsx @@ -776,15 +776,16 @@ export function ProfilePersonality(props: {profile: Profile}) { function MBTI(props: {profile: Profile}) { const {profile} = props + const t = useT() if (!profile.mbti) return null const mbtiType = profile.mbti ? INVERTED_MBTI_CHOICES[profile.mbti] : null - const mbtiTypeName = mbtiType ? MBTI_TYPE_NAMES[mbtiType] : null + const mbtiTypeName = mbtiType ? t(`profile.mbti.${mbtiType}`, MBTI_TYPE_NAMES[mbtiType]) : null return (
- MBTI + {t('profile.mbti', 'MBTI')}
, ) => { if (Array.isArray(value)) { return value.join(', ') @@ -933,25 +935,25 @@ export const formatProfileValue = ( case 'is_smoker': case 'diet': case 'has_pets': - return value ? 'Yes' : 'No' + return value ? t('common.yes', 'Yes') : t('common.no', 'No') case 'height_in_inches': return formatHeight(value, measurementSystem) case 'pref_age_max': case 'pref_age_min': return null // handle this in a special case case 'wants_kids_strength': - return renderAgreementScale(value) + return renderAgreementScale(value, t) default: return value } } -const renderAgreementScale = (value: number) => { - if (value == 1) return 'Strongly disagree' - if (value == 2) return 'Disagree' - if (value == 3) return 'Neutral' - if (value == 4) return 'Agree' - if (value == 5) return 'Strongly agree' +const renderAgreementScale = (value: number, t: ReturnType) => { + if (value == 1) return t('profile.agreement.strongly_disagree', 'Strongly disagree') + if (value == 2) return t('profile.agreement.disagree', 'Disagree') + if (value == 3) return t('profile.agreement.neutral', 'Neutral') + if (value == 4) return t('profile.agreement.agree', 'Agree') + if (value == 5) return t('profile.agreement.strongly_agree', 'Strongly agree') return '' } diff --git a/web/components/profile/profile-info.tsx b/web/components/profile/profile-info.tsx index 2b2f989e..4d9aeb0b 100644 --- a/web/components/profile/profile-info.tsx +++ b/web/components/profile/profile-info.tsx @@ -338,7 +338,7 @@ function ProfileContent(props: { data-testid="profile-content" > - + } /> )}