mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-23 17:13:55 -04:00
Translate compat prompts
This commit is contained in:
@@ -194,7 +194,7 @@ export function AnswerCompatibilityQuestionContent(props: {
|
||||
)}
|
||||
>
|
||||
<Col className="gap-2">
|
||||
<span className="text-ink-500 text-sm">{t('answers.content.your_answer', 'Your answer')}</span>
|
||||
<span className="text-ink-500 text-sm">{t('answers.preferred.your_answer', 'Your answer')}</span>
|
||||
<SelectAnswer
|
||||
value={answer.multiple_choice}
|
||||
setValue={(choice) =>
|
||||
@@ -217,7 +217,7 @@ export function AnswerCompatibilityQuestionContent(props: {
|
||||
<span className="text-ink-500 text-sm">{t('answers.content.importance', 'Importance')}</span>
|
||||
<RadioToggleGroup
|
||||
currentChoice={answer.importance ?? -1}
|
||||
choicesMap={IMPORTANCE_CHOICES}
|
||||
choicesMap={Object.fromEntries(Object.entries(IMPORTANCE_CHOICES).map(([k, v]) => [t(`answers.importance.${v}`, k), v]))}
|
||||
setChoice={(choice: number) =>
|
||||
setAnswer({...answer, importance: choice})
|
||||
}
|
||||
@@ -263,7 +263,7 @@ export function AnswerCompatibilityQuestionContent(props: {
|
||||
skipLoading && 'animate-pulse'
|
||||
)}
|
||||
>
|
||||
{t('answers.content.skip', 'Skip')}
|
||||
{t('answers.menu.skip', 'Skip')}
|
||||
</button>
|
||||
)}
|
||||
<Button
|
||||
@@ -288,7 +288,7 @@ export function AnswerCompatibilityQuestionContent(props: {
|
||||
.finally(() => setLoading(false))
|
||||
}}
|
||||
>
|
||||
{isLastQuestion ? t('answers.content.finish', 'Finish') : t('answers.content.next', 'Next')}
|
||||
{isLastQuestion ? t('answers.finish', 'Finish') : t('answers.next', 'Next')}
|
||||
</Button>
|
||||
</Row>
|
||||
</Col>
|
||||
|
||||
@@ -704,9 +704,10 @@ function CompatibilityDisplay(props: {
|
||||
|
||||
function ImportanceDisplay(props: { importance: number }) {
|
||||
const {importance} = props
|
||||
const t = useT()
|
||||
return (
|
||||
<span className={clsx('w-fit')}>
|
||||
{getStringKeyFromNumValue(importance, IMPORTANCE_CHOICES)}
|
||||
{t(`answers.importance.${importance}`, getStringKeyFromNumValue(importance, IMPORTANCE_CHOICES) as string)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ function Seeking(props: { profile: Profile }) {
|
||||
text:
|
||||
prefGender?.length == 5
|
||||
? ['people']
|
||||
: prefGender?.map((gender) => convertGenderPlural(gender as Gender)),
|
||||
: prefGender?.map((gender) => t(`profile.gender.plural.${gender}`, convertGenderPlural(gender as Gender)).toLowerCase()),
|
||||
preText: t('profile.interested_in', 'Interested in'),
|
||||
asSentence: true,
|
||||
capitalizeFirstLetterOption: false,
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import { Col } from 'web/components/layout/col'
|
||||
import { groupBy, orderBy } from 'lodash'
|
||||
import { useLiveCommentsOnProfile } from 'web/hooks/use-comments-on-profile'
|
||||
import {
|
||||
ProfileCommentInput,
|
||||
ProfileProfileCommentThread,
|
||||
} from 'web/components/profile-comments'
|
||||
import { User } from 'common/user'
|
||||
import { Row } from 'web/components/layout/row'
|
||||
import {Col} from 'web/components/layout/col'
|
||||
import {groupBy, orderBy} from 'lodash'
|
||||
import {useLiveCommentsOnProfile} from 'web/hooks/use-comments-on-profile'
|
||||
import {ProfileCommentInput, ProfileProfileCommentThread,} from 'web/components/profile-comments'
|
||||
import {User} from 'common/user'
|
||||
import {Row} from 'web/components/layout/row'
|
||||
import ShortToggle from 'web/components/widgets/short-toggle'
|
||||
import { useState } from 'react'
|
||||
import { updateProfile } from 'web/lib/api'
|
||||
import { Tooltip } from 'web/components/widgets/tooltip'
|
||||
import { toast } from 'react-hot-toast'
|
||||
import { Subtitle } from './widgets/profile-subtitle'
|
||||
import { Profile } from 'common/profiles/profile'
|
||||
import {useState} from 'react'
|
||||
import {updateProfile} from 'web/lib/api'
|
||||
import {Tooltip} from 'web/components/widgets/tooltip'
|
||||
import {toast} from 'react-hot-toast'
|
||||
import {Subtitle} from './widgets/profile-subtitle'
|
||||
import {Profile} from 'common/profiles/profile'
|
||||
import {useT} from "web/lib/locale";
|
||||
|
||||
export const ProfileCommentSection = (props: {
|
||||
@@ -22,7 +19,7 @@ export const ProfileCommentSection = (props: {
|
||||
currentUser: User | null | undefined
|
||||
simpleView?: boolean
|
||||
}) => {
|
||||
const { onUser, currentUser, simpleView } = props
|
||||
const {onUser, currentUser, simpleView} = props
|
||||
const t = useT()
|
||||
const comments = useLiveCommentsOnProfile(onUser.id).filter((c) => !c.hidden)
|
||||
const parentComments = comments.filter((c) => !c.replyToCommentId)
|
||||
@@ -47,8 +44,8 @@ export const ProfileCommentSection = (props: {
|
||||
<ShortToggle
|
||||
on={profile.comments_enabled}
|
||||
setOn={(on) => {
|
||||
const update = { comments_enabled: on }
|
||||
setProfile((l) => ({ ...l, ...update }))
|
||||
const update = {comments_enabled: on}
|
||||
setProfile((l) => ({...l, ...update}))
|
||||
toast.promise(updateProfile(update), {
|
||||
loading: on
|
||||
? t('profile.comments.enabling', 'Enabling endorsements from others')
|
||||
@@ -86,11 +83,11 @@ export const ProfileCommentSection = (props: {
|
||||
{!profile.comments_enabled &&
|
||||
(isCurrentUser ? (
|
||||
<span className={'text-ink-500 text-sm'}>
|
||||
{t('profile.comments.feature_disabled_other', 'This feature is disabled')}
|
||||
{t('profile.comments.feature_disabled_self', 'This feature is disabled')}
|
||||
</span>
|
||||
) : (
|
||||
<span className={'text-ink-500 text-sm'}>
|
||||
{t('profile.comments.feature_disabled_other', '{name} has disabled endorsements from others.', { name: onUser.name })}
|
||||
{t('profile.comments.feature_disabled_other', '{name} has disabled endorsements from others.', {name: onUser.name})}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
|
||||
@@ -490,11 +490,14 @@
|
||||
"answers.answer.view_list": "Voir la liste des questions",
|
||||
"answers.answer.answer_skipped": "Répondre à {n} questions ignorées",
|
||||
"answers.preferred.your_answer": "Votre réponse",
|
||||
"answers.content.answers_you_accept": "Réponses que vous acceptez",
|
||||
"answers.preferred.user_answer": "La réponse de {name}",
|
||||
"answers.menu.edit": "Modifier",
|
||||
"answers.menu.delete": "Supprimer",
|
||||
"answers.menu.skip": "Ignorer",
|
||||
"answers.compatible": "Compatible",
|
||||
"answers.finish": "Terminer",
|
||||
"answers.next": "Suivant",
|
||||
"answers.incompatible": "Incompatible",
|
||||
"answers.modal.preferred_of_user": "Les réponses préférées de {name}",
|
||||
"answers.modal.user_marked": "{name} a marqué ceci comme ",
|
||||
@@ -505,6 +508,21 @@
|
||||
"answers.free.add_free_response": "Ajouter une réponse libre",
|
||||
"answers.free.choose_question": "Choisissez une question à laquelle répondre",
|
||||
"answers.free.see_others": "Voir {count} autres réponses",
|
||||
"answers.display.your_prompts": "Vos questions de compatibilité",
|
||||
"answers.display.user_prompts": "Questions de compatibilité de {name}",
|
||||
"answers.display.none_answered_you": "Vous n'avez pas encore répondu aux questions de compatibilité !",
|
||||
"answers.display.none_answered_user": "{name} n'a pas encore répondu aux questions de compatibilité !",
|
||||
"answers.display.add_some": "Ajoutez-en pour mieux voir avec qui vous seriez le plus compatible.",
|
||||
"answers.display.already_answered_all": "Vous avez déjà répondu à toutes les questions de compatibilité —",
|
||||
"answers.display.answer_more": "Répondez à plus de questions pour augmenter vos scores de compatibilité — ou ",
|
||||
"answers.display.none": "Aucune",
|
||||
"answers.display.acceptable": "Acceptable",
|
||||
"answers.display.also_acceptable": "Également acceptable",
|
||||
"answers.importance.0": "Peu important",
|
||||
"answers.importance.1": "Assez important",
|
||||
"answers.importance.2": "Important",
|
||||
"answers.importance.3": "Très important",
|
||||
"answers.content.your_thoughts": "Vos pensées (optionnelles, mais recommendées)",
|
||||
"profile.interested_in": "Intéressé·e par",
|
||||
"profile.age_any": "de tout âge",
|
||||
"profile.age_exact": "exactement {min} ans",
|
||||
@@ -527,8 +545,11 @@
|
||||
"profile.has_kids_one": "A {count} enfant",
|
||||
"profile.has_kids_many": "A {count} enfants",
|
||||
"profile.gender.male": "Homme",
|
||||
"profile.gender.plural.male": "Hommes",
|
||||
"profile.gender.female": "Femme",
|
||||
"profile.gender.plural.female": "Femmes",
|
||||
"profile.gender.other": "Autre",
|
||||
"profile.gender.plural.other": "Autres",
|
||||
"profile.relationship.collaboration": "Collaboration",
|
||||
"profile.relationship.friendship": "Amitié",
|
||||
"profile.relationship.relationship": "Relation",
|
||||
|
||||
Reference in New Issue
Block a user