更新国际化支持:为存储、媒体类型、通知开关及操作步骤等组件添加多语言文本,提升用户体验

This commit is contained in:
jxxghp
2025-04-29 13:24:27 +08:00
parent b75c93231e
commit b772e2d9ef
21 changed files with 566 additions and 386 deletions

View File

@@ -6,7 +6,7 @@ import type { NotificationConf, NotificationSwitchConf } from '@/api/types'
import NotificationChannelCard from '@/components/cards/NotificationChannelCard.vue'
import ProgressDialog from '@/components/dialog/ProgressDialog.vue'
import { useI18n } from 'vue-i18n'
import { getNotificationSwitchText } from '@/types/i18n-type'
import { notificationSwitchDict } from '@/api/constants'
// 国际化
const { t } = useI18n()
@@ -171,6 +171,12 @@ async function saveNotificationSwitchs() {
}
}
// 获取通知开关文本
function getNotificationSwitchText(type: string | undefined) {
if (!type) return ''
return notificationSwitchDict[type]
}
// 加载数据
onMounted(() => {
loadNotificationSetting()

View File

@@ -147,6 +147,8 @@ function addFilterRuleGroup() {
}
filterRuleGroups.value.push({
name: name,
media_type: '',
category: '',
})
}

View File

@@ -610,7 +610,7 @@ onDeactivated(() => {
</VCol>
</VRow>
<!-- 高级系统设置 -->
<VDialog v-if="advancedDialog" v-model="advancedDialog" scrollable max-width="60rem" persistent>
<VDialog v-if="advancedDialog" v-model="advancedDialog" scrollable max-width="60rem">
<VCard>
<VCardItem>
<VDialogCloseBtn @click="advancedDialog = false" />