diff --git a/.tolgeerc.json b/.tolgeerc.json index 2538f88177..76354d96f3 100644 --- a/.tolgeerc.json +++ b/.tolgeerc.json @@ -23,6 +23,10 @@ { "language": "pt-BR", "path": "./packages/lib/messages/pt-BR.json" + }, + { + "language": "zh-Hant-TW", + "path": "./packages/lib/messages/zh-Hant-TW.json" } ], "forceMode": "OVERRIDE" diff --git a/apps/web/modules/survey/list/page.tsx b/apps/web/modules/survey/list/page.tsx index f13bcca386..c2f47a5217 100644 --- a/apps/web/modules/survey/list/page.tsx +++ b/apps/web/modules/survey/list/page.tsx @@ -17,9 +17,9 @@ import { Metadata } from "next"; import { getServerSession } from "next-auth"; import Link from "next/link"; import { redirect } from "next/navigation"; -import { SURVEYS_PER_PAGE, WEBAPP_URL } from "@formbricks/lib/constants"; +import { DEFAULT_LOCALE, SURVEYS_PER_PAGE, WEBAPP_URL } from "@formbricks/lib/constants"; import { getAccessFlags } from "@formbricks/lib/membership/utils"; -import { findMatchingLocale } from "@formbricks/lib/utils/locale"; +import { getUserLocale } from "@formbricks/lib/user/service"; import { TTemplateRole } from "@formbricks/types/templates"; export const metadata: Metadata = { @@ -80,7 +80,7 @@ export const SurveysPage = async ({ const surveyCount = await getSurveyCount(params.environmentId); const currentProjectChannel = project.config.channel ?? null; - const locale = await findMatchingLocale(); + const locale = (await getUserLocale(session.user.id)) ?? DEFAULT_LOCALE; const CreateSurveyButton = () => { return (