diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index cca6c3e9..cbbcade8 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -620,6 +620,26 @@ "updateHost": "Update Host", "addHost": "Add Host", "editHost": "Edit Host", + "pinConnection": "Pin Connection", + "authentication": "Authentication", + "password": "Password", + "key": "Key", + "sshPrivateKey": "SSH Private Key", + "keyPassword": "Key Password", + "keyType": "Key Type", + "enableTerminal": "Enable Terminal", + "enableTunnel": "Enable Tunnel", + "enableFileManager": "Enable File Manager", + "defaultPath": "Default Path", + "tunnelConnections": "Tunnel Connections", + "maxRetries": "Max Retries", + "upload": "Upload", + "updateKey": "Update Key", + "hostViewer": "Host Viewer", + "sshpassRequired": "Sshpass Required For Password Authentication", + "sshServerConfigRequired": "SSH Server Configuration Required", + "sshManagerAlreadyOpen": "SSH Manager already open", + "disabledDuringSplitScreen": "Disabled during split screen", "productionFolder": "Production", "databaseServer": "Database Server", "unknownError": "Unknown error", diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 6502e255..bb568d78 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -620,6 +620,26 @@ "updateHost": "更新主机", "addHost": "添加主机", "editHost": "编辑主机", + "pinConnection": "固定连接", + "authentication": "认证", + "password": "密码", + "key": "密钥", + "sshPrivateKey": "SSH 私钥", + "keyPassword": "密钥密码", + "keyType": "密钥类型", + "enableTerminal": "启用终端", + "enableTunnel": "启用隧道", + "enableFileManager": "启用文件管理器", + "defaultPath": "默认路径", + "tunnelConnections": "隧道连接", + "maxRetries": "最大重试次数", + "upload": "上传", + "updateKey": "更新密钥", + "hostViewer": "主机查看器", + "sshpassRequired": "密码认证需要 Sshpass", + "sshServerConfigRequired": "需要 SSH 服务器配置", + "sshManagerAlreadyOpen": "SSH 管理器已打开", + "disabledDuringSplitScreen": "分屏期间禁用", "productionFolder": "生产环境", "databaseServer": "数据库服务器", "unknownError": "未知错误", diff --git a/src/ui/Apps/Host Manager/HostManager.tsx b/src/ui/Apps/Host Manager/HostManager.tsx index 22a12b76..9a53545e 100644 --- a/src/ui/Apps/Host Manager/HostManager.tsx +++ b/src/ui/Apps/Host Manager/HostManager.tsx @@ -4,6 +4,7 @@ import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs.tsx import {Separator} from "@/components/ui/separator.tsx"; import {HostManagerHostEditor} from "@/ui/Apps/Host Manager/HostManagerHostEditor.tsx"; import {useSidebar} from "@/components/ui/sidebar.tsx"; +import {useTranslation} from "react-i18next"; interface HostManagerProps { onSelectView: (view: string) => void; @@ -34,6 +35,7 @@ interface SSHHost { } export function HostManager({onSelectView, isTopbarOpen}: HostManagerProps): React.ReactElement { + const {t} = useTranslation(); const [activeTab, setActiveTab] = useState("host_viewer"); const [editingHost, setEditingHost] = useState(null); const {state: sidebarState} = useSidebar(); @@ -75,9 +77,9 @@ export function HostManager({onSelectView, isTopbarOpen}: HostManagerProps): Rea - Host Viewer + {t('hosts.hostViewer')} - {editingHost ? "Edit Host" : "Add Host"} + {editingHost ? t('hosts.editHost') : t('hosts.addHost')} diff --git a/src/ui/Apps/Host Manager/HostManagerHostEditor.tsx b/src/ui/Apps/Host Manager/HostManagerHostEditor.tsx index 593cba0d..506baedc 100644 --- a/src/ui/Apps/Host Manager/HostManagerHostEditor.tsx +++ b/src/ui/Apps/Host Manager/HostManagerHostEditor.tsx @@ -621,7 +621,7 @@ export function HostManagerHostEditor({editingHost, onFormSubmit}: SSHManagerHos > - {field.value ? (editingHost ? 'Update Key' : field.value.name) : 'Upload'} + {field.value ? (editingHost ? t('hosts.updateKey') : field.value.name) : t('hosts.upload')} @@ -785,7 +785,7 @@ export function HostManagerHostEditor({editingHost, onFormSubmit}: SSHManagerHos name="tunnelConnections" render={({field}) => ( - Tunnel Connections + {t('hosts.tunnelConnections')}
{field.value.map((connection, index) => ( @@ -1041,7 +1041,7 @@ export function HostManagerHostEditor({editingHost, onFormSubmit}: SSHManagerHos transform: 'translateY(8px)' }} > - {editingHost ? "Update Host" : "Add Host"} + {editingHost ? t('hosts.updateHost') : t('hosts.addHost')}