Add mobile chinese translation

This commit is contained in:
LukeGus
2025-09-06 16:48:54 -05:00
parent 420d57c6f1
commit bf87992687
3 changed files with 15 additions and 5 deletions

View File

@@ -208,7 +208,7 @@
"downloadSample": "Download Sample",
"formatGuide": "Format Guide",
"uncategorized": "Uncategorized",
"confirmDelete": "Are you sure you want to delete \"{{name}}\"?",
"confirmDelete": "Are you sure you want to delete \"{{name}}\" ?",
"failedToDeleteHost": "Failed to delete host",
"jsonMustContainHosts": "JSON must contain a \"hosts\" array or be an array of hosts",
"noHostsInJson": "No hosts found in JSON file",
@@ -810,5 +810,9 @@
"invalidVerificationCode": "Invalid verification code",
"failedToDisableTotp": "Failed to disable TOTP",
"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."
}
}

View File

@@ -614,7 +614,7 @@
"firstUserMessage": "您是第一个用户,将被设为管理员。您可以在侧边栏用户下拉菜单中查看管理员设置。如果您认为这是错误,请检查 docker 日志,或创建",
"external": "外部",
"loginWithExternal": "使用外部提供商登录",
"loginWithExternalDesc": "使用您配置的外部身份提供登录",
"loginWithExternalDesc": "使用您配置的外部身份提供登录",
"resetPasswordButton": "重置密码",
"sendResetCode": "发送重置代码",
"resetCodeDesc": "输入您的用户名以接收密码重置代码。代码将记录在 docker 容器日志中。",
@@ -852,5 +852,9 @@
"invalidVerificationCode": "无效的验证码",
"failedToDisableTotp": "禁用 TOTP 失败",
"failedToGenerateBackupCodes": "生成备用码失败"
},
"mobile": {
"selectHostToStart": "选择一个主机以开始您的终端会话",
"limitedSupportMessage": "移动端支持目前有限。我们即将推出专门的移动应用以提升您的体验。"
}
}

View File

@@ -6,6 +6,7 @@ import {LeftSidebar} from "@/ui/Mobile/Navigation/LeftSidebar.tsx";
import {TabProvider, useTabs} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
import {getUserInfo} from "@/ui/main-axios.ts";
import {HomepageAuth} from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
import {useTranslation} from "react-i18next";
function getCookie(name: string) {
return document.cookie.split('; ').reduce((r, v) => {
@@ -15,6 +16,7 @@ function getCookie(name: string) {
}
const AppContent: FC = () => {
const {t} = useTranslation();
const {tabs, currentTab, getTab} = useTabs();
const [isSidebarOpen, setIsSidebarOpen] = React.useState(true);
const [ready, setReady] = React.useState(true);
@@ -103,7 +105,7 @@ const AppContent: FC = () => {
if (authLoading) {
return (
<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>
)
}
@@ -150,10 +152,10 @@ const AppContent: FC = () => {
{tabs.length === 0 && (
<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">
Select a host to start your terminal session
{t('mobile.selectHostToStart')}
</h1>
<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>
</div>
)}