From 971053c90d6967078c5922367fcd54a24d538f93 Mon Sep 17 00:00:00 2001 From: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:19:47 +0530 Subject: [PATCH] fix: i18n issues in date picker (#4469) --- .../edit/components/CTAQuestionForm.tsx | 17 ++++++++--------- .../edit/components/OpenQuestionForm.tsx | 15 +++++++-------- .../modules/ui/components/file-input/index.tsx | 8 ++++---- .../ui/components/options-switch/index.tsx | 4 +--- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/CTAQuestionForm.tsx b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/CTAQuestionForm.tsx index b6e8412744..6592a06758 100644 --- a/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/CTAQuestionForm.tsx +++ b/apps/web/app/(app)/(survey-editor)/environments/[environmentId]/surveys/[surveyId]/edit/components/CTAQuestionForm.tsx @@ -12,14 +12,6 @@ import { TContactAttributeKey } from "@formbricks/types/contact-attribute-key"; import { TSurvey, TSurveyCTAQuestion } from "@formbricks/types/surveys/types"; import { TUserLocale } from "@formbricks/types/user"; -const options = [ - { - value: "internal", - label: "environments.surveys.edit.button_to_continue_in_survey", - }, - { value: "external", label: "environments.surveys.edit.button_to_link_to_external_url" }, -]; - interface CTAQuestionFormProps { localSurvey: TSurvey; question: TSurveyCTAQuestion; @@ -45,8 +37,15 @@ export const CTAQuestionForm = ({ contactAttributeKeys, locale, }: CTAQuestionFormProps): JSX.Element => { - const [firstRender, setFirstRender] = useState(true); const t = useTranslations(); + const options = [ + { + value: "internal", + label: t("environments.surveys.edit.button_to_continue_in_survey"), + }, + { value: "external", label: t("environments.surveys.edit.button_to_link_to_external_url") }, + ]; + const [firstRender, setFirstRender] = useState(true); const [parent] = useAutoAnimate(); return (