From 3c514de79d660f9d2237ac5486aa2d3c377ab20b Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 29 Mar 2026 21:03:26 +0200 Subject: [PATCH] Fix locale not passed --- web/components/optional-profile-form.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/components/optional-profile-form.tsx b/web/components/optional-profile-form.tsx index eae0c194..499a0676 100644 --- a/web/components/optional-profile-form.tsx +++ b/web/components/optional-profile-form.tsx @@ -43,7 +43,7 @@ import {Slider} from 'web/components/widgets/slider' import {Title} from 'web/components/widgets/title' import {useChoicesContext} from 'web/hooks/use-choices' import {api} from 'web/lib/api' -import {useT} from 'web/lib/locale' +import {useLocale, useT} from 'web/lib/locale' import {track} from 'web/lib/service/analytics' import {colClassName, labelClassName} from 'web/pages/signup' @@ -63,6 +63,7 @@ export const OptionalProfileUserForm = (props: { const [uploadingImages, setUploadingImages] = useState(false) const [ageError, setAgeError] = useState(null) const t = useT() + const {locale} = useLocale() const choices = useChoicesContext() const [interestChoices, setInterestChoices] = useState(choices.interests) @@ -93,7 +94,10 @@ export const OptionalProfileUserForm = (props: { setIsExtracting(true) try { const isInputUrl = isUrl(llmContent) - const payload = isInputUrl ? {url: urlize(llmContent).trim()} : {content: llmContent.trim()} + const payload = { + locale, + ...(isInputUrl ? {url: urlize(llmContent).trim()} : {content: llmContent.trim()}), + } const extracted = await api('llm-extract-profile', payload) for (const data of Object.entries(removeNullOrUndefinedProps(extracted))) {