From b0de33c8015e4cd68f8e88dfd70f759cbc414026 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 12 Feb 2026 13:09:18 +0800 Subject: [PATCH] fix: provider extra param dialog key display error --- .../src/components/shared/ObjectEditor.vue | 63 +++++++++++-------- .../components/shared/TemplateListEditor.vue | 28 +++++---- .../src/i18n/locales/en-US/core/common.json | 16 +++++ .../src/i18n/locales/zh-CN/core/common.json | 16 +++++ 4 files changed, 87 insertions(+), 36 deletions(-) diff --git a/dashboard/src/components/shared/ObjectEditor.vue b/dashboard/src/components/shared/ObjectEditor.vue index ee6dc84bf..3247d1d22 100644 --- a/dashboard/src/components/shared/ObjectEditor.vue +++ b/dashboard/src/components/shared/ObjectEditor.vue @@ -2,7 +2,7 @@
- 暂无项目 + {{ t('core.common.objectEditor.noItems') }}
@@ -14,7 +14,7 @@
- {{ buttonText }} + {{ resolveButtonText }}
@@ -22,7 +22,7 @@ - {{ dialogTitle }} + {{ resolveDialogTitle }} @@ -36,7 +36,7 @@ density="compact" variant="outlined" hide-details - placeholder="键名" + :placeholder="t('core.common.objectEditor.placeholders.keyName')" @blur="updateKey(index, pair.key)" > @@ -47,7 +47,7 @@ density="compact" variant="outlined" hide-details - placeholder="字符串值" + :placeholder="t('core.common.objectEditor.placeholders.stringValue')" >
@@ -85,7 +85,7 @@ density="compact" variant="outlined" hide-details="auto" - placeholder="JSON" + :placeholder="t('core.common.objectEditor.placeholders.jsonValue')" @blur="updateJSON(index, pair.value)" :error-messages="pair.jsonError" > @@ -108,13 +108,13 @@
-
预设
+
{{ t('core.common.objectEditor.presets') }}
- {{ template.name || template.description || templateKey }} - {{ template.hint }} + {{ getTemplateTitle(template, templateKey) }} + {{ translateIfKey(template.hint) }}
@@ -125,7 +125,7 @@ density="compact" variant="outlined" hide-details - placeholder="字符串值" + :placeholder="t('core.common.objectEditor.placeholders.stringValue')" >
@@ -178,7 +178,7 @@
mdi-code-json -

暂无参数

+

{{ t('core.common.objectEditor.noParams') }}

@@ -187,7 +187,7 @@
mdi-plus - 添加 + {{ t('core.common.add') }}
- 取消 - 确认 + {{ t('core.common.cancel') }} + {{ t('core.common.confirm') }} @@ -220,9 +220,10 @@ \ No newline at end of file + diff --git a/dashboard/src/components/shared/TemplateListEditor.vue b/dashboard/src/components/shared/TemplateListEditor.vue index 796dae2dd..9cc49d9a9 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)" > - {{ option.label }} - {{ option.hint }} + {{ translateIfKey(option.label) }} + {{ translateIfKey(option.hint) }} @@ -58,7 +58,7 @@
{{ templateLabel(entry.__template_key) }} - {{ getTemplate(entry)?.hint || getTemplate(entry)?.description }} + {{ translateIfKey(getTemplate(entry)?.hint || getTemplate(entry)?.description) }}
@@ -82,10 +82,10 @@ >
- {{ itemMeta?.description || itemKey }} + {{ translateIfKey(itemMeta?.description) || itemKey }} - {{ itemMeta.hint }} + {{ translateIfKey(itemMeta.hint) }}
@@ -94,10 +94,10 @@ - {{ childMeta?.description || childKey }} + {{ translateIfKey(childMeta?.description) || childKey }} - {{ childMeta?.hint }} + {{ translateIfKey(childMeta?.hint) }} @@ -122,11 +122,11 @@ - {{ itemMeta?.description }} ({{ itemKey }}) + {{ translateIfKey(itemMeta?.description) }} ({{ itemKey }}) {{ itemKey }} - {{ itemMeta?.hint }} + {{ translateIfKey(itemMeta?.hint) }} @@ -153,7 +153,7 @@