book-translation by f/prompts.chat
npx skills add https://github.com/f/prompts.chat --skill book-translation本技能用于指导翻译 prompts.chat 网站上 The Interactive Book of Prompting 的书籍内容。
本书包含 25 个章节,分为 7 个部分。翻译需要处理:
src/content/book/{locale}/messages/{locale}.json开始之前,请确认:
de, fr, es, ja, ko, )广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
zhmessages/ 目录中是否存在该语言环境src/content/book/{locale}/ 文件夹是否存在土耳其语 (tr) 翻译已完成且经过充分测试。请将其复制作为您的起点,而不是从英语开始翻译:
mkdir -p src/content/book/{locale}
cp -r src/content/book/*.mdx src/content/book/{locale}/
cp src/components/book/elements/locales/en.ts src/components/book/elements/locales/{locale}.ts
⚠️ 重要提示:复制后,您必须在 src/components/book/elements/locales/index.ts 中注册新的语言环境:
import {locale} from "./{locale}";locales 对象:{locale},export { en, tr, az, {locale} };这样做更快,因为:
编辑 src/content/book/{locale}/ 中的每个复制文件,将内容从土耳其语翻译成您的目标语言。
逐个文件处理:
| Slug | English Title |
|---|---|
00a-preface | Preface |
00b-history | History |
00c-introduction | Introduction |
01-understanding-ai-models | Understanding AI Models |
02-anatomy-of-effective-prompt | Anatomy of an Effective Prompt |
03-core-prompting-principles | Core Prompting Principles |
04-role-based-prompting | Role-Based Prompting |
05-structured-output | Structured Output |
06-chain-of-thought | Chain of Thought |
07-few-shot-learning | Few-Shot Learning |
08-iterative-refinement | Iterative Refinement |
09-json-yaml-prompting | JSON & YAML Prompting |
10-system-prompts-personas | System Prompts & Personas |
11-prompt-chaining | Prompt Chaining |
12-handling-edge-cases | Handling Edge Cases |
13-multimodal-prompting | Multimodal Prompting |
14-context-engineering | Context Engineering |
15-common-pitfalls | Common Pitfalls |
16-ethics-responsible-use | Ethics & Responsible Use |
17-prompt-optimization | Prompt Optimization |
18-writing-content | Writing & Content |
19-programming-development | Programming & Development |
20-education-learning | Education & Learning |
21-business-productivity | Business & Productivity |
22-creative-arts | Creative Arts |
23-research-analysis | Research & Analysis |
24-future-of-prompting | The Future of Prompting |
25-agents-and-skills | Agents & Skills |
<div>, <img>, className 等不变##, **bold**, *italic*, [links](url)import 语句在 messages/{locale}.json 中,翻译 "book" 部分。关键区域:
"book": {
"title": "The Interactive Book of Prompting",
"subtitle": "An Interactive Guide to Crafting Clear and Effective Prompts",
"metaTitle": "...",
"metaDescription": "...",
...
}
book.chapters)"chapters": {
"00a-preface": "Preface",
"00b-history": "History",
"00c-introduction": "Introduction",
...
}
book.chapterDescriptions)"chapterDescriptions": {
"00a-preface": "A personal note from the author",
"00b-history": "The story of Awesome ChatGPT Prompts",
...
}
book.parts)"parts": {
"introduction": "Introduction",
"foundations": "Foundations",
"techniques": "Techniques",
"advanced": "Advanced Strategies",
"bestPractices": "Best Practices",
"useCases": "Use Cases",
"conclusion": "Conclusion"
}
book.interactive.demoExamples)本地化演示的示例文本(分词器示例、温度示例等):
"demoExamples": {
"tokenPrediction": {
"tokens": ["The", " capital", " of", " France", " is", " Paris", "."],
"fullText": "The capital of France is Paris."
},
"temperature": {
"prompt": "What is the capital of France?",
...
}
}
⚠️ 请勿跳过此步骤 - 如果没有此步骤,交互式演示将无法在新语言中工作。
翻译位于 src/components/book/elements/locales/{locale}.ts 的语言环境数据文件:
然后在 src/components/book/elements/locales/index.ts 中注册它:
import {locale} from "./{locale}";
const locales: Record<string, LocaleData> = {
en,
tr,
az,
{locale}, // 在此处添加您的新语言环境
};
export { en, tr, az, {locale} }; // 添加到导出
book.interactive.*, book.chapter.*, book.search.*)翻译所有交互式组件标签和导航字符串。
运行检查脚本:
node scripts/check-translations.js
启动开发服务器并进行测试:
npm run dev
导航到带有目标语言环境的 /book 以验证内容加载
英语 (en) 翻译已完成,并作为所有新翻译的基础模板:
src/content/book/*.mdx — 将这些文件复制到 src/content/book/{locale}/*.mdxmessages/en.json → book 部分 — 用作结构参考src/content/book/*.mdx 复制到 src/content/book/{locale}/*.mdxmessages/en.json 中的 "book" 部分复制到 messages/{locale}.json。在多个代理会话中翻译这些内容,而不是一次性完成(可能会超出令牌限制)每周安装次数
327
代码仓库
GitHub Stars
154.1K
首次出现
Jan 31, 2026
安全审计
安装于
opencode268
codex251
claude-code234
gemini-cli234
github-copilot220
kimi-cli202
This skill guides translation of book content for The Interactive Book of Prompting at prompts.chat.
The book has 25 chapters across 7 parts. Translation requires:
src/content/book/{locale}/messages/{locale}.jsonBefore starting, identify:
de, fr, es, ja, ko, zh)messages/ directorysrc/content/book/{locale}/ folder existsThe Turkish (tr) translation is complete and well-tested. Copy it as your starting point instead of translating from English:
mkdir -p src/content/book/{locale}
cp -r src/content/book/*.mdx src/content/book/{locale}/
cp src/components/book/elements/locales/en.ts src/components/book/elements/locales/{locale}.ts
⚠️ IMPORTANT: After copying, you MUST register the new locale insrc/components/book/elements/locales/index.ts:
import {locale} from "./{locale}";locales object: {locale},export { en, tr, az, {locale} };This is faster because:
Edit each copied file in src/content/book/{locale}/ to translate from Turkish to your target language.
Process files one by one:
| Slug | English Title |
|---|---|
00a-preface | Preface |
00b-history | History |
00c-introduction | Introduction |
01-understanding-ai-models | Understanding AI Models |
02-anatomy-of-effective-prompt | Anatomy of an Effective Prompt |
03-core-prompting-principles |
<div>, <img>, className, etc. unchanged##, **bold**, *italic*, [links](url)import statements at the topIn messages/{locale}.json, translate the "book" section. Key areas:
"book": {
"title": "The Interactive Book of Prompting",
"subtitle": "An Interactive Guide to Crafting Clear and Effective Prompts",
"metaTitle": "...",
"metaDescription": "...",
...
}
book.chapters)"chapters": {
"00a-preface": "Preface",
"00b-history": "History",
"00c-introduction": "Introduction",
...
}
book.chapterDescriptions)"chapterDescriptions": {
"00a-preface": "A personal note from the author",
"00b-history": "The story of Awesome ChatGPT Prompts",
...
}
book.parts)"parts": {
"introduction": "Introduction",
"foundations": "Foundations",
"techniques": "Techniques",
"advanced": "Advanced Strategies",
"bestPractices": "Best Practices",
"useCases": "Use Cases",
"conclusion": "Conclusion"
}
book.interactive.demoExamples)Localize example text for demos (tokenizer samples, temperature examples, etc.):
"demoExamples": {
"tokenPrediction": {
"tokens": ["The", " capital", " of", " France", " is", " Paris", "."],
"fullText": "The capital of France is Paris."
},
"temperature": {
"prompt": "What is the capital of France?",
...
}
}
⚠️ DO NOT SKIP THIS STEP - The interactive demos will not work in the new language without this.
Translate the locale data file at src/components/book/elements/locales/{locale}.ts:
Then register it insrc/components/book/elements/locales/index.ts:
import {locale} from "./{locale}";
const locales: Record<string, LocaleData> = {
en,
tr,
az,
{locale}, // Add your new locale here
};
export { en, tr, az, {locale} }; // Add to exports
book.interactive.*, book.chapter.*, book.search.*)Translate all interactive component labels and navigation strings.
Run the check script:
node scripts/check-translations.js
Start dev server and test:
npm run dev
Navigate to /book with the target locale to verify content loads
The English (en) translation is complete and serves as the base template for all new translations:
src/content/book/*.mdx — copy this files to src/content/book/{locale}/*.mdxmessages/en.json → book section — use as reference for structuresrc/content/book/*.mdx to src/content/book/{locale}/*.mdx"book" section from messages/en.json to messages/{locale}.json. Translate these in multiple agentic session instead of single time (token limit may exceed at once)Weekly Installs
327
Repository
GitHub Stars
154.1K
First Seen
Jan 31, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode268
codex251
claude-code234
gemini-cli234
github-copilot220
kimi-cli202
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
105,000 周安装
| Core Prompting Principles |
04-role-based-prompting | Role-Based Prompting |
05-structured-output | Structured Output |
06-chain-of-thought | Chain of Thought |
07-few-shot-learning | Few-Shot Learning |
08-iterative-refinement | Iterative Refinement |
09-json-yaml-prompting | JSON & YAML Prompting |
10-system-prompts-personas | System Prompts & Personas |
11-prompt-chaining | Prompt Chaining |
12-handling-edge-cases | Handling Edge Cases |
13-multimodal-prompting | Multimodal Prompting |
14-context-engineering | Context Engineering |
15-common-pitfalls | Common Pitfalls |
16-ethics-responsible-use | Ethics & Responsible Use |
17-prompt-optimization | Prompt Optimization |
18-writing-content | Writing & Content |
19-programming-development | Programming & Development |
20-education-learning | Education & Learning |
21-business-productivity | Business & Productivity |
22-creative-arts | Creative Arts |
23-research-analysis | Research & Analysis |
24-future-of-prompting | The Future of Prompting |
25-agents-and-skills | Agents & Skills |