mirror of
https://github.com/rustfs/console.git
synced 2026-09-01 15:17:45 +08:00
6b40c2bc16
* feat: 补充任务状态和操作相关的翻译键 - 添加小写版本的状态翻译键:waiting, in progress, success, failed, paused, canceled - 添加 Upload 翻译键 - 更新任务状态显示使用新的翻译键 - 统一翻译键命名规范 * feat: 为法语语言包补充任务状态和操作相关的翻译键 - 添加小写版本的状态翻译键:waiting, in progress, success, failed, paused, canceled - 添加 Upload 翻译键 - 修复 In Progress 参数名(deleting -> processing) - 更新 Success Status 和 Failed Status 翻译 * fix: 对齐所有语言包的翻译键 - 为法语语言包添加 Processing (with count) 键 - 为土耳其语语言包添加 success 和 Success Status 键 - 为中文和英文语言包添加 Success Status 键 - 确保所有语言包(中文、英文、土耳其语、法语)的键完全对齐 - 所有语言包现在都有 880 个键 * feat: 添加国际主流语言支持 新增语言包: - 日语 (ja-JP) - 日本語 - 韩语 (ko-KR) - 한국어 - 德语 (de-DE) - Deutsch - 西班牙语 (es-ES) - Español - 俄语 (ru-RU) - Русский - 葡萄牙语 (pt-BR) - Português - 意大利语 (it-IT) - Italiano 更新内容: - 更新 nuxt.config.ts 添加新语言配置 - 更新 language-switcher.vue 组件添加新语言选项 - 所有新语言包包含 880 个翻译键(目前使用英文作为占位符) 现在支持共 11 种语言:英语、中文、日语、韩语、德语、法语、西班牙语、葡萄牙语、意大利语、俄语、土耳其语 * fix: 暂时隐藏未翻译的语言选项 - 从语言选择器中移除尚未翻译的语言(日语、韩语、德语、西班牙语、葡萄牙语、意大利语、俄语) - 只保留已完整翻译的语言:英语、中文、法语、土耳其语 - 未翻译的语言配置已注释,待翻译完成后可重新启用 这些语言包文件已创建但内容为英文占位符,切换后会显示英文内容 * feat: 完成德语和日语语言包翻译 - 将德语文件 (de-DE.json) 中的所有英文值翻译为德语 - 将日语文件 (ja-JP.json) 中的所有英文值翻译为日语 - 技术术语(如 API、KMS、IAM、MQTT 等)保持英文或使用适当的本地化形式 - 遵循德语和日语的本地化习惯和语言环境 * feat: 完成意大利语、韩语、巴西葡萄牙语和俄语翻译 * feat: 完成西班牙语翻译 * refactor: remove duplicate language options in language-switcher - Generate options array dynamically from languageConfig - Eliminate redundant language definitions - Maintain single source of truth for language data * fix: input shadow
52 lines
1.8 KiB
Vue
52 lines
1.8 KiB
Vue
<template>
|
|
<div class="flex flex-col gap-1">
|
|
<div class="flex items-center justify-between gap-3 group">
|
|
<div class="truncate text-sm font-medium text-foreground">{{ displayName }}</div>
|
|
<div class="flex shrink-0 items-center gap-1.5">
|
|
<Button variant="ghost" size="sm" class="h-auto px-2 text-xs opacity-0 group-hover:opacity-100" @click="remove">
|
|
<Trash2Icon class="size-4 text-red-500" />
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
<Progress :model-value="task.progress" class="h-[2px]" />
|
|
<div class="flex items-center justify-between text-muted-foreground text-xs">
|
|
<div>{{ subInfo }}</div>
|
|
<div>{{ statusText }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { Button } from '@/components/ui/button'
|
|
|
|
import Progress from '@/components/ui/progress/Progress.vue'
|
|
import { Trash2Icon } from 'lucide-vue-next'
|
|
import { computed } from 'vue'
|
|
import type { AnyTask } from '~/store/tasks'
|
|
import { useTaskManagerStore } from '~/store/tasks'
|
|
|
|
const { t } = useI18n()
|
|
const store = useTaskManagerStore()
|
|
|
|
const props = defineProps<{ task: AnyTask }>()
|
|
|
|
const actionLabel = computed(() => props.task.actionLabel)
|
|
const displayName = computed(() => props.task.displayName)
|
|
const subInfo = computed(() => props.task.subInfo)
|
|
|
|
const statusText = computed(() => {
|
|
const action = actionLabel.value
|
|
const map: Record<string, string> = {
|
|
pending: `${t(action)}${t('waiting')}`,
|
|
running: `${t(action)}${t('in progress')}`,
|
|
completed: `${t(action)}${t('success')}`,
|
|
failed: `${t(action)}${t('failed')}`,
|
|
paused: `${t(action)}${t('paused')}`,
|
|
canceled: `${t(action)}${t('canceled')}`,
|
|
}
|
|
return map[props.task.status] ?? `${t(action)}${t('in progress')}`
|
|
})
|
|
|
|
const remove = () => store.removeTask(props.task.id)
|
|
</script>
|