mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
更新国际化支持:为工作流侧边栏及相关组件添加多语言文本,提升用户体验
This commit is contained in:
Vendored
+1
@@ -2,6 +2,7 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// Generated by unplugin-vue-components
|
// Generated by unplugin-vue-components
|
||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
|
// biome-ignore lint: disable
|
||||||
export {}
|
export {}
|
||||||
|
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import api from '@/api'
|
|||||||
import useDragAndDrop from '@core/utils/workflow'
|
import useDragAndDrop from '@core/utils/workflow'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { getActionStepText } from '@/types/i18n-type'
|
||||||
|
|
||||||
interface ActionItem {
|
interface ActionItem {
|
||||||
name: string
|
name: string
|
||||||
@@ -145,7 +146,7 @@ onMounted(() => {
|
|||||||
<VIcon :icon="getActionIcon(action.type)" size="18" />
|
<VIcon :icon="getActionIcon(action.type)" size="18" />
|
||||||
</VAvatar>
|
</VAvatar>
|
||||||
<div v-if="!isSidebarCollapsed || display.smAndDown.value" class="component-info">
|
<div v-if="!isSidebarCollapsed || display.smAndDown.value" class="component-info">
|
||||||
<div class="component-name">{{ action.name }}</div>
|
<div class="component-name">{{ getActionStepText(action.name) }}</div>
|
||||||
<div class="component-desc">
|
<div class="component-desc">
|
||||||
{{ display.smAndDown.value ? t('workflow.clickToAdd') : t('workflow.dragToCanvas') }}
|
{{ display.smAndDown.value ? t('workflow.clickToAdd') : t('workflow.dragToCanvas') }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -55,6 +55,21 @@ export default {
|
|||||||
plugin: 'Plugin',
|
plugin: 'Plugin',
|
||||||
other: 'Other',
|
other: 'Other',
|
||||||
},
|
},
|
||||||
|
actionStep: {
|
||||||
|
addDownload: 'Add Download',
|
||||||
|
addSubscribe: 'Add Subscribe',
|
||||||
|
fetchDownloads: 'Fetch Downloads',
|
||||||
|
fetchMedias: 'Fetch Media',
|
||||||
|
fetchRss: 'Fetch RSS',
|
||||||
|
fetchTorrents: 'Fetch Torrents',
|
||||||
|
filterMedias: 'Filter Media',
|
||||||
|
filterTorrents: 'Filter Torrents',
|
||||||
|
scanFile: 'Scan Directory',
|
||||||
|
scrapeFile: 'Scrape File',
|
||||||
|
sendEvent: 'Send Event',
|
||||||
|
sendMessage: 'Send Message',
|
||||||
|
transferFile: 'Transfer File',
|
||||||
|
},
|
||||||
theme: {
|
theme: {
|
||||||
light: 'Light',
|
light: 'Light',
|
||||||
dark: 'Dark',
|
dark: 'Dark',
|
||||||
|
|||||||
@@ -55,6 +55,21 @@ export default {
|
|||||||
plugin: '插件',
|
plugin: '插件',
|
||||||
other: '其它',
|
other: '其它',
|
||||||
},
|
},
|
||||||
|
actionStep: {
|
||||||
|
addDownload: '添加下载',
|
||||||
|
addSubscribe: '添加订阅',
|
||||||
|
fetchDownloads: '获取下载任务',
|
||||||
|
fetchMedias: '获取媒体',
|
||||||
|
fetchRss: '获取RSS资源',
|
||||||
|
fetchTorrents: '获取站点资源',
|
||||||
|
filterMedias: '过滤媒体',
|
||||||
|
filterTorrents: '过滤资源',
|
||||||
|
scanFile: '扫描目录',
|
||||||
|
scrapeFile: '刮削文件',
|
||||||
|
sendEvent: '发送事件',
|
||||||
|
sendMessage: '发送消息',
|
||||||
|
transferFile: '整理文件',
|
||||||
|
},
|
||||||
theme: {
|
theme: {
|
||||||
light: '浅色',
|
light: '浅色',
|
||||||
dark: '深色',
|
dark: '深色',
|
||||||
|
|||||||
@@ -55,6 +55,21 @@ export default {
|
|||||||
plugin: '插件',
|
plugin: '插件',
|
||||||
other: '其它',
|
other: '其它',
|
||||||
},
|
},
|
||||||
|
actionStep: {
|
||||||
|
addDownload: '添加下載',
|
||||||
|
addSubscribe: '添加訂閱',
|
||||||
|
fetchDownloads: '獲取下載任務',
|
||||||
|
fetchMedias: '獲取媒體數據',
|
||||||
|
fetchRss: '獲取RSS資源',
|
||||||
|
fetchTorrents: '獲取站點資源',
|
||||||
|
filterMedias: '過濾媒體數據',
|
||||||
|
filterTorrents: '過濾資源',
|
||||||
|
scanFile: '掃描目錄',
|
||||||
|
scrapeFile: '刮削文件',
|
||||||
|
sendEvent: '發送事件',
|
||||||
|
sendMessage: '發送消息',
|
||||||
|
transferFile: '整理文件',
|
||||||
|
},
|
||||||
theme: {
|
theme: {
|
||||||
light: '淺色',
|
light: '淺色',
|
||||||
dark: '深色',
|
dark: '深色',
|
||||||
|
|||||||
@@ -42,3 +42,29 @@ export function getNotificationSwitchText(label: string | undefined) {
|
|||||||
return t(switchMap[label])
|
return t(switchMap[label])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// actionStep
|
||||||
|
export function getActionStepText(label: string | undefined) {
|
||||||
|
if (!label) return ''
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const stepMap: Record<string, string> = {
|
||||||
|
'添加下载': 'actionStep.addDownload',
|
||||||
|
'添加订阅': 'actionStep.addSubscribe',
|
||||||
|
'获取下载任务': 'actionStep.fetchDownloads',
|
||||||
|
'获取媒体数据': 'actionStep.fetchMedias',
|
||||||
|
'获取RSS资源': 'actionStep.fetchRss',
|
||||||
|
'搜索站点资源': 'actionStep.fetchTorrents',
|
||||||
|
'过滤媒体数据': 'actionStep.filterMedias',
|
||||||
|
'过滤资源': 'actionStep.filterTorrents',
|
||||||
|
'扫描目录': 'actionStep.scanFile',
|
||||||
|
'刮削文件': 'actionStep.scrapeFile',
|
||||||
|
'发送事件': 'actionStep.sendEvent',
|
||||||
|
'发送消息': 'actionStep.sendMessage',
|
||||||
|
'整理文件': 'actionStep.transferFile',
|
||||||
|
}
|
||||||
|
if (label in stepMap) {
|
||||||
|
return t(stepMap[label])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user