This commit is contained in:
Baobhan Sith
2025-05-16 20:25:39 +08:00
parent fcaf1be506
commit 3ccaca7144
4 changed files with 128 additions and 15 deletions
@@ -11,7 +11,7 @@ interface Props {
const props = defineProps<Props>(); const props = defineProps<Props>();
const emit = defineEmits(['update:visible']); const emit = defineEmits(['update:visible']);
const { t } = useI18n(); const { t, locale } = useI18n(); // +++ 解构出 locale +++
const connectionsStore = useConnectionsStore(); const connectionsStore = useConnectionsStore();
// Helper function to get connection name by ID // Helper function to get connection name by ID
@@ -123,7 +123,8 @@ const getDisplayStatus = (status: string): string => {
const formatDate = (dateInput: string | Date): string => { const formatDate = (dateInput: string | Date): string => {
if (!dateInput) return ''; if (!dateInput) return '';
try { try {
return new Date(dateInput).toLocaleString(navigator.language, { // +++ 使用 i18n 的 locale 进行日期格式化 +++
return new Date(dateInput).toLocaleString(locale.value, {
year: 'numeric', month: 'short', day: 'numeric', year: 'numeric', month: 'short', day: 'numeric',
hour: '2-digit', minute: '2-digit', second: '2-digit' hour: '2-digit', minute: '2-digit', second: '2-digit'
}); });
+49
View File
@@ -1425,6 +1425,55 @@
"logExportError": "Failed to export suspended session log: {error}" "logExportError": "Failed to export suspended session log: {error}"
} }
}, },
"transferProgressModal": {
"title": "File Transfer Progress",
"loading": "Loading transfer tasks...",
"errorLoadingTitle": "Loading Error",
"errorLoading": "Failed to load transfer tasks: {error}",
"error": {
"unknown": "Unknown error",
"cancelFailed": "Failed to cancel task."
},
"noTasks": "There are no active transfer tasks currently.",
"task": {
"idLabel": "Task",
"createdAt": "Created at",
"overallProgress": "Overall Progress"
},
"status": {
"queued": "Queued",
"inProgress": "In Progress",
"completed": "Completed",
"failed": "Failed",
"partiallyCompleted": "Partially Completed",
"connecting": "Connecting",
"transferring": "Transferring",
"cancelling": "Cancelling",
"cancelled": "Cancelled"
},
"confirmCancel": "Are you sure you want to cancel this transfer task?",
"cancelRequested": "Cancel request sent.",
"cancelTaskTooltip": "Cancel Task",
"cancellingTooltip": "Cancelling...",
"cancelButton": "Cancel",
"cancellingButton": "Cancelling",
"subTasks": {
"titleToggle": "View {count} Sub-tasks",
"noSubTasks": "No sub-tasks."
},
"subTask": {
"source": "Source File",
"connectionId": "Target Connection",
"status": "Status",
"method": "Method",
"error": "Error"
},
"connectionIdFallback": "Connection ID: {connectionId}",
"unknownFileName": "[Unknown File Name]",
"unknownSourceServer": "[Unknown Source Server]",
"unknownTargetPath": "[Unknown Target Path]",
"taskIdFallback": "Task ID: {taskId}"
},
"sendFilesModal": { "sendFilesModal": {
"title": "Send Files", "title": "Send Files",
"searchConnectionsPlaceholder": "Search connections...", "searchConnectionsPlaceholder": "Search connections...",
+49
View File
@@ -1386,6 +1386,55 @@
"autoTerminated": "中断されたセッション「{name}」は、理由: {reason} によりバックエンドによって自動終了されました。" "autoTerminated": "中断されたセッション「{name}」は、理由: {reason} によりバックエンドによって自動終了されました。"
} }
}, },
"transferProgressModal": {
"title": "ファイル転送進捗",
"loading": "転送タスクを読み込み中...",
"errorLoadingTitle": "読み込みエラー",
"errorLoading": "転送タスクの読み込みに失敗しました:{error}",
"error": {
"unknown": "不明なエラー",
"cancelFailed": "タスクの中止に失敗しました。"
},
"noTasks": "現在アクティブな転送タスクはありません。",
"task": {
"idLabel": "タスク",
"createdAt": "作成日時",
"overallProgress": "全体進捗"
},
"status": {
"queued": "待機中",
"inProgress": "進行中",
"completed": "完了",
"failed": "失敗",
"partiallyCompleted": "一部完了",
"connecting": "接続中",
"transferring": "転送中",
"cancelling": "中止中",
"cancelled": "中止済み"
},
"confirmCancel": "この転送タスクを中止してもよろしいですか?",
"cancelRequested": "中止リクエストを送信しました。",
"cancelTaskTooltip": "タスクを中止",
"cancellingTooltip": "中止中...",
"cancelButton": "中止",
"cancellingButton": "中止中",
"subTasks": {
"titleToggle": "{count} 個のサブタスクを表示",
"noSubTasks": "サブタスクはありません。"
},
"subTask": {
"source": "送信元ファイル",
"connectionId": "宛先接続",
"status": "状態",
"method": "方法",
"error": "エラー"
},
"connectionIdFallback": "接続ID: {connectionId}",
"unknownFileName": "[ファイル名不明]",
"unknownSourceServer": "[送信元サーバー不明]",
"unknownTargetPath": "[宛先パス不明]",
"taskIdFallback": "タスクID: {taskId}"
},
"sendFilesModal": { "sendFilesModal": {
"title": "ファイル送信", "title": "ファイル送信",
"searchConnectionsPlaceholder": "接続を検索...", "searchConnectionsPlaceholder": "接続を検索...",
+25 -11
View File
@@ -1402,10 +1402,16 @@
"title": "文件传输进度", "title": "文件传输进度",
"loading": "正在加载传输任务...", "loading": "正在加载传输任务...",
"errorLoadingTitle": "加载错误", "errorLoadingTitle": "加载错误",
"errorLoading": "加载传输任务时出错: {error}", "errorLoading": "加载传输任务失败:{error}",
"noTasks": "当前没有活动的传输任务。",
"error": { "error": {
"unknown": "发生未知错误" "unknown": "未知错误",
"cancelFailed": "中止任务失败。"
},
"noTasks": "当前没有活动的传输任务。",
"task": {
"idLabel": "任务",
"createdAt": "创建于",
"overallProgress": "整体进度"
}, },
"status": { "status": {
"queued": "排队中", "queued": "排队中",
@@ -1414,15 +1420,18 @@
"failed": "已失败", "failed": "已失败",
"partiallyCompleted": "部分完成", "partiallyCompleted": "部分完成",
"connecting": "连接中", "connecting": "连接中",
"transferring": "传输中" "transferring": "传输中",
}, "cancelling": "中止中",
"task": { "cancelled": "已中止"
"idLabel": "任务",
"createdAt": "创建于",
"overallProgress": "整体进度"
}, },
"confirmCancel": "您确定要中止此传输任务吗?",
"cancelRequested": "已发送中止请求。",
"cancelTaskTooltip": "中止任务",
"cancellingTooltip": "中止中...",
"cancelButton": "中止",
"cancellingButton": "中止中",
"subTasks": { "subTasks": {
"titleToggle": "查看/隐藏 {count} 个子任务", "titleToggle": "查看 {count} 个子任务",
"noSubTasks": "没有子任务。" "noSubTasks": "没有子任务。"
}, },
"subTask": { "subTask": {
@@ -1431,7 +1440,12 @@
"status": "状态", "status": "状态",
"method": "方法", "method": "方法",
"error": "错误" "error": "错误"
} },
"connectionIdFallback": "连接ID: {connectionId}",
"unknownFileName": "[文件名未知]",
"unknownSourceServer": "[源服务器未知]",
"unknownTargetPath": "[目标路径未知]",
"taskIdFallback": "任务ID: {taskId}"
}, },
"sendFilesModal": { "sendFilesModal": {
"title": "发送文件", "title": "发送文件",