From 2f73bec94a6643efb8c8412e9fad268bfad73dbd Mon Sep 17 00:00:00 2001 From: matevip Date: Sun, 10 May 2026 21:53:47 +0800 Subject: [PATCH] fix(ui-i18n): escape JSON examples in trigger placeholders so vue-i18n stops parsing them as interpolation --- mateclaw-ui/src/i18n/locales/en-US.ts | 6 +++--- mateclaw-ui/src/i18n/locales/zh-CN.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts index e8a94e33..8342d23d 100644 --- a/mateclaw-ui/src/i18n/locales/en-US.ts +++ b/mateclaw-ui/src/i18n/locales/en-US.ts @@ -2067,7 +2067,7 @@ export default { publish: 'Publish', delete: 'Delete', }, - bodyPlaceholder: '{"steps":[{"name":"step-a","agentId":1,"mode":{"type":"sequential"},"promptTemplate":"..."}]}', + bodyPlaceholder: '{\'{"steps":[{"name":"step-a","agentId":1,"mode":{"type":"sequential"},"promptTemplate":"..."}]}\'}', compileErrorsTitle: '{count} compile error(s)', templates: { label: 'Insert template', @@ -2314,7 +2314,7 @@ export default { namePlaceholder: 'hourly-cleanup', patternType: 'Pattern type', patternJson: 'Pattern JSON', - patternJsonPlaceholder: '{"cron":"0 0 * * * *","timezone":"UTC"}', + patternJsonPlaceholder: '{\'{"cron":"0 0 * * * *","timezone":"UTC"}\'}', targetType: 'Target type', targetId: 'Target id', ratePerMin: 'Rate / min', @@ -2322,7 +2322,7 @@ export default { maxFires: 'Max fires (0 = unlimited)', botSelfFilter: 'Bot-self filter (recommended)', payloadTemplate: 'Payload template (Pebble)', - payloadTemplatePlaceholder: '{"who":"{{ event.who }}"}', + payloadTemplatePlaceholder: '{\'{"who":"{{ event.who }}"}\'}', enabled: 'Enabled', }, deleteConfirm: 'Delete trigger "{name}"?', diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts index e765063e..e83bbb07 100644 --- a/mateclaw-ui/src/i18n/locales/zh-CN.ts +++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts @@ -2079,7 +2079,7 @@ export default { publish: '发布', delete: '删除', }, - bodyPlaceholder: '{"steps":[{"name":"step-a","agentId":1,"mode":{"type":"sequential"},"promptTemplate":"..."}]}', + bodyPlaceholder: '{\'{"steps":[{"name":"step-a","agentId":1,"mode":{"type":"sequential"},"promptTemplate":"..."}]}\'}', compileErrorsTitle: '{count} 条编译错误', templates: { label: '插入模板', @@ -2326,7 +2326,7 @@ export default { namePlaceholder: 'hourly-cleanup', patternType: '模式类型', patternJson: '模式 JSON', - patternJsonPlaceholder: '{"cron":"0 0 * * * *","timezone":"UTC"}', + patternJsonPlaceholder: '{\'{"cron":"0 0 * * * *","timezone":"UTC"}\'}', targetType: '目标类型', targetId: '目标 ID', ratePerMin: '每分钟速率', @@ -2334,7 +2334,7 @@ export default { maxFires: '最大触发数(0 = 不限)', botSelfFilter: 'Bot 自循环过滤(推荐)', payloadTemplate: '载荷模板(Pebble)', - payloadTemplatePlaceholder: '{"who":"{{ event.who }}"}', + payloadTemplatePlaceholder: '{\'{"who":"{{ event.who }}"}\'}', enabled: '启用', }, deleteConfirm: '删除触发器「{name}」?',