* Refactor translation imports and update text for localization across settings and system monitor routes - Changed translation import from 'react-i18next' to '@/i18n/react-i18next-compat' in multiple files. - Updated various text strings to use translation keys for better localization support in: - Local API Server settings - MCP Servers settings - Privacy settings - Provider settings - Shortcuts settings - System Monitor - Thread details - Ensured consistent use of translation keys for all user-facing text. Update web-app/src/routes/settings/appearance.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Update web-app/src/routes/settings/appearance.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Update web-app/src/locales/vn/settings.json Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Update web-app/src/containers/dialogs/DeleteMCPServerConfirm.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Update web-app/src/locales/id/common.json Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Add Chinese (Simplified and Traditional) localization files for various components - Created `tools.json`, `updater.json`, `assistants.json`, `chat.json`, `common.json`, `hub.json`, `logs.json`, `mcp-servers.json`, `provider.json`, `providers.json`, `settings.json`, `setup.json`, `system-monitor.json`, `tool-approval.json` in both `zh-CN` and `zh-TW` locales. - Added translations for tool approval, updater notifications, assistant management, chat interface, common UI elements, hub interactions, logging messages, MCP server configurations, provider management, settings options, setup instructions, and system monitoring. * Refactor localization strings for improved clarity and consistency in English, Indonesian, and Vietnamese settings files * Fix missing key and reword * fix pr comment --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
70 lines
2.2 KiB
TypeScript
70 lines
2.2 KiB
TypeScript
import { Card } from './Card'
|
|
import { useModelProvider } from '@/hooks/useModelProvider'
|
|
import { Link } from '@tanstack/react-router'
|
|
import { route } from '@/constants/routes'
|
|
import HeaderPage from './HeaderPage'
|
|
import { isProd } from '@/lib/version'
|
|
import { useTranslation } from '@/i18n/react-i18next-compat'
|
|
|
|
function SetupScreen() {
|
|
const { t } = useTranslation()
|
|
const { providers } = useModelProvider()
|
|
const firstItemRemoteProvider =
|
|
providers.length > 0 ? providers[1].provider : 'openai'
|
|
|
|
return (
|
|
<div className="flex h-full flex-col flex-justify-center">
|
|
<HeaderPage></HeaderPage>
|
|
<div className="h-full px-8 overflow-y-auto flex flex-col gap-2 justify-center ">
|
|
<div className="w-4/6 mx-auto">
|
|
<div className="mb-8 text-left">
|
|
<h1 className="font-editorialnew text-main-view-fg text-4xl">
|
|
{t('setup:welcome')}
|
|
</h1>
|
|
<p className="text-main-view-fg/70 text-lg mt-2">
|
|
{t('setup:description')}
|
|
</p>
|
|
</div>
|
|
<div className="flex gap-4 flex-col">
|
|
<Card
|
|
header={
|
|
<Link
|
|
to={route.hub}
|
|
search={{
|
|
...(!isProd ? { step: 'setup_local_provider' } : {}),
|
|
}}
|
|
>
|
|
<div>
|
|
<h1 className="text-main-view-fg font-medium text-base">
|
|
{t('setup:localModel')}
|
|
</h1>
|
|
</div>
|
|
</Link>
|
|
}
|
|
></Card>
|
|
<Card
|
|
header={
|
|
<Link
|
|
to={route.settings.providers}
|
|
params={{
|
|
providerName: firstItemRemoteProvider,
|
|
}}
|
|
search={{
|
|
step: 'setup_remote_provider',
|
|
}}
|
|
>
|
|
<h1 className="text-main-view-fg font-medium text-base">
|
|
{t('setup:remoteProvider')}
|
|
</h1>
|
|
</Link>
|
|
}
|
|
></Card>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default SetupScreen
|