From 79ea2316e3263d9df6e3eeda3fcd03455924c23c Mon Sep 17 00:00:00 2001 From: dzq Date: Thu, 20 Nov 2025 10:02:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0CLAUDE.md=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=8F=90=E4=BE=9B=E7=BF=BB=E8=AF=91=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=8C=87=E5=8D=97=E5=92=8C=E7=BB=93=E6=9E=84=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 269 +++++++++++++++++++++++------------------------------- 1 file changed, 115 insertions(+), 154 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 17c6d8e..272959e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,149 +1,143 @@ -# Claude Code 翻译项目指南 +# CLAUDE.md -## 项目概述 +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. -本项目是使用 Claude Code 协助进行的翻译项目,致力于提供高质量、准确、一致的翻译服务。 +## Project Overview -## 核心原则 +This is a **translation repository** for Claude Code documentation, focusing on translating English technical documentation into Chinese. The repository maintains source documents in `/source/` and their translated versions in `/translated/`. -### 1. 翻译质量标准 -- **准确性**:确保翻译内容忠实于原文,不添加、遗漏或曲解信息 -- **流畅性**:译文应符合目标语言的表达习惯,读起来自然流畅 -- **一致性**:全文使用统一的术语和表达方式 -- **语境适配**:根据目标受众调整语言风格和表达方式 +**Primary languages:** +- Source: English +- Target: Chinese (Simplified) -### 2. 术语管理 -- 建立并维护术语表,确保关键概念翻译的一致性 -- 对于新术语或不确定的翻译,需标记并寻求确认 -- 保留原文专有名词(如人名、地名)并在必要时提供音译 -- 技术术语需准确翻译,并考虑行业标准用法 +## Repository Structure -## 文件组织 - -### 目录结构 ``` translation/ -├── CLAUDE.md # 本文件 -├── README.md # 项目说明 -├── source/ # 原文文件 -│ ├── documents/ # 文档原文 -│ └── assets/ # 图片、表格等资源 -├── translated/ # 翻译文件 -│ ├── documents/ # 翻译后的文档 -│ └── assets/ # 翻译后的资源 -├── references/ # 参考资料 -│ ├── glossary/ # 术语表目录 -│ │ └── glossary.md # 术语表 -│ ├── style-guide.md # 风格指南 -│ └── resources/ # 翻译参考资料 -└── reviews/ # 审校记录 - ├── review-001.md # 审校记录 - └── feedback.md # 反馈与改进 +├── source/ # Original English documents +│ ├── documents/ # Markdown documentation +│ │ ├── awesome-claude-code.md +│ │ ├── claude-code-infrastructure-showcase/ +│ │ ├── newsminimalist/ +│ │ └── wirelesswire/ +│ └── assets/ # Images, SVGs, other resources +├── translated/ # Chinese translations +│ ├── documents/ # Translated markdown files +│ │ ├── awesome-claude-code.md (translated) +│ │ ├── claude-code-infrastructure-showcase/ (translated) +│ │ └── ... +│ └── assets/ # Translated resources +├── references/ # Translation resources +│ ├── glossary/ # Term glossary +│ │ └── glossary.md # English-Chinese term pairs +│ ├── style-guide.md # Translation style guidelines +│ └── resources/ # Reference materials +├── reviews/ # Review records +│ ├── review-001.md # Translation review notes +│ └── feedback.md # Feedback and improvements +├── .claude/ # Claude Code configuration +│ └── settings.local.json +├── CLAUDE.md # This file +└── README.md # Project description ``` -### 文件命名规范 -- 保持与原文相同的文件结构 -- 翻译文件添加语言标识(如 `doc_zh.md`) -- 版本控制使用语义化版本号(v1.0, v1.1) +## Key Documents -## 翻译流程 +### `/references/glossary/glossary.md` +Maintains consistent terminology throughout translations. Always check here first when translating technical terms. -### 阶段1:准备工作 -1. 分析源文本,理解文档结构和风格 -2. 查阅相关术语表和参考资料 -3. 识别特殊要求(技术文档、法律文本、文学作品等) +### `/references/style-guide.md` +Defines translation style standards, tone, and language preferences for this project. -### 阶段2:初始翻译 -1. 逐段进行翻译,确保上下文连贯 -2. 标记疑问点或不明确之处 -3. 维护术语一致性 +### `/translated/[path]/[file].md` and `/source/[path]/[file].md` +**Critical**: Always maintain the exact same directory structure and filename between source and translated documents. Only the language changes, not the structure. -### 阶段3:质量检查 -1. 全文校对,检查语法和拼写 -2. 对比原文确保无遗漏或误译 -3. 优化语言表达,提升流畅性 +## Translation Architecture -### 阶段4:审校 -1. 同行评议(如适用) -2. 专家审校(如需要) -3. 收集反馈并改进 +This repository uses a **simple directory mirroring** pattern: +- Source files in `/source/` → Translated files in `/translated/` +- One-to-one mapping: `/source/documents/a/b/c.md` → `/translated/documents/a/b/c.md` -## Claude Code 使用指南 +**No complex build tools or frameworks** - just Markdown files organized by language. -### 翻译指令模板 +## Translation Principles -#### 基本翻译 -``` -请将以下文本从 [源语言] 翻译为 [目标语言]: +When working with translations: -[原文内容] +1. **Accuracy**: Stay faithful to the original meaning +2. **Fluency**: Use natural Chinese expressions +3. **Consistency**: Use uniform terminology throughout +4. **Context adaptation**: Adjust tone for Chinese technical readers +5. **Format preservation**: All Markdown formatting, code blocks, links, and images must be preserved exactly -要求: -- 保持原文格式 -- 确保术语一致性 -- 符合目标语言表达习惯 -``` +## Common Workflows -#### 带上下文的翻译 -``` -请在以下上下文中翻译该段落: +### Translating a new document: +1. Read the source document in `/source/documents/` +2. Create translated version in `/translated/documents/` with same structure +3. Reference `/references/glossary/glossary.md` for term consistency +4. Update `/reviews/` with translation notes -原文:[段落内容] -背景信息:[项目背景/术语解释] -目标受众:[描述目标读者] -风格要求:[正式/非正式/技术性等] -``` +### Updating an existing translation: +1. Compare source and translated files to identify changes +2. Apply updates following the same translation principles +3. Mark updated sections in review notes -#### 术语查询 -``` -请查询术语 "[术语]" 在以下领域的标准翻译: -领域:[行业/学科] -上下文:[使用场景] -已有翻译:[如已翻译的版本] -``` +### Finding term translations: +- **Always check** `/references/glossary/glossary.md` before translating any technical term +- Maintain consistency across all translated files +- Add new terms to the glossary when encountered -### 常用指令 +## Development Tasks -1. **格式保持** - ``` - 保持原文的 Markdown 格式、标题层级、列表结构 - ``` +### No Build System Required +This is a documentation project. Documents are plain Markdown files. There is no: +- Build process +- Test suite +- Linting configuration +- Compilation step -2. **术语查询** - ``` - 请在 references/glossary/glossary.md 中查找术语 "[术语]" 的定义 - ``` +Simply edit Markdown files directly. -3. **一致性检查** - ``` - 请检查以下文本中的术语 "[术语]" 使用是否一致 - ``` +### Adding new documents: +- Place English source in `/source/documents/[category]/` +- Create Chinese translation in `/translated/documents/[category]/` +- Maintain identical directory structure +- Update git history with descriptive commit messages -4. **风格调整** - ``` - 将以下文本调整为 [风格描述] 的语言风格 - ``` +### Updating translations: +1. Read both source and translated files +2. Identify changed sections in source +3. Update corresponding sections in translation +4. Verify formatting and links are preserved -## 质量控制 +## Important Workflow Notes -### 自我检查清单 -- [ ] 译文忠实于原文,无添加或删减 -- [ ] 术语使用一致,符合术语表标准 -- [ ] 语法正确,符合目标语言规范 -- [ ] 格式与原文保持一致 -- [ ] 专有名词处理正确 -- [ ] 标点符号使用恰当 -- [ ] 数字、日期、单位格式正确 +1. **Directory mirroring is sacred**: Never change the directory structure between source and translation +2. **Terminology consistency**: Before translating any technical term, check the glossary +3. **Format preservation**: Markdown tables, code blocks, links, and images must be preserved exactly +4. **Review process**: Significant translations should be documented in `/reviews/` +5. **Version control**: Use meaningful commit messages describing what was translated or updated -### 常见问题预防 -1. **文化差异**:注意文化背景的转换,避免直译导致的误解 -2. **语言风格**:根据文本类型调整正式程度 -3. **技术准确性**:技术术语需确保专业性 -4. **版面布局**:保持文档的可读性和美观性 +## Working with Claude Code -## 版本管理 +When assisting with this repository, Claude Code should: +- Read source documents before creating translations +- Always check the glossary before translating technical terms +- Preserve all Markdown formatting +- Maintain consistent terminology across all files +- Document translation decisions when they're non-obvious -### 提交规范 +## Quick Reference + +- **Translate new doc**: Copy structure from `/source/` → `/translated/`, maintain directory paths +- **Find term translation**: Check `/references/glossary/glossary.md` +- **Style questions**: Refer to `/references/style-guide.md` +- **Document decisions**: Add notes to `/reviews/` when making significant translation choices + +## Version Control + +Commit message format: ``` [类型]: 简要描述 @@ -157,47 +151,14 @@ translation/ 日期:[YYYY-MM-DD] ``` -### 变更类型 -- `feat`: 新增翻译内容 -- `fix`: 修正翻译错误 -- `update`: 更新现有翻译 -- `review`: 审校修改 -- `style`: 格式或样式调整 - -## 参考资源 - -### 工具推荐 -- 术语管理:维护 `references/glossary/glossary.md` -- 格式检查:保持 Markdown 语法正确 -- 翻译记忆:记录常用短语和句式 - -### 学习资源 -- 目标语言官方语法指南 -- 专业领域翻译标准 -- 行业术语词典 - -## 协作指南 - -### 与 Claude Code 协作 -1. **明确指示**:清晰描述翻译要求和限制 -2. **提供上下文**:给出足够的背景信息 -3. **分段处理**:大文档建议分段翻译 -4. **及时反馈**:对不满意的部分提出修改建议 - -### 反馈机制 -- 记录遇到的问题和解决方案 -- 更新术语表和风格指南 -- 总结翻译经验和最佳实践 - -## 注意事项 - -1. **版权尊重**:仅翻译已授权的内容 -2. **保密性**:对敏感信息严格保密 -3. **持续改进**:根据反馈不断优化翻译质量 -4. **知识积累**:建立个人翻译知识库 +Change types: +- `feat`: New translation content +- `fix`: Correct translation errors +- `update`: Update existing translations +- `review`: Review modifications +- `style`: Format or style adjustments --- -**联系方式**:[项目负责人] -**更新日期**:2025-11-11 -**版本**:v1.0 \ No newline at end of file +**Last Updated**: 2025-11-20 +**Purpose**: Guide Claude Code instances working with this translation repository