fix: localize build metadata labels via vue-i18n

Move hardcoded English strings (PR #, Version:, Commit:, etc.)
in buildLabel and buildTooltip to i18n keys for consistency
with the rest of the connection panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-04-14 00:26:03 +09:00
parent 30ce606b0a
commit 3c011360fa
2 changed files with 18 additions and 8 deletions

View File

@@ -3782,6 +3782,13 @@
"source": "Source",
"errorUnreachable": "Backend is unreachable. Ensure ComfyUI is running with CORS enabled.",
"errorHttpFailed": "HTTP connection failed. Check the URL and CORS settings.",
"errorWsFailed": "WebSocket connection failed. HTTP works — check firewall or proxy settings."
"errorWsFailed": "WebSocket connection failed. HTTP works — check firewall or proxy settings.",
"buildPr": "PR #{prNumber}",
"buildVersion": "v{version}",
"tooltipVersion": "Version: {version}",
"tooltipCommit": "Commit: {commit}",
"tooltipBranch": "Branch: {branch}",
"tooltipRunId": "Run ID: {runId}",
"tooltipJobId": "Job ID: {jobId}"
}
}

View File

@@ -349,17 +349,20 @@ const runId = __CI_RUN_ID__
const jobId = __CI_JOB_ID__
const buildLabel = computed(() => {
if (prNumber) return `PR #${prNumber}`
if (prNumber) return t('connectionPanel.buildPr', { prNumber })
if (branch) return branch
return `v${version}`
return t('connectionPanel.buildVersion', { version })
})
const buildTooltip = computed(() => {
const parts = [`Version: ${version}`]
if (commit) parts.push(`Commit: ${commit.slice(0, 8)}`)
if (branch) parts.push(`Branch: ${branch}`)
if (runId) parts.push(`Run ID: ${runId}`)
if (jobId) parts.push(`Job ID: ${jobId}`)
const parts = [t('connectionPanel.tooltipVersion', { version })]
if (commit)
parts.push(
t('connectionPanel.tooltipCommit', { commit: commit.slice(0, 8) })
)
if (branch) parts.push(t('connectionPanel.tooltipBranch', { branch }))
if (runId) parts.push(t('connectionPanel.tooltipRunId', { runId }))
if (jobId) parts.push(t('connectionPanel.tooltipJobId', { jobId }))
return parts.join('\n')
})