Back to Skills

book-translation

verified

Translate "The Interactive Book of Prompting" chapters and UI strings to a new language

View on GitHub

Repository

f/prompts.chat
144.5kstars

.windsurf/skills/book-translation/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/f/prompts.chat/blob/cc1c0d765dee412026ed54af608c52fc329ca497/.windsurf/skills/book-translation/SKILL.md -a claude-code --skill book-translation

Installation paths:

Claude
.claude/skills/book-translation/
Powered by add-skill CLI

Instructions

# 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:
1. **MDX content files** - Full chapter content in `src/content/book/{locale}/`
2. **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 `messages/` directory
- Check if `src/content/book/{locale}/` folder exists

## Step 1: Copy Turkish Folder as Base

The Turkish (`tr`) translation is complete and well-tested. **Copy it as your starting point** instead of translating from English:

```bash
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`:**
1. Add import: `import {locale} from "./{locale}";`
2. Add to `locales` object: `{locale},`
3. 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 `src/content/book/{locale}/` to translate from Turkish to your target language.

Process files one by one:

### Chapter List (in order)

| 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-prompti

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7123 chars