Skip to content

Commit f640ee9

Browse files
committed
merged to trunk.
1 parent 9a5ab60 commit f640ee9

File tree

9 files changed

+162
-152
lines changed

9 files changed

+162
-152
lines changed

howto/custom-template-tags.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,6 @@ Python 2.4 からは、デコレータ構文も使えます::
836836
ここでの違いは、 ``do_current_tume()`` がフォーマット文字列と変数名を取り、
837837
``CurrentTimeNode3`` に渡すという点です。
838838

839-
Parsing until another block tag
840-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
841-
842839
.. _Parsing until another block tag:
843840

844841
他のブロックタグに到達するまでパージングする

howto/deployment/index.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ Django のデプロイ
55

66
:revision-up-to: 8961 (1.0)
77

8-
Django's chock-full of shortcuts to make web developer's lives easier, but all
9-
those tools are of no use if you can't easily deploy your sites. Since Django's
10-
inception, ease of deployment has been a major goal. There's a number of good
11-
ways to easily deploy Django:
8+
Django には、ウェブ開発者の負担を軽くするショートカットがぎっしりつまってい
9+
ますが、作ったサイトをデプロイできなければ元も子もありません。 Django プロ
10+
ジェクトの開始当時から、簡単なデプロイは大きな目標の一つでした。Django を簡
11+
単にデプロイするいい方法はいくつもあります:
1212

1313
.. toctree::
1414
:maxdepth: 1
1515

1616
modpython
1717
fastcgi
1818

19-
:ref:`Deploying under mod_python <howto-deployment-modpython>` is the
20-
recommended deployment method; start there if you're not sure which path you'd
21-
like to go down.
19+
デプロイの方法としては、 :ref:`mod_python を使う方法
20+
<howto-deployment-modpython>` をお勧めします。どの方法を選んでよいのか分か
21+
らない場合は、 mod_python を使いましょう。
2222

2323
.. seealso::
2424

25-
* `Chapter 20 of The Django Book`_ discusses deployment and especially
26-
scaling in more detail.
25+
* `Django Book の 20 章 <chaper 20 of the django book>`_ では、デプロイ
26+
方法と、とりわけデプロイ時のスケーリングについて詳しく解説しています。
2727

28-
* `mod_wsgi`_ is a newcomer to the Python deployment world, but it's rapidly
29-
gaining traction. Currently there's a few hoops you have to jump through to
30-
`use mod_wsgi with Django`_, but mod_wsgi tends to get rave reviews from
31-
those who use it.
28+
* `mod_wsgi`_ はまだ新参のデプロイ手段ですが、急速に人々を惹き付けつつ
29+
あります。今のところ、
30+
`mod_wsgi Django を動かす <use mod_wsgi with django>`_ には、いく
31+
つかステップが必要ですが、ユーザの評判は上々のようです。
3232

3333
.. _chapter 20 of the django book: http://djangobook.com/en/1.0/chapter20/
3434
.. _mod_wsgi: http://code.google.com/p/modwsgi/

internals/documentation.txt

Lines changed: 117 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,206 +1,215 @@
11
.. _internals-documentation:
22

3-
How the Django documentation works
4-
==================================
3+
Django ドキュメントの仕組み
4+
============================
55

66
:revision-up-to: 8961 (1.0)
77

8-
\... and how to contribute.
8+
\... と、ドキュメント作業への貢献方法
99

10-
Django's documentation uses the Sphinx__ documentation system, which in turn is
11-
based on docutils__. The basic idea is that lightly-formatted plain-text
12-
documentation is transformed into HTML, PDF, and any other output format.
10+
Django のドキュメントは Sphinx__ ドキュメンテーションシステムを使っています。
11+
Sphinx__ は docutils__ に基づいて作られています。 docutils は、簡単な書式の
12+
プレーンテキストを、 HTML や PDF その他の様々な出力形式で簡単に扱えるように
13+
することを念頭に置いて作られています。
1314

1415
__ http://sphinx.pocoo.org/
1516
__ http://docutils.sf.net/
1617

17-
To actually build the documentation locally, you'll currently need to install
18-
Sphinx -- ``easy_install Sphinx`` should do the trick.
18+
ドキュメントを実際に手元でビルドするには、現状では Sphinx をインストールす
19+
る必要があります。インストールは ``easy_install Sphinx`` でできます。
1920

20-
Then, building the html is easy; just ``make html`` from the ``docs`` directory.
21+
さて、 html のビルドは簡単です。単に ``docs`` ディレクトリで ``make html``
22+
を実行するだけです。
2123

22-
To get started contributing, you'll want to read the `ReStructuredText
23-
Primer`__. After that, you'll want to read about the `Sphinx-specific markup`__
24-
that's used to manage metadata, indexing, and cross-references.
24+
ドキュメント作業に貢献したいなら、まず `ReStructuredText Primer`__ を読みま
25+
しょう。その後 `Sphinx 固有のマークアップ`__ の説明を読んで、メタデータやイ
26+
ンデクス、相互参照の方法を学ぶとよいでしょう。
2527

2628
__ http://sphinx.pocoo.org/rest.html
2729
__ http://sphinx.pocoo.org/markup/
2830

29-
The main thing to keep in mind as you write and edit docs is that the more
30-
semantic markup you can add the better. So::
31+
ドキュメントを書いたり編集したりする上で覚えておかねばならないのは、よりセ
32+
マンティックなマークアップを使う方がよい、ということです。従って::
3133

3234
Add ``django.contrib.auth`` to your ``INSTALLED_APPS``...
33-
34-
Isn't nearly as helpful as::
35+
36+
とするよりも::
3537

3638
Add :mod:`django.contrib.auth` to your :setting:`INSTALLED_APPS`...
37-
38-
This is because Sphinx will generate proper links for the later, which greatly
39-
helps readers. There's basically no limit to the amount of useful markup you can
40-
add.
4139

42-
Django-specific markup
43-
----------------------
40+
と書いた方が便利なのです。なぜなら、後者のマークアップの場合、 Sphinx が適
41+
切なリンクを生成するため、ドキュメントの読み手にとって非常に助かるからです。
42+
制限はありません。可能な限り便利なマークアップを使ってください。
4443

45-
Besides the `Sphinx built-in markup`__, Django's docs defines some extra description units:
44+
Django 固有のマークアップ
45+
--------------------------
46+
47+
`Sphinx の組み込みマークアップ`__ の他に、Django ドキュメントではいくつか追
48+
加で表記単位 (description unit) を定義しています:
4649

4750
__ http://sphinx.pocoo.org/markup/desc.html
4851

49-
* Settings::
52+
* 設定::
5053

5154
.. setting:: INSTALLED_APPS
5255

53-
To link to a setting, use ``:setting:`INSTALLED_APPS```.
56+
リンクするには、 ``:setting:`INSTALLED_APPS``` としてください。
5457

55-
* Template tags::
58+
* テンプレートタグ::
5659

5760
.. templatetag:: regroup
5861

59-
To link, use ``:ttag:`regroup```.
62+
タグの説明にリンクするには ``:ttag:`regroup``` としてください。
6063

61-
* Template filters::
64+
* テンプレートフィルタ::
6265

6366
.. templatefilter:: linebreaksbr
6467

65-
To link, use ``:tfilter:`linebreaksbr```.
68+
リンクするには ``:tfilter:`linebreaksbr``` としてください。
6669

67-
* Field lookups (i.e. ``Foo.objects.filter(bar__exact=whatever)``)::
70+
* フィールド照合 (``Foo.objects.filter(bar__exact=whatever)`` など)::
6871

6972
.. fieldlookup:: exact
7073

71-
To link, use ``:lookup:`exact```.
74+
リンクするには ``:lookup:`exact``` としてください。
7275

73-
* ``django-admin`` commands::
76+
* ``django-admin`` コマンド::
7477

7578
.. django-admin:: syncdb
7679

77-
To link, use ``:djadmin:`syncdb```.
80+
リンクするには ``:djadmin:`syncdb``` としてください。
7881

79-
* ``django-admin`` command-line options::
82+
* ``django-admin`` コマンドラインオプション::
8083

8184
.. django-admin-option:: --traceback
8285

83-
To link, use ``:djadminopt:`--traceback```.
86+
リンクするには ``:djadminopt:`--traceback``` としてください。
8487

85-
An example
86-
----------
88+
89+
----
8790

88-
For a quick example of how it all fits together, check this out:
91+
マークアップの簡単な例を以下にまとめました:
8992

90-
* First, the ``ref/settings.txt`` document starts out like this::
93+
* まず、 ``ref/settings.txt`` ドキュメントを見てみましょう。このドキュ
94+
メントは以下のような内容から始まっています::
9195

9296
.. _ref-settings:
9397

94-
Available settings
95-
==================
98+
settings に設定できる値
99+
==========================
96100

97101
...
98102

99-
* Next, if you look at the ``topics/settings.txt`` document, you can see how
100-
a link to ``ref/settings`` works::
103+
* ``topics/settings.txt`` ドキュメントを見ると、 ``ref/settings`` への
104+
リンクがどのように書かれているか分かります::
101105

102-
Available settings
103-
==================
106+
利用可能な設定
107+
==============
104108

105-
For a full list of available settings, see the :ref:`settings reference
106-
<ref-settings>`.
109+
利用可能な設定は :ref:`setting リファレンス <ref-settings>` を参照
110+
してください。
107111

108-
* Next, notice how the settings (right now just the top few) are annotated::
112+
* 設定項目をどのように表記しているかを見てみましょう::
109113

110114
.. setting:: ADMIN_FOR
111115

112116
ADMIN_FOR
113-
---------
114-
115-
Default: ``()`` (Empty tuple)
116-
117-
Used for admin-site settings modules, this should be a tuple of settings
118-
modules (in the format ``'foo.bar.baz'``) for which this site is an
119-
admin.
117+
---------
120118

121-
The admin site uses this in its automatically-introspected
122-
documentation of models, views and template tags.
119+
デフォルト値: ``()`` (空のタプル)
120+
admin 用サイトの設定モジュールで設定します。このサイトの admin を他
121+
のサイトの admin にする場合、設定モジュールを (``'foo.bar.baz'`` の
122+
形式のタプルで) 指定します。
123123

124-
This marks up the following header as the "canonical" target for the
125-
setting ``ADMIN_FOR`` This means any time I talk about ``ADMIN_FOR``, I
126-
can reference it using ``:setting:`ADMIN_FOR```.
127-
128-
That's basically how everything fits together.
124+
admin サイトはこの変数を使って、モデルやビュー、テンプレートタグの
125+
ドキュメントに対するイントロスペクションを自動的に行います。
126+
127+
この ``.. settings::`` の部分で、 ``ADMIN_FOR`` の「正しい」ターゲッ
128+
トとしてを定義しています。これで、 ``ADMIN_FOR`` について説明するとき
129+
に、 ``:setting:`ADMIN_FOR``` を使って参照できます。
130+
131+
このようにして、お互いの参照を解決します。
129132

130133
TODO
131134
----
132135

133-
The work is mostly done, but here's what's left, in rough order of priority.
136+
ドキュメントの整備はほぼ終っていますが、まだ、ほぼ以降に挙げる順番にやらね
137+
ばならないことが残っています。
134138

135-
* Fix up generic view docs: adapt Chapter 9 of the Django Book (consider
136-
this TODO item my permission and license) into
137-
``topics/generic-views.txt``; remove the intro material from
138-
``ref/generic-views.txt`` and just leave the function reference.
139+
* 汎用ビューの部分を修正します。 Django Book の 9 章を
140+
``topics/generic-views.txt`` にもってきて (この項目をもって、著者の許
141+
可とライセンス許諾に代えます)、 ``ref/generic-views.txt`` の導入部分
142+
を削除し、関数のリファレンスだけにします。
139143

140-
* Change the "Added/changed in development version" callouts to proper
141-
Sphinx ``.. versionadded::`` or ``.. versionchanged::`` directives.
144+
* 「開発版で追加/変更された機能」の部分を、全て Sphinx の
145+
``.. versionadded::`` および ``.. versionchanged::`` ディレクティブに
146+
置き換えます。
142147

143-
* Check for and fix malformed links. Do this by running ``make linkcheck``
144-
and fix all of the 300+ errors/warnings.
148+
* おかしなリンクをチェックして修正します。 ``make linkcheck`` を実行し
149+
て、 300 個以上出るエラーや警告メッセージを全て修正します。
145150

146-
In particular, look at all the relative links; these need to be
147-
changed to proper references.
151+
特に、相対リンクを全て調べる必要があります。これらは正しい参照に変更
152+
せねばなりません。
148153

149-
* Most of the various ``index.txt`` documents have *very* short or even
150-
non-existent intro text. Each of those documents needs a good short intro
151-
the content below that point.
154+
* ほとんどの ``index.txt`` ドキュメントに、肝心の説明文が *とても* わず
155+
かしかないか、まったくありません。それぞれに、各階層下に収められてい
156+
るコンテンツのよい説明文が必要です。
152157

153-
* The glossary is very perfunctory. It needs to be filled out.
158+
* 用語集がいい加減すぎます。もっと内容を濃くする必要があります。
154159

155-
* Add more metadata targets: there's lots of places that look like::
160+
* メタデータターゲットをもっと増やします。まだ::
156161

157162
``File.close()``
158163
~~~~~~~~~~~~~~~~
159164

160-
\... these should be::
165+
のような部分がたくさんあり、以下のように書き直さねばなりません::
161166

162167
.. method:: File.close()
163168

164-
That is, use metadata instead of titles.
169+
つまり、タイトルではなくメタデータを使わねばなりません。
165170

166-
* Add more links -- nearly everything that's an inline code literal
167-
right now can probably be turned into a xref.
171+
* リンクを追加します。現状のインラインコードリテラルは、ほぼ全て相互参
172+
照に変更できます。
168173

169-
See the ``literals_to_xrefs.py`` file in ``_ext`` -- it's a shell script
170-
to help do this work.
174+
``_ext`` 以下にある ``literals_to_xrefs.py`` ファイルを参照してくださ
175+
い。このシェルスクリプトを使えば、作業が楽になります。
171176

172-
This will probably be a continuing, never-ending project.
177+
おそらく終らない、地道な作業になるでしょう。
173178

174-
* Add `info field lists`__ where appropriate.
179+
* 適切な `info フィールドリスト`__ を追加する必要があります。
175180

176181
__ http://sphinx.pocoo.org/markup/desc.html#info-field-lists
177182

178-
* Add ``.. code-block:: <lang>`` to literal blocks so that they get
179-
highlighted.
183+
* 色づけ表示の必要なリテラルブロックに ``.. code-block:: <lang>`` を付
184+
加する必要があります。
180185

181-
Hints
182-
-----
186+
ヒント
187+
-------
183188

184-
Some hints for making things look/read better:
189+
読みやすいドキュメントにするためのヒントをいくつか紹介しましょう:
185190

186-
* Whenever possible, use links. So, use ``:setting:`ADMIN_FOR``` instead of
187-
````ADMIN_FOR````.
191+
* 可能なかぎり、リンクを使いましょう。例えば、 ````ADMIN_FOR```` は
192+
``:setting:`ADMIN_FOR``` にしましょう。
188193

189-
* Some directives (``.. setting::``, for one) are prefix-style directives;
190-
they go *before* the unit they're describing. These are known as
191-
"crossref" directives. Others (``.. class::``, e.g.) generate their own
192-
markup; these should go inside the section they're describing. These are
193-
called "description units".
194+
* ディレクティブの中には、プレフィクススタイルのもの (``.. setting::``
195+
など)あります。プレフィクススタイルのディレクティブは、記述対象のブロッ
196+
クの *前* に置かねばなりません。その他 (``.. class::`` など) は独自の
197+
マークアップを生成します。その他のディレクティブは、記述対象のセクショ
198+
ンの中に置かねばなりません。こうしたディレクティブは「記述単位
199+
(description unit)」と呼びます。
194200

195-
You can tell which are which by looking at in :file:`_ext/djangodocs.py`;
196-
it registers roles as one of the other.
201+
どのディレクティブがどちらのタイプは、 :file:`_ext/djangodocs.py` を
202+
参照してください。このファイルの中で、それぞれのロールを登録していま
203+
す。
197204

198-
* When referring to classes/functions/modules, etc., you'll want to use the
199-
fully-qualified name of the target
200-
(``:class:`django.contrib.contenttypes.models.ContentType```).
205+
* クラスや関数、モジュールなどを参照するときは、完全指定の名前
206+
(``:class:`django.contrib.contenttypes.models.ContentType```)を使うと
207+
よいでしょう。
201208

202-
Since this doesn't look all that awesome in the output -- it shows the
203-
entire path to the object -- you can prefix the target with a ``~``
204-
(that's a tilde) to get just the "last bit" of that path. So
205-
``:class:`~django.contrib.contenttypes.models.ContentType``` will just
206-
display a link with the title "ContentType".
209+
完全指定の名前を使っただけでは、出力はさほどきれいにならないでしょう。
210+
というのも、オブジェクトの全てのパスが表示されてしまうからです。
211+
ターゲットの先頭にチルダ (``~``) を付けると、パスの「最後の部分」だけ
212+
が表示されます。従って、
213+
``:class:`~django.contrib.contenttypes.models.ContentType``` とすると、
214+
単に "ContentType" と書かれたリンクを生成します。
215+

0 commit comments

Comments
 (0)