Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: ci (#3983)

crazywoolab1194da6a545
diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx
index d8e97aac22d..efba20e6521 100644
--- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx
+++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx
@@ -37,7 +37,7 @@ import { LanguagesSupported } from '@/i18n/language'
import { useStore } from '@/app/components/app/store'
import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
-import { getLocaleOnServer } from '@/i18n/server'
+import { getLocaleOnClient } from '@/i18n'
export type IAppDetailLayoutProps = {
children: React.ReactNode
@@ -119,7 +119,7 @@ type IExtraInfoProps = {
}
const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
- const locale = getLocaleOnServer()
+ const locale = getLocaleOnClient()
const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile)
const { t } = useTranslation()
diff --git a/web/i18n/index.ts b/web/i18n/index.ts
index 5af93035db8..1eec0f3589c 100644
--- a/web/i18n/index.ts
+++ b/web/i18n/index.ts
@@ -16,3 +16,7 @@ export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
changeLanguage(locale)
reloadPage && location.reload()
}
+
+export const getLocaleOnClient = (): Locale => {
+ return Cookies.get(LOCALE_COOKIE_NAME) as Locale || i18n.defaultLocale
+}