Skip to content

Commit eefc9e5

Browse files
committed
fix(site): i18n prompts in use-case cards so they switch with language toggle
1 parent eeef941 commit eefc9e5

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

index.html

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,63 +276,63 @@ <h2 data-i="uc.title">开箱即用的 8 个场景</h2>
276276
<div class="uc-title" data-i="uc1.t">深度研究</div>
277277
<span class="uc-pattern">Fan-out/Fan-in</span>
278278
<div class="uc-desc" data-i="uc1.d">网页 + 学术 + 社区多角度并行调查,交叉验证后出综合报告。</div>
279-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for deep research. I need an agent team that can investigate any topic from multiple angles — web search, academic sources, community sentiment — then cross-validate findings and produce a comprehensive report.<span class="copy-label">点击复制</span></div>
279+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc1.p">为深度研究构建一个 harness。我需要一个 agent 团队,能从网页搜索、学术来源、社区舆情多个角度调查任何主题,然后交叉验证结果并产出一份综合报告。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
280280
</div>
281281

282282
<div class="usecase">
283283
<div class="uc-icon">🌐</div>
284284
<div class="uc-title" data-i="uc2.t">全栈网站开发</div>
285285
<span class="uc-pattern">Pipeline</span>
286286
<div class="uc-desc" data-i="uc2.d">设计 → 前端(Next.js)→ 后端 → QA,从线框到部署。</div>
287-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for full-stack website development. The team should handle design, frontend (React/Next.js), backend (API), and QA testing in a coordinated pipeline from wireframe to deployment.<span class="copy-label">点击复制</span></div>
287+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc2.p">为全栈网站开发构建一个 harness。团队需要处理设计、前端(React/Next.js)、后端(API)以及 QA 测试,从线框图到部署形成协同流水线。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
288288
</div>
289289

290290
<div class="usecase">
291291
<div class="uc-icon">🎨</div>
292292
<div class="uc-title" data-i="uc3.t">网漫制作</div>
293293
<span class="uc-pattern">Producer-Reviewer</span>
294294
<div class="uc-desc" data-i="uc3.d">剧本、人物、分镜、对白互审保证风格一致。</div>
295-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for webtoon episode production. I need agents for story writing, character design prompts, panel layout planning, and dialogue editing. They should review each other's work for style consistency.<span class="copy-label">点击复制</span></div>
295+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc3.p">为网漫单集制作构建一个 harness。我需要剧本写作、人物设计 prompt、分镜规划、对白润色等 agent,彼此审阅对方的产出以保证风格一致。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
296296
</div>
297297

298298
<div class="usecase">
299299
<div class="uc-icon">🎥</div>
300300
<div class="uc-title" data-i="uc4.t">YouTube 内容策划</div>
301301
<span class="uc-pattern">Supervisor</span>
302302
<div class="uc-desc" data-i="uc4.d">选题、脚本、SEO、封面由中心 agent 统筹。</div>
303-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for YouTube content creation. The team should research trending topics, write scripts, optimize titles/tags for SEO, and plan thumbnail concepts — all coordinated by a supervisor agent.<span class="copy-label">点击复制</span></div>
303+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc4.p">YouTube 内容创作构建一个 harness。团队需要研究热门选题、撰写脚本、针对 SEO 优化标题/标签、规划封面概念——全部由监督者 agent 统筹。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
304304
</div>
305305

306306
<div class="usecase">
307307
<div class="uc-icon">🔍</div>
308308
<div class="uc-title" data-i="uc5.t">代码评审</div>
309309
<span class="uc-pattern">Fan-out/Fan-in</span>
310310
<div class="uc-desc" data-i="uc5.d">架构、安全、性能、风格并行审计后合并报告。</div>
311-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for comprehensive code review. I want parallel agents checking architecture, security vulnerabilities, performance bottlenecks, and code style — then merging all findings into a single report.<span class="copy-label">点击复制</span></div>
311+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc5.p">为综合代码评审构建一个 harness。我希望多个并行 agent 分别检查架构、安全漏洞、性能瓶颈和代码风格,然后合并所有发现形成一份报告。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
312312
</div>
313313

314314
<div class="usecase">
315315
<div class="uc-icon">📚</div>
316316
<div class="uc-title" data-i="uc6.t">API 文档</div>
317317
<span class="uc-pattern">Pipeline</span>
318318
<div class="uc-desc" data-i="uc6.d">端点分析 → 描述 → 示例 → 完整性复核。</div>
319-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness that generates API documentation from this codebase. Agents should analyze endpoints, write descriptions, generate usage examples, and review for completeness.<span class="copy-label">点击复制</span></div>
319+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc6.p">构建一个从本代码库生成 API 文档的 harness。Agent 需要分析端点、撰写描述、生成使用示例并审查完整性。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
320320
</div>
321321

322322
<div class="usecase">
323323
<div class="uc-icon">📊</div>
324324
<div class="uc-title" data-i="uc7.t">数据管道</div>
325325
<span class="uc-pattern">Hierarchical</span>
326326
<div class="uc-desc" data-i="uc7.d">Schema、ETL、校验、监控分层委派。</div>
327-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for designing data pipelines. I need agents for schema design, ETL logic, data validation rules, and monitoring setup that delegate sub-tasks hierarchically.<span class="copy-label">点击复制</span></div>
327+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc7.p">为数据管道设计构建一个 harness。我需要 schema 设计、ETL 逻辑、数据校验规则、监控配置等 agent,以分层委派方式拆分子任务。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
328328
</div>
329329

330330
<div class="usecase">
331331
<div class="uc-icon">🚀</div>
332332
<div class="uc-title" data-i="uc8.t">营销活动</div>
333333
<span class="uc-pattern">Producer-Reviewer</span>
334334
<div class="uc-desc" data-i="uc8.d">市场调研、文案、视觉、A/B 计划迭代审查。</div>
335-
<div class="uc-prompt" onclick="copyPrompt(this)">Build a harness for marketing campaign creation. The team should research the target market, write ad copy, design visual concepts, and set up A/B test plans with iterative quality review.<span class="copy-label">点击复制</span></div>
335+
<div class="uc-prompt" onclick="copyPrompt(this)"><span class="uc-prompt-text" data-i="uc8.p">为营销活动创建构建一个 harness。团队需要调研目标市场、撰写广告文案、设计视觉概念,并制定 A/B 测试计划,每轮迭代都走质量评审。</span><span class="copy-label" data-i="copy.label">点击复制</span></div>
336336
</div>
337337

338338
</div>
@@ -424,7 +424,8 @@ <h3 style="margin-bottom:.7rem" data-i="ins.use.t">触发使用</h3>
424424
<script>
425425
// ---- Copy prompt ----
426426
function copyPrompt(el){
427-
const text = el.childNodes[0].nodeValue.trim();
427+
const textEl = el.querySelector('.uc-prompt-text');
428+
const text = (textEl ? textEl.textContent : el.childNodes[0].nodeValue).trim();
428429
navigator.clipboard.writeText(text).then(() => {
429430
el.classList.add('copied');
430431
const lbl = el.querySelector('.copy-label');
@@ -523,6 +524,15 @@ <h3 style="margin-bottom:.7rem" data-i="ins.use.t">触发使用</h3>
523524
'ft.uc': {en: 'Use cases'},
524525
'ft.ar': {en: 'Architecture'},
525526
'ft.cr': {en: 'Harness-ZH · Apache-2.0 · Based on <a href="https://github.com/revfactory/harness">revfactory/harness</a>'},
527+
'uc1.p': {en: "Build a harness for deep research. I need an agent team that can investigate any topic from multiple angles — web search, academic sources, community sentiment — then cross-validate findings and produce a comprehensive report."},
528+
'uc2.p': {en: "Build a harness for full-stack website development. The team should handle design, frontend (React/Next.js), backend (API), and QA testing in a coordinated pipeline from wireframe to deployment."},
529+
'uc3.p': {en: "Build a harness for webtoon episode production. I need agents for story writing, character design prompts, panel layout planning, and dialogue editing. They should review each other's work for style consistency."},
530+
'uc4.p': {en: "Build a harness for YouTube content creation. The team should research trending topics, write scripts, optimize titles/tags for SEO, and plan thumbnail concepts — all coordinated by a supervisor agent."},
531+
'uc5.p': {en: "Build a harness for comprehensive code review. I want parallel agents checking architecture, security vulnerabilities, performance bottlenecks, and code style — then merging all findings into a single report."},
532+
'uc6.p': {en: "Build a harness that generates API documentation from this codebase. Agents should analyze endpoints, write descriptions, generate usage examples, and review for completeness."},
533+
'uc7.p': {en: "Build a harness for designing data pipelines. I need agents for schema design, ETL logic, data validation rules, and monitoring setup that delegate sub-tasks hierarchically."},
534+
'uc8.p': {en: "Build a harness for marketing campaign creation. The team should research the target market, write ad copy, design visual concepts, and set up A/B test plans with iterative quality review."},
535+
'copy.label': {en: 'Click to copy'},
526536
};
527537
// Capture original Chinese
528538
const ZH = {};

0 commit comments

Comments
 (0)