diff --git a/chatdesk-ui/app/[locale]/setup/page.tsx b/chatdesk-ui/app/[locale]/setup/page.tsx index 56776ba..03cd57d 100644 --- a/chatdesk-ui/app/[locale]/setup/page.tsx +++ b/chatdesk-ui/app/[locale]/setup/page.tsx @@ -54,10 +54,13 @@ export default function SetupPage() { if (locales.includes(segment)) { locale = segment } - const homePath = locale === defaultLocale ? "/" : `/${locale}` + // /zh ok + //const homePath = locale === defaultLocale ? "/" : `/${locale}` + // en ok //const homePath = locale === defaultLocale ? "" : `/${locale}` - + const getLocalizedPath = (subPath: string) => + locale === defaultLocale ? `/${subPath}` : `/${locale}/${subPath}` // // 提取当前路径中的 locale 部分 @@ -98,7 +101,8 @@ export default function SetupPage() { if (!session) { // 强制跳转到带有 locale 的 login 页面 console.log("...........[setup/page.tsx]") - return router.push(`${homePath}/login`) + //return router.push(`${homePath}/login`) + return router.push(getLocalizedPath("login")) // return router.push(`/${locale}/login`) } else { const user = session.user @@ -126,8 +130,9 @@ export default function SetupPage() { const homeWorkspaceId = await getHomeWorkspaceByUserId( session.user.id ) - return router.push(`${homePath}/${homeWorkspaceId}/chat`) + //return router.push(`${homePath}/${homeWorkspaceId}/chat`) // return router.push(`/${locale}/${homeWorkspaceId}/chat`) + return router.push(getLocalizedPath(`${homeWorkspaceId}/chat`)) } } })() @@ -149,7 +154,8 @@ export default function SetupPage() { const session = (await supabase.auth.getSession()).data.session if (!session) { // return router.push(`/${locale}/login`) - return (`${homePath}/login`) + //return (`${homePath}/login`) + return router.push(getLocalizedPath("login")) } const user = session.user @@ -187,8 +193,9 @@ export default function SetupPage() { setSelectedWorkspace(homeWorkspace!) setWorkspaces(workspaces) - return router.push(`${homePath}/${homeWorkspace?.id}/chat`) + // return router.push(`${homePath}/${homeWorkspace?.id}/chat`) // return router.push(`/${locale}/${homeWorkspace?.id}/chat`) + return router.push(getLocalizedPath(`${homeWorkspace?.id}/chat`)) } const renderStep = (stepNum: number) => { diff --git a/chatdesk-ui/public/locales/en/translation.json b/chatdesk-ui/public/locales/en/translation.json index 6a1799a..cc46d07 100644 --- a/chatdesk-ui/public/locales/en/translation.json +++ b/chatdesk-ui/public/locales/en/translation.json @@ -1,6 +1,6 @@ { "inputPlaceholder": "Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.", - "Company Name": "Jelly Drops LLC", + "Company Name": "ChatDesk: Front-End Platform for AI Chat R&D", "Clock In": "Start", "meta": { "appName": "ChatDesk", diff --git a/chatdesk-ui/public/locales/ja/translation.json b/chatdesk-ui/public/locales/ja/translation.json index e8b57ff..ba5bc1f 100644 --- a/chatdesk-ui/public/locales/ja/translation.json +++ b/chatdesk-ui/public/locales/ja/translation.json @@ -1,6 +1,6 @@ { "inputPlaceholder": "何でも聞いてください。「/」でプロンプト、「@」でファイル、「#」でツールを入力してください。", - "Company Name": "深セン果冻人工知能", + "Company Name": "対話工房 · 汎用AI対話アプリ開発プラットフォーム", "Clock In": "始める", "meta": { "appName": "対話工房", diff --git a/chatdesk-ui/public/locales/zh/translation.json b/chatdesk-ui/public/locales/zh/translation.json index e06d60f..450d87a 100644 --- a/chatdesk-ui/public/locales/zh/translation.json +++ b/chatdesk-ui/public/locales/zh/translation.json @@ -1,10 +1,10 @@ { "inputPlaceholder": "随便问点什么。输入“/”查找提示,“@”查找文件,“#”查找工具。", - "Company Name": "深圳果冻人工智能", + "Company Name": "对话工坊 · AI对话应用通用开发平台", "Clock In": "开始", "meta": { - "appName": "对话工坊", - "defaultTitle": "对话工坊", + "appName": "对话工坊 · AI对话应用通用开发平台", + "defaultTitle": "对话工坊 · AI对话应用通用开发平台", "description": "本平台是一个通用 LLM 对话应用研发前端,支持基于大语言模型的对话系统的开发与测试。" },