book-translation
Original:🇺🇸 English
Translated
Translate "The Interactive Book of Prompting" chapters and UI strings to a new language
15installs
Sourcef/prompts.chat
Added on
NPX Install
npx skill4agent add f/prompts.chat book-translationTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Book Translation Skill
This skill guides translation of book content for The Interactive Book of Prompting at prompts.chat.
Overview
The book has 25 chapters across 7 parts. Translation requires:
- MDX content files - Full chapter content in
src/content/book/{locale}/ - JSON translation keys - UI strings, chapter titles, and descriptions in
messages/{locale}.json
Prerequisites
Before starting, identify:
- Target locale code (e.g., ,
de,fr,es,ja,ko)zh - Check if locale exists in directory
messages/ - Check if folder exists
src/content/book/{locale}/
Step 1: Copy Turkish Folder as Base
The Turkish () translation is complete and well-tested. Copy it as your starting point instead of translating from English:
trbash
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 in :
src/components/book/elements/locales/index.ts- Add import:
import {locale} from "./{locale}"; - Add to object:
locales{locale}, - Add to named exports:
export { en, tr, az, {locale} };
This is faster because:
- Turkish and many languages share similar sentence structures
- All JSX/React components are already preserved correctly
- File structure is already set up
- You only need to translate the prose, not recreate the structure
Step 2: Translate MDX Content Files
Edit each copied file in to translate from Turkish to your target language.
src/content/book/{locale}/Process files one by one:
Chapter List (in order)
| Slug | English Title |
|---|---|
| Preface |
| History |
| Introduction |
| Understanding AI Models |
| Anatomy of an Effective Prompt |
| Core Prompting Principles |
| Role-Based Prompting |
| Structured Output |
| Chain of Thought |
| Few-Shot Learning |
| Iterative Refinement |
| JSON & YAML Prompting |
| System Prompts & Personas |
| Prompt Chaining |
| Handling Edge Cases |
| Multimodal Prompting |
| Context Engineering |
| Common Pitfalls |
| Ethics & Responsible Use |
| Prompt Optimization |
| Writing & Content |
| Programming & Development |
| Education & Learning |
| Business & Productivity |
| Creative Arts |
| Research & Analysis |
| The Future of Prompting |
| Agents & Skills |
MDX Translation Guidelines
- Preserve all JSX/React components - Keep ,
<div>,<img>, etc. unchangedclassName - Preserve code blocks - Code examples should remain in English (variable names, keywords)
- Translate prose content - Headings, paragraphs, lists
- Keep Markdown syntax - ,
##,**bold**,*italic*[links](url) - Preserve component imports - Any statements at the top
import
Step 3: Translate JSON Keys
In , translate the section. Key areas:
messages/{locale}.json"book"Book Metadata
json
"book": {
"title": "The Interactive Book of Prompting",
"subtitle": "An Interactive Guide to Crafting Clear and Effective Prompts",
"metaTitle": "...",
"metaDescription": "...",
...
}Chapter Titles (book.chapters
)
book.chaptersjson
"chapters": {
"00a-preface": "Preface",
"00b-history": "History",
"00c-introduction": "Introduction",
...
}Chapter Descriptions (book.chapterDescriptions
)
book.chapterDescriptionsjson
"chapterDescriptions": {
"00a-preface": "A personal note from the author",
"00b-history": "The story of Awesome ChatGPT Prompts",
...
}Part Names (book.parts
)
book.partsjson
"parts": {
"introduction": "Introduction",
"foundations": "Foundations",
"techniques": "Techniques",
"advanced": "Advanced Strategies",
"bestPractices": "Best Practices",
"useCases": "Use Cases",
"conclusion": "Conclusion"
}Interactive Demo Examples (book.interactive.demoExamples
)
book.interactive.demoExamplesLocalize example text for demos (tokenizer samples, temperature examples, etc.):
json
"demoExamples": {
"tokenPrediction": {
"tokens": ["The", " capital", " of", " France", " is", " Paris", "."],
"fullText": "The capital of France is Paris."
},
"temperature": {
"prompt": "What is the capital of France?",
...
}
}Book Elements Locales (REQUIRED)
⚠️ 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- Temperature examples, token predictions, embedding words
- Capabilities list, sample conversations, strategies
- Tokenizer samples, builder fields, chain types
- Frameworks (CRISPE, BREAK, RTF), exercises
- Image/video prompt options, validation demos
Then register it in :
src/components/book/elements/locales/index.tstypescript
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 exportsUI Strings (book.interactive.*
, book.chapter.*
, book.search.*
)
book.interactive.*book.chapter.*book.search.*Translate all interactive component labels and navigation strings.
Step 4: Verify Translation
-
Run the check script:bash
node scripts/check-translations.js -
Start dev server and test:bash
npm run dev -
Navigate towith the target locale to verify content loads
/book
Reference: English Translation
The English () translation is complete and serves as the base template for all new translations:
en- MDX files: — copy this files to
src/content/book/*.mdxsrc/content/book/{locale}/*.mdx - JSON keys: →
messages/en.jsonsection — use as reference for structurebook
Recommended Workflow
- Copy to
src/content/book/*.mdxsrc/content/book/{locale}/*.mdx - Copy the section from
"book"tomessages/en.json. Translate these in multiple agentic session instead of single time (token limit may exceed at once)messages/{locale}.json - Edit each file, translating English → target language
- Keep all JSX components, code blocks, and Markdown syntax intact
Quality Guidelines
- Consistency: Use consistent terminology throughout (e.g., always translate "prompt" the same way)
- Technical terms: Some terms like "AI", "ChatGPT", "API" may stay in English
- Cultural adaptation: Adapt examples to be relevant for the target audience where appropriate
- Natural language: Prioritize natural-sounding translations over literal ones