Add mobile chinese translation
This commit is contained in:
@@ -810,5 +810,9 @@
|
|||||||
"invalidVerificationCode": "Invalid verification code",
|
"invalidVerificationCode": "Invalid verification code",
|
||||||
"failedToDisableTotp": "Failed to disable TOTP",
|
"failedToDisableTotp": "Failed to disable TOTP",
|
||||||
"failedToGenerateBackupCodes": "Failed to generate backup codes"
|
"failedToGenerateBackupCodes": "Failed to generate backup codes"
|
||||||
|
},
|
||||||
|
"mobile": {
|
||||||
|
"selectHostToStart": "Select a host to start your terminal session",
|
||||||
|
"limitedSupportMessage": "Mobile support is currently limited. A dedicated mobile app is coming soon to enhance your experience."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@
|
|||||||
"firstUserMessage": "您是第一个用户,将被设为管理员。您可以在侧边栏用户下拉菜单中查看管理员设置。如果您认为这是错误,请检查 docker 日志,或创建",
|
"firstUserMessage": "您是第一个用户,将被设为管理员。您可以在侧边栏用户下拉菜单中查看管理员设置。如果您认为这是错误,请检查 docker 日志,或创建",
|
||||||
"external": "外部",
|
"external": "外部",
|
||||||
"loginWithExternal": "使用外部提供商登录",
|
"loginWithExternal": "使用外部提供商登录",
|
||||||
"loginWithExternalDesc": "使用您配置的外部身份提供商登录",
|
"loginWithExternalDesc": "使用您配置的外部身份提供者登录",
|
||||||
"resetPasswordButton": "重置密码",
|
"resetPasswordButton": "重置密码",
|
||||||
"sendResetCode": "发送重置代码",
|
"sendResetCode": "发送重置代码",
|
||||||
"resetCodeDesc": "输入您的用户名以接收密码重置代码。代码将记录在 docker 容器日志中。",
|
"resetCodeDesc": "输入您的用户名以接收密码重置代码。代码将记录在 docker 容器日志中。",
|
||||||
@@ -852,5 +852,9 @@
|
|||||||
"invalidVerificationCode": "无效的验证码",
|
"invalidVerificationCode": "无效的验证码",
|
||||||
"failedToDisableTotp": "禁用 TOTP 失败",
|
"failedToDisableTotp": "禁用 TOTP 失败",
|
||||||
"failedToGenerateBackupCodes": "生成备用码失败"
|
"failedToGenerateBackupCodes": "生成备用码失败"
|
||||||
|
},
|
||||||
|
"mobile": {
|
||||||
|
"selectHostToStart": "选择一个主机以开始您的终端会话",
|
||||||
|
"limitedSupportMessage": "移动端支持目前有限。我们即将推出专门的移动应用以提升您的体验。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ import {LeftSidebar} from "@/ui/Mobile/Navigation/LeftSidebar.tsx";
|
|||||||
import {TabProvider, useTabs} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
import {TabProvider, useTabs} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
||||||
import {getUserInfo} from "@/ui/main-axios.ts";
|
import {getUserInfo} from "@/ui/main-axios.ts";
|
||||||
import {HomepageAuth} from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
|
import {HomepageAuth} from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
|
||||||
|
import {useTranslation} from "react-i18next";
|
||||||
|
|
||||||
function getCookie(name: string) {
|
function getCookie(name: string) {
|
||||||
return document.cookie.split('; ').reduce((r, v) => {
|
return document.cookie.split('; ').reduce((r, v) => {
|
||||||
@@ -15,6 +16,7 @@ function getCookie(name: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const AppContent: FC = () => {
|
const AppContent: FC = () => {
|
||||||
|
const {t} = useTranslation();
|
||||||
const {tabs, currentTab, getTab} = useTabs();
|
const {tabs, currentTab, getTab} = useTabs();
|
||||||
const [isSidebarOpen, setIsSidebarOpen] = React.useState(true);
|
const [isSidebarOpen, setIsSidebarOpen] = React.useState(true);
|
||||||
const [ready, setReady] = React.useState(true);
|
const [ready, setReady] = React.useState(true);
|
||||||
@@ -103,7 +105,7 @@ const AppContent: FC = () => {
|
|||||||
if (authLoading) {
|
if (authLoading) {
|
||||||
return (
|
return (
|
||||||
<div className="h-screen w-screen flex items-center justify-center bg-[#09090b]">
|
<div className="h-screen w-screen flex items-center justify-center bg-[#09090b]">
|
||||||
<p className="text-white">Loading...</p>
|
<p className="text-white">{t('common.loading')}</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -150,10 +152,10 @@ const AppContent: FC = () => {
|
|||||||
{tabs.length === 0 && (
|
{tabs.length === 0 && (
|
||||||
<div className="flex flex-col items-center justify-center h-full text-white gap-3 px-4 text-center">
|
<div className="flex flex-col items-center justify-center h-full text-white gap-3 px-4 text-center">
|
||||||
<h1 className="text-lg font-semibold">
|
<h1 className="text-lg font-semibold">
|
||||||
Select a host to start your terminal session
|
{t('mobile.selectHostToStart')}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-sm text-gray-300 max-w-xs">
|
<p className="text-sm text-gray-300 max-w-xs">
|
||||||
Mobile support is currently limited. A dedicated mobile app is coming soon to enhance your experience.
|
{t('mobile.limitedSupportMessage')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user