docs: 更新CLAUDE.md文件,提供翻译项目指南和结构说明
This commit is contained in:
parent
ab2b30f907
commit
79ea2316e3
269
CLAUDE.md
269
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/
|
translation/
|
||||||
├── CLAUDE.md # 本文件
|
├── source/ # Original English documents
|
||||||
├── README.md # 项目说明
|
│ ├── documents/ # Markdown documentation
|
||||||
├── source/ # 原文文件
|
│ │ ├── awesome-claude-code.md
|
||||||
│ ├── documents/ # 文档原文
|
│ │ ├── claude-code-infrastructure-showcase/
|
||||||
│ └── assets/ # 图片、表格等资源
|
│ │ ├── newsminimalist/
|
||||||
├── translated/ # 翻译文件
|
│ │ └── wirelesswire/
|
||||||
│ ├── documents/ # 翻译后的文档
|
│ └── assets/ # Images, SVGs, other resources
|
||||||
│ └── assets/ # 翻译后的资源
|
├── translated/ # Chinese translations
|
||||||
├── references/ # 参考资料
|
│ ├── documents/ # Translated markdown files
|
||||||
│ ├── glossary/ # 术语表目录
|
│ │ ├── awesome-claude-code.md (translated)
|
||||||
│ │ └── glossary.md # 术语表
|
│ │ ├── claude-code-infrastructure-showcase/ (translated)
|
||||||
│ ├── style-guide.md # 风格指南
|
│ │ └── ...
|
||||||
│ └── resources/ # 翻译参考资料
|
│ └── assets/ # Translated resources
|
||||||
└── reviews/ # 审校记录
|
├── references/ # Translation resources
|
||||||
├── review-001.md # 审校记录
|
│ ├── glossary/ # Term glossary
|
||||||
└── feedback.md # 反馈与改进
|
│ │ └── 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
|
||||||
```
|
```
|
||||||
|
|
||||||
### 文件命名规范
|
## Key Documents
|
||||||
- 保持与原文相同的文件结构
|
|
||||||
- 翻译文件添加语言标识(如 `doc_zh.md`)
|
|
||||||
- 版本控制使用语义化版本号(v1.0, v1.1)
|
|
||||||
|
|
||||||
## 翻译流程
|
### `/references/glossary/glossary.md`
|
||||||
|
Maintains consistent terminology throughout translations. Always check here first when translating technical terms.
|
||||||
|
|
||||||
### 阶段1:准备工作
|
### `/references/style-guide.md`
|
||||||
1. 分析源文本,理解文档结构和风格
|
Defines translation style standards, tone, and language preferences for this project.
|
||||||
2. 查阅相关术语表和参考资料
|
|
||||||
3. 识别特殊要求(技术文档、法律文本、文学作品等)
|
|
||||||
|
|
||||||
### 阶段2:初始翻译
|
### `/translated/[path]/[file].md` and `/source/[path]/[file].md`
|
||||||
1. 逐段进行翻译,确保上下文连贯
|
**Critical**: Always maintain the exact same directory structure and filename between source and translated documents. Only the language changes, not the structure.
|
||||||
2. 标记疑问点或不明确之处
|
|
||||||
3. 维护术语一致性
|
|
||||||
|
|
||||||
### 阶段3:质量检查
|
## Translation Architecture
|
||||||
1. 全文校对,检查语法和拼写
|
|
||||||
2. 对比原文确保无遗漏或误译
|
|
||||||
3. 优化语言表达,提升流畅性
|
|
||||||
|
|
||||||
### 阶段4:审校
|
This repository uses a **simple directory mirroring** pattern:
|
||||||
1. 同行评议(如适用)
|
- Source files in `/source/` → Translated files in `/translated/`
|
||||||
2. 专家审校(如需要)
|
- One-to-one mapping: `/source/documents/a/b/c.md` → `/translated/documents/a/b/c.md`
|
||||||
3. 收集反馈并改进
|
|
||||||
|
|
||||||
## 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. **格式保持**
|
### No Build System Required
|
||||||
```
|
This is a documentation project. Documents are plain Markdown files. There is no:
|
||||||
保持原文的 Markdown 格式、标题层级、列表结构
|
- Build process
|
||||||
```
|
- Test suite
|
||||||
|
- Linting configuration
|
||||||
|
- Compilation step
|
||||||
|
|
||||||
2. **术语查询**
|
Simply edit Markdown files directly.
|
||||||
```
|
|
||||||
请在 references/glossary/glossary.md 中查找术语 "[术语]" 的定义
|
|
||||||
```
|
|
||||||
|
|
||||||
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
|
||||||
- [ ] 专有名词处理正确
|
|
||||||
- [ ] 标点符号使用恰当
|
|
||||||
- [ ] 数字、日期、单位格式正确
|
|
||||||
|
|
||||||
### 常见问题预防
|
## Working with Claude Code
|
||||||
1. **文化差异**:注意文化背景的转换,避免直译导致的误解
|
|
||||||
2. **语言风格**:根据文本类型调整正式程度
|
|
||||||
3. **技术准确性**:技术术语需确保专业性
|
|
||||||
4. **版面布局**:保持文档的可读性和美观性
|
|
||||||
|
|
||||||
## 版本管理
|
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]
|
日期:[YYYY-MM-DD]
|
||||||
```
|
```
|
||||||
|
|
||||||
### 变更类型
|
Change types:
|
||||||
- `feat`: 新增翻译内容
|
- `feat`: New translation content
|
||||||
- `fix`: 修正翻译错误
|
- `fix`: Correct translation errors
|
||||||
- `update`: 更新现有翻译
|
- `update`: Update existing translations
|
||||||
- `review`: 审校修改
|
- `review`: Review modifications
|
||||||
- `style`: 格式或样式调整
|
- `style`: Format or style adjustments
|
||||||
|
|
||||||
## 参考资源
|
|
||||||
|
|
||||||
### 工具推荐
|
|
||||||
- 术语管理:维护 `references/glossary/glossary.md`
|
|
||||||
- 格式检查:保持 Markdown 语法正确
|
|
||||||
- 翻译记忆:记录常用短语和句式
|
|
||||||
|
|
||||||
### 学习资源
|
|
||||||
- 目标语言官方语法指南
|
|
||||||
- 专业领域翻译标准
|
|
||||||
- 行业术语词典
|
|
||||||
|
|
||||||
## 协作指南
|
|
||||||
|
|
||||||
### 与 Claude Code 协作
|
|
||||||
1. **明确指示**:清晰描述翻译要求和限制
|
|
||||||
2. **提供上下文**:给出足够的背景信息
|
|
||||||
3. **分段处理**:大文档建议分段翻译
|
|
||||||
4. **及时反馈**:对不满意的部分提出修改建议
|
|
||||||
|
|
||||||
### 反馈机制
|
|
||||||
- 记录遇到的问题和解决方案
|
|
||||||
- 更新术语表和风格指南
|
|
||||||
- 总结翻译经验和最佳实践
|
|
||||||
|
|
||||||
## 注意事项
|
|
||||||
|
|
||||||
1. **版权尊重**:仅翻译已授权的内容
|
|
||||||
2. **保密性**:对敏感信息严格保密
|
|
||||||
3. **持续改进**:根据反馈不断优化翻译质量
|
|
||||||
4. **知识积累**:建立个人翻译知识库
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**联系方式**:[项目负责人]
|
**Last Updated**: 2025-11-20
|
||||||
**更新日期**:2025-11-11
|
**Purpose**: Guide Claude Code instances working with this translation repository
|
||||||
**版本**:v1.0
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue