- {{ plugin.desc || tm('pluginSetSelector.noDescription') }}
+ {{ pluginDescription(plugin) || tm('pluginSetSelector.noDescription') }}
{{ tm('pluginSetSelector.notActivated') }}
@@ -105,6 +105,7 @@
import { ref, computed, watch } from 'vue'
import axios from 'axios'
import { useModuleI18n } from '@/i18n/composables'
+import { usePluginI18n } from '@/utils/pluginI18n'
const props = defineProps({
modelValue: {
@@ -123,6 +124,7 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue'])
const { tm } = useModuleI18n('core.shared')
+const { pluginName, pluginDesc } = usePluginI18n()
const dialog = ref(false)
const pluginList = ref([])
@@ -130,6 +132,9 @@ const loading = ref(false)
const selectionMode = ref('custom') // 'all', 'none', 'custom'
const selectedPlugins = ref([])
+const pluginDisplayName = (plugin) => pluginName(plugin) || plugin.name
+const pluginDescription = (plugin) => pluginDesc(plugin)
+
// 判断是否为"所有插件"模式
const isAllPlugins = computed(() => {
return props.modelValue && props.modelValue.length === 1 && props.modelValue[0] === '*'
diff --git a/dashboard/src/components/shared/TemplateListEditor.vue b/dashboard/src/components/shared/TemplateListEditor.vue
index 9cc49d9a9..9b4b4c183 100644
--- a/dashboard/src/components/shared/TemplateListEditor.vue
+++ b/dashboard/src/components/shared/TemplateListEditor.vue
@@ -19,8 +19,8 @@
:key="option.value"
@click="addEntry(option.value)"
>
- {{ translateIfKey(option.label) }}
- {{ translateIfKey(option.hint) }}
+ {{ option.label }}
+ {{ option.hint }}
@@ -58,7 +58,7 @@
{{ templateLabel(entry.__template_key) }}
- {{ translateIfKey(getTemplate(entry)?.hint || getTemplate(entry)?.description) }}
+ {{ templateText(entry.__template_key, 'hint', getTemplate(entry)?.hint || getTemplate(entry)?.description) }}
@@ -82,10 +82,10 @@
>
- {{ translateIfKey(itemMeta?.description) || itemKey }}
+ {{ templateItemText(entry.__template_key, itemKey, 'description', itemMeta?.description) || itemKey }}
- {{ translateIfKey(itemMeta.hint) }}
+ {{ templateItemText(entry.__template_key, itemKey, 'hint', itemMeta.hint) }}
@@ -94,10 +94,10 @@
- {{ translateIfKey(childMeta?.description) || childKey }}
+ {{ templateItemText(entry.__template_key, `${itemKey}.${childKey}`, 'description', childMeta?.description) || childKey }}
- {{ translateIfKey(childMeta?.hint) }}
+ {{ templateItemText(entry.__template_key, `${itemKey}.${childKey}`, 'hint', childMeta?.hint) }}
@@ -105,6 +105,9 @@
@@ -122,11 +125,11 @@
- {{ translateIfKey(itemMeta?.description) }} ({{ itemKey }})
+ {{ templateItemText(entry.__template_key, itemKey, 'description', itemMeta?.description) }} ({{ itemKey }})
{{ itemKey }}
- {{ translateIfKey(itemMeta?.hint) }}
+ {{ templateItemText(entry.__template_key, itemKey, 'hint', itemMeta?.hint) }}
@@ -134,6 +137,9 @@
@@ -153,7 +159,8 @@