Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8b816d

Browse files
committed
initial CLAUDE code test
1 parent 3b0ead0 commit b8b816d

File tree

2 files changed

+162
-28
lines changed

2 files changed

+162
-28
lines changed

CLAUDE.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
# GEMINI.md: python-docs-ja プロジェクト ガイドライン
8+
9+
### 1. プロジェクト概要
10+
11+
このプロジェクトは、プログラミング言語Pythonの公式ドキュメントを日本語に翻訳する、Pythonプロジェクト公式の翻訳チームです。
12+
13+
### 2. 基本的なワークフロー
14+
15+
翻訳作業は、ユーザーから指定された単一の `.po` ファイルに対して行います。一度に複数のファイルを扱ったり、まとめて翻訳したりはしません。
16+
17+
### 3. 翻訳作業のルール
18+
19+
作業を行う際には、以下のルールを厳守してください。
20+
21+
#### 3.1. poファイルのフォーマットを維持する
22+
23+
- 翻訳は gettext を利用した `.po` ファイル形式で行われます。
24+
- `msgid` (原文) と `msgstr` (訳文) のペアで構成されています。
25+
- **絶対に `.po` ファイルの構造を壊さないでください。** 翻訳対象は `msgstr` の中身だけです。
26+
27+
#### 3.2. reStructuredTextの構文を維持する
28+
29+
- ドキュメントは reStructuredText で記述されています。
30+
- ``:mod:`` のようなロールや、`.. note::` のようなディレクティブ、リンクなどの構文を壊さないように、細心の注意を払って翻訳してください。
31+
32+
#### 3.3. 翻訳の進め方
33+
34+
- **既存翻訳の確認:** すでに翻訳されている箇所 (`msgstr` に記述がある箇所) は、原文 (`msgid`) の内容が正しく反映されているかを確認します。必要であれば、より適切で自然な表現に修正します。
35+
- **未翻訳部分の翻訳:** `msgstr` が空になっている未翻訳の部分は、他の部分の翻訳スタイルやトーンと違和感がないように、自然な日本語訳を作成・追加します。
36+
37+
#### 3.4. 翻訳品質の自動改善
38+
39+
翻訳作業時は、特別な指示がなくても以下の点を自動的にチェックし、読みにくい訳文を改善してください:
40+
41+
- **不自然な表現の修正:** 「だったり」「させる」などの不自然な語尾や接続表現を自然な日本語に修正
42+
- **用語の統一:** 同じ概念を表す用語は一貫して使用(例:「並行処理」「並列処理」の使い分け)
43+
- **技術用語の日本語化:** 一般的に日本語化されている用語は日本語で記述(例:「Transport」→「トランスポート」、「subprocesses」→「サブプロセス」)
44+
- **語尾の統一:** 箇条書きなどでは語尾をですます調に統一
45+
- **読みやすさの向上:** 冗長な表現を簡潔にし、より自然で読みやすい日本語に改善
46+
- **文脈に適した表現:** 技術文書として適切な表現を選択
47+
48+
これらの改善は、翻訳の正確性を保ちながら、より自然で読みやすい日本語文書にするために行います。
49+
50+
### 4. 具体的な作業例
51+
52+
`library/asyncio.po` を翻訳してください」という指示があった場合、以下の手順で作業を進めます。
53+
54+
1. `read_file` ツールで `library/asyncio.po` の内容を読み込みます。
55+
2. 未翻訳の箇所 (`msgstr ""`) を見つけます。
56+
3. reStructuredTextの構文に注意しながら、対応する `msgid` を翻訳し、`msgstr` に記述します。
57+
4. 既存の翻訳もレビューし、必要に応じて修正案を考えます。
58+
5. `replace` または `write_file` ツールを使い、変更を適用します。
59+
60+
## Repository Structure
61+
62+
The repository is organized as follows:
63+
- Root level: Core documentation files (about.po, bugs.po, copyright.po, etc.)
64+
- `c-api/`: C API documentation translations
65+
- `library/`: Standard library documentation translations
66+
- `tutorial/`: Tutorial documentation translations
67+
- `reference/`: Language reference translations
68+
- `whatsnew/`: "What's New" documentation for different Python versions
69+
- `deprecations/`: Deprecation notices
70+
- `extending/`, `distributing/`, `installing/`: Advanced topics
71+
- `faq/`, `howto/`: FAQ and how-to guides
72+
- `using/`: Platform-specific usage guides
73+
74+
## Common Development Commands
75+
76+
### Build Documentation
77+
```bash
78+
make # Build HTML documentation locally
79+
make htmlview # Build and open documentation in browser
80+
```
81+
82+
### Translation Management
83+
```bash
84+
make todo # List remaining translation tasks and show progress
85+
make fuzzy # Find fuzzy translation strings that need review
86+
make wrap # Rewrap modified .po files to fix line lengths
87+
```
88+
89+
### Quality Assurance
90+
```bash
91+
make verifs # Run all verification checks (spell, line-length, sphinx-lint)
92+
make spell # Check spelling in translation files
93+
make line-length # Check for lines exceeding 80 characters
94+
make sphinx-lint # Run Sphinx linting on .po files
95+
```
96+
97+
### Maintenance
98+
```bash
99+
make clean # Remove build artifacts and temporary files
100+
scripts/update.sh # Pull latest translations from Transifex (requires setup)
101+
```
102+
103+
## Prerequisites
104+
105+
Before working with this repository, ensure you have the required dependencies:
106+
107+
```bash
108+
# Install CPython documentation build dependencies
109+
python -m pip install -r venv/cpython/Doc/requirements.txt
110+
111+
# Required tools (installed via pip or system package manager)
112+
pip install powrap pospell pomerge potodo
113+
```
114+
115+
## Translation Workflow
116+
117+
1. **Translation Source**: Translations are managed via Transifex, not directly in this repository
118+
2. **File Generation**: .po files are generated from Transifex translations
119+
3. **Local Building**: Use `make` commands to build and verify translations locally
120+
4. **Issue Reporting**: Report translation issues to [python-doc-ja repository](https://github.com/python-doc-ja/python-doc-ja/issues)
121+
122+
## Architecture Notes
123+
124+
- **CPython Integration**: The build system clones CPython repository into `venv/cpython/` and builds documentation using CPython's Sphinx configuration
125+
- **Commit Tracking**: `CPYTHON_CURRENT_COMMIT` in Makefile tracks the specific CPython commit used for generating .po files
126+
- **Excluded Files**: Older Python version documentation (2.x, 3.0-3.10) are excluded from translation
127+
- **Language Configuration**: Target language is Japanese (`ja`), branch is `3.14`
128+
129+
## File Format
130+
131+
All translation files are in gettext .po format containing:
132+
- Original English text (`msgid`)
133+
- Japanese translation (`msgstr`)
134+
- Translation metadata and comments
135+
- Fuzzy markers for translations needing review
136+
137+
## Pull Request Policy
138+
139+
This repository does not accept pull requests. Translation changes must be made through the Transifex platform and will be automatically synchronized to this repository.
140+
141+

library/asyncio.po

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ msgid ""
6161
"asyncio is a library to write **concurrent** code using the **async/await** "
6262
"syntax."
6363
msgstr ""
64-
"asyncio は **async/await** 構文を使い **並行処理の** コードを書くためのライブ"
65-
"ラリです。"
64+
"asyncio は **async/await** 構文を使い **並行** コードを書くためのライブラ"
65+
"リです。"
6666

6767
#: ../../library/asyncio.rst:25
6868
msgid ""
@@ -79,43 +79,42 @@ msgid ""
7979
"asyncio is often a perfect fit for IO-bound and high-level **structured** "
8080
"network code."
8181
msgstr ""
82-
"asyncio は多くの場合、 IOバウンドだったり高レベルの **構造化された** ネット"
83-
"ワークコードに完璧に適しています。"
82+
"asyncio は多くの場合、IOバウンドや高レベルの **構造化された** ネットワー"
83+
"クコードに完璧に適しています。"
8484

8585
#: ../../library/asyncio.rst:32
8686
msgid "asyncio provides a set of **high-level** APIs to:"
87-
msgstr "asyncio は次の目的で **高レベル** API を提供しています:"
87+
msgstr "asyncio は以下の目的で **高レベル** API を提供しています:"
8888

8989
#: ../../library/asyncio.rst:34
9090
msgid ""
9191
":ref:`run Python coroutines <coroutine>` concurrently and have full control "
9292
"over their execution;"
9393
msgstr ""
94-
"並行に :ref:`Python コルーチンを起動 <coroutine>` し、実行全体を管理する"
94+
"並行に :ref:`Python コルーチンを実行 <coroutine>` し、その実行を完全に制御する"
9595

9696
#: ../../library/asyncio.rst:37
9797
msgid "perform :ref:`network IO and IPC <asyncio-streams>`;"
98-
msgstr ":ref:`ネットワーク IO と IPC <asyncio-streams>` を執り行う"
98+
msgstr ":ref:`ネットワーク IO と IPC <asyncio-streams>` を実行する"
9999

100100
#: ../../library/asyncio.rst:39
101101
msgid "control :ref:`subprocesses <asyncio-subprocess>`;"
102-
msgstr ":ref:`subprocesses <asyncio-subprocess>` を管理する"
102+
msgstr ":ref:`サブプロセス <asyncio-subprocess>` を管理する"
103103

104104
#: ../../library/asyncio.rst:41
105105
msgid "distribute tasks via :ref:`queues <asyncio-queues>`;"
106106
msgstr ":ref:`キュー <asyncio-queues>` を使ってタスクを分散する"
107107

108108
#: ../../library/asyncio.rst:43
109109
msgid ":ref:`synchronize <asyncio-sync>` concurrent code;"
110-
msgstr "並列処理のコードを :ref:`同期 <asyncio-sync>` させる"
110+
msgstr "並行処理のコードを :ref:`同期 <asyncio-sync>` する"
111111

112112
#: ../../library/asyncio.rst:45
113113
msgid ""
114114
"Additionally, there are **low-level** APIs for *library and framework "
115115
"developers* to:"
116116
msgstr ""
117-
"これに加えて、 *ライブラリやフレームワークの開発者* が次のことをするための **"
118-
"低レベル** API があります:"
117+
"さらに、*ライブラリやフレームワークの開発者*向けには以下の **低レベル** API があります:"
119118

120119
#: ../../library/asyncio.rst:48
121120
msgid ""
@@ -124,48 +123,43 @@ msgid ""
124123
"`subprocesses <loop_subprocess_exec>`, handling :ref:`OS signals "
125124
"<loop_add_signal_handler>`, etc;"
126125
msgstr ""
127-
":ref:`ネットワーク通信 <loop_create_server>` 、 :ref:`サブプロセス "
128-
"<loop_subprocess_exec>` の実行、 :ref:`OS シグナル "
129-
"<loop_add_signal_handler>` の取り扱いなどのための非同期 API を提供する :ref:`"
130-
"イベントループ <asyncio-event-loop>` の作成と管理を行う"
126+
":ref:`イベントループ <asyncio-event-loop>` を作成・管理し、:ref:`ネットワーク通信 <loop_create_server>`、:ref:`サブプロセスの実行 <loop_subprocess_exec>`、:ref:`OS シグナルの取り扱い <loop_add_signal_handler>` などのための非同期 API を提供する"
131127

132128
#: ../../library/asyncio.rst:53
133129
msgid ""
134130
"implement efficient protocols using :ref:`transports <asyncio-transports-"
135131
"protocols>`;"
136132
msgstr ""
137-
":ref:`Transport <asyncio-transports-protocols>` を使った効率的な protocol を"
138-
"実装します"
133+
":ref:`トランスポート <asyncio-transports-protocols>` を使った効率的なプロ"
134+
"トコルを実装する"
139135

140136
#: ../../library/asyncio.rst:56
141137
msgid ""
142138
":ref:`bridge <asyncio-futures>` callback-based libraries and code with async/"
143139
"await syntax."
144140
msgstr ""
145-
"コールバックを用いたライブラリと async/await 構文を使ったコードの :ref:`橋渡"
146-
"し <asyncio-futures>`"
141+
"コールバックベースのライブラリと async/await 構文を使ったコードを :ref:`ブリッジする <asyncio-futures>`"
147142

148143
#: ../../includes/wasm-notavail.rst:3
149144
msgid "Availability"
150-
msgstr ""
145+
msgstr "利用可能性"
151146

152147
#: ../../includes/wasm-notavail.rst:5
153148
msgid ""
154149
"This module does not work or is not available on WebAssembly. See :ref:`wasm-"
155150
"availability` for more information."
156151
msgstr ""
157-
"このモジュールは WebAssembly では動作しないか、利用不可です。詳しくは、:ref:"
158-
"`wasm-availability` を見てください。"
152+
"このモジュールは WebAssembly では動作しないか、利用できません。詳しくは :ref:`wasm-availability` を参照してください。"
159153

160154
#: ../../library/asyncio.rst:64
161155
msgid "asyncio REPL"
162-
msgstr ""
156+
msgstr "asyncio REPL"
163157

164158
#: ../../library/asyncio.rst:65
165159
msgid ""
166160
"You can experiment with an ``asyncio`` concurrent context in the :term:"
167161
"`REPL`:"
168-
msgstr ""
162+
msgstr "":term:`REPL` で ``asyncio`` の並行コンテキストを試すことができます:"
169163

170164
#: ../../library/asyncio.rst:67
171165
msgid ""
@@ -184,18 +178,17 @@ msgid ""
184178
"Raises an :ref:`auditing event <auditing>` ``cpython.run_stdin`` with no "
185179
"arguments."
186180
msgstr ""
187-
"引数無しで :ref:`監査イベント <auditing>` ``cpython.run_stdin`` を送出しま"
188-
"す。 "
181+
"引数なしで :ref:`監査イベント <auditing>` ``cpython.run_stdin`` を発生させます。"
189182

190183
#: ../../library/asyncio.rst:79
191184
msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events."
192-
msgstr ""
185+
msgstr "(3.11.10, 3.10.15, 3.9.20, 3.8.20 でも同様) 監査イベントを発行します。"
193186

194187
#: ../../library/asyncio.rst:82
195188
msgid ""
196189
"Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also "
197190
"executed. Emits audit events."
198-
msgstr ""
191+
msgstr "可能であれば PyREPL を使用し、その場合 :envvar:`PYTHONSTARTUP` も実行されます。監査イベントを発行します。"
199192

200193
#: ../../library/asyncio.rst:90
201194
msgid "Reference"

0 commit comments

Comments
 (0)