cvs: peardoc /ja Translators /ja/chapters standards.xml

From: Date: Sun, 10 Feb 2002 08:33:16 +0000
Subject: cvs: peardoc /ja Translators /ja/chapters standards.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2353@lists.php.net to get a copy of this message
hirokawa Sun Feb 10 03:33:16 2002 EDT Modified files: /peardoc/ja Translators /peardoc/ja/chapters standards.xml Log: updated translation status.

Index: peardoc/ja/Translators diff -u peardoc/ja/Translators:1.1 peardoc/ja/Translators:1.2 --- peardoc/ja/Translators:1.1 Fri Feb 1 09:37:25 2002 +++ peardoc/ja/Translators Sun Feb 10 03:33:16 2002 @@ -1,47 +1,52 @@ Files Translators Maintainers ============================================================================= -bookinfo.xml Rui Hirokawa -preface.xml Rui Hirokawa +bookinfo.xml Rui Hirokawa (m) Rui Hirokawa +preface.xml Rui Hirokawa (m) ---chapters------------------------------------------------------------------ -intro.xml Rui Hirokawa -parts.xml Rui Hirokawa -standards.xml Rui Hirokawa +intro.xml Rui Hirokawa (d) Rui Hirokawa +parts.xml Rui Hirokawa (d) +standards.xml Rui Hirokawa (d) ---contributing-------------------------------------------------------------- -howto.xml +howto.xml skeleton.xml ---core---------------------------------------------------------------------- -db.xml Rui Hirokawa -log.xml Rui Hirokawa -networking.xml -system.xml -http.xml Rui Hirokawa -mail.xml Rui Hirokawa -pear.xml Rui Hirokawa +console.xml Rui Hirokawa (d) Rui Hirokawa +db.xml Rui Hirokawa (w) +networking.xml Rui Hirokawa (d) +system.xml Rui Hirokawa (d) +http.xml Rui Hirokawa (d) +mail.xml Rui Hirokawa (w) +pear.xml Rui Hirokawa (d) ---packages------------------------------------------------------------------ -authentication.xml +authentication.xml file.xml +log.xml Rui Hirokawa (w) networking.xml templates.xml xml.xml ------authentication---------------------------------------------------------- -auth.xml Rui Hirokawa +auth.xml Rui Hirokawa (d) auth_http.xml ------file-------------------------------------------------------------------- -find.xml -passwd.xml -searchreplace.xml +find.xml Yoshiyuki Suzuki (w) +passwd.xml Yoshiyuki Suzuki (w) +searchreplace.xml Yoshiyuki Suzuki (w) ------networking-------------------------------------------------------------- -Net_CheckIP.xml -Net_Finger.xml -Net_IPv6.xml -Net_Ping.xml -Net_Portscan.xml -Net_Whois.xml +Net_CheckIP.xml Yoshiyuki Suzuki (w) +Net_Finger.xml Yoshiyuki Suzuki (w) +Net_IPv6.xml Yoshiyuki Suzuki (w) +Net_Ping.xml Yoshiyuki Suzuki (w) +Net_Portscan.xml Yoshiyuki Suzuki (w) +Net_Whois.xml Yoshiyuki Suzuki (w) ------templates--------------------------------------------------------------- -it.xml -itx.xml +it.xml Yoshiyuki Suzuki (w) +itx.xml Yoshiyuki Suzuki (w) ------xml--------------------------------------------------------------------- -xml_rss.xml -xml_sql2xml.xml +xml_rss.xml Yoshiyuki Suzuki (w) +xml_sql2xml.xml Yoshiyuki Suzuki (w) ---pecl----------------------------------------------------------------------- imagick.xml +satellite.xml +session_pgsql.xml Rui Hirokawa (w) +------------------------------------------------------------------------------ +w: working for translation, d: draft, m: maintaining \ No newline at end of file Index: peardoc/ja/chapters/standards.xml diff -u peardoc/ja/chapters/standards.xml:1.2 peardoc/ja/chapters/standards.xml:1.3 --- peardoc/ja/chapters/standards.xml:1.2 Sun Feb 3 18:28:28 2002 +++ peardoc/ja/chapters/standards.xml Sun Feb 10 03:33:16 2002 @@ -1,5 +1,5 @@ <?xml encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <chapter id="standards"> <title>標準コーディング規約</title> <note> @@ -121,7 +121,7 @@ <sect1 id="standards.funcdef"> <title>関数定義</title> <para> - Function declarations follow the "one true brace" convention: + 関数宣言は、以下のような"one true brace"表記に基づきます。 <programlisting role="php"> <![CDATA[ function fooFunction($arg1, $arg2 = '') @@ -135,9 +135,9 @@ </programlisting> </para> <para> - Arguments with default values go at the end of the argument list. - Always attempt to return a meaningful value from a function if one - is appropriate. Here is a slightly longer example: + デフォルト値を有する引数は引数リストの終わりに置きます。 + この関数は処理が適当である場合、常に関数から意味のある値を返すよう + にして下さい。以下にやや長い例を示します。 <programlisting role="php"> <![CDATA[ function connect(&$dsn, $persistent = false) @@ -162,39 +162,38 @@ <sect1 id="standards.comments"> <title>コメント</title> <para> - Inline documentation for classes should follow the PHPDoc - convention, similar to Javadoc. More information about PHPDoc can - be found here: <ulink url="&url.phpdoc;">&url.phpdoc;</ulink> + クラスのインラインドキュメントは、Javadocに似たPHPDocの表記に基づ + く必要があります。PHPDocに関するより詳細な情報は、 + <ulink url="&url.phpdoc;">&url.phpdoc;</ulink>にあります。 </para> <para> - Non-documentation comments are strongly encouraged. A general rule of - thumb is that if you look at a section of code and think "Wow, I don't - want to try and describe that", you need to comment it before you - forget how it works. + ドキュメント以外のコメントは、強く推奨されます。一般的な目安として、 + コードのあるセクションを見た時に「これを説明したくないな」と思うと + したら、処理内容を忘れる前にコメントを追加する必要があります。 </para> <para> - C style comments (/* */) and standard C++ comments (//) are both - fine. Use of Perl/shell style comments (#) is discouraged. + C言語形式の(/* */)と標準C++コメント(//)のどちらも使用可能です。 + Perl/shell形式のコメント(#)の使用は推奨されません。 </para> </sect1> <sect1 id="standards.including"> <title>コードの読み込み</title> <para> - Anywhere you are unconditionally including a class file, use - <function>require_once</function>. Anywhere you are conditionally - including a class file (for example, factory methods), use - <function>include_once</function>. Either of these will ensure - that class files are included only once. They share the same file - list, so you don't need to worry about mixing them - a file - included with <function>require_once</function> will not be - included again by <function>include_once</function>. + あるクラスファイルを無条件で読み込む場合は、 + <function>require_once</function>を使用して下さい。あるクラスファ + イルを条件付きで読み込む場合(例えば、factoryメソッド)は、 + <function>include_once</function>を使用して下さい。 + これらはどちらもクラスファイルが1度だけ読み込まれることを保証しま + す。これらは、同じファイルリストを共有しており、混用することについ + て心配する必要はありません。<function>require_once</function>で読 + み込まれたファイルは、<function>include_once</function>により再度 + 読み込まれることはありません。 <note> <simpara> - <function>include_once</function> and - <function>require_once</function> are statements, not - functions. You don't <emphasis>need</emphasis> parentheses - around the filename to be included. + <function>include_once</function>および + <function>require_once</function>は命令であり、関数ではありませ + ん。読み込むファイル名の前後に括弧は不要です。 </simpara> </note> </para> @@ -203,18 +202,19 @@ <sect1 id="standards.tags"> <title>PHPコードタグ</title> <para> - <emphasis>Always</emphasis> use <literal>&lt;?php ?></literal> to - delimit PHP code, not the <literal>&lt;? ?></literal> shorthand. - This is required for PEAR compliance and is also the most portable - way to include PHP code on differing operating systems and setups. + PHPコードを区分するために<emphasis>、短縮型の + <literal>&lt;? ?></literal>ではなく、常に + </emphasis><literal>&lt;?php ?></literal>を使用して下さい。 + PEAR対応のために必要で、オペレーティングシステムや設定が異なる情况 + でPHPコードを導入するための最も互換性の高い方法でもあります。 </para> </sect1> <sect1 id="standards.header"> <title>ヘッダのコメントブロック</title> <para> - All source code files in the core PEAR distribution should contain - the following comment block as the header: + コアPEAR配布ファイルにある全てのソースコードファイルには、以下のコ + メントブロックがヘッダとして含まれている必要があります。 <programlisting role="php"> <![CDATA[ /* vim: set expandtab tabstop=4 shiftwidth=4: */ @@ -235,38 +235,37 @@ // | Your Name <you@example.com> | // +----------------------------------------------------------------------+ // -// $Id: standards.xml,v 1.2 2002/02/03 23:28:28 hirokawa Exp $ +// $Id: standards.xml,v 1.3 2002/02/10 08:33:16 hirokawa Exp $ ]]> </programlisting> </para> <para> - There's no hard rule to determine when a new code contributor - should be added to the list of authors for a given source file. - In general, their changes should fall into the "substantial" - category (meaning somewhere around 10% to 20% of code changes). - Exceptions could be made for rewriting functions or contributing - new logic. + あるソースファイルの作者のリストに新たなコード提供者の名前を追加す + るべきかどうかを定義する明確な規則はありません。一般的に、作者に属 + する変更点は、"本質的な"分類に属する(10%から20%のコード変更を意味 + します)必要があります。関数の書換えや新たなロジックを提供する場合 + には、例外がある場合があります。 </para> <para> - Simple code reorganization or bug fixes would not justify the - addition of a new individual to the list of authors. + 簡単なコードの整理やバグ修正は、作者のリストに新たに個人を追加する + までの理由にはなりません。 </para> <para> - Files not in the core PEAR repository should have a similar block - stating the copyright, the license, and the authors. All files - should include the modeline comments to encourage consistency. + コアPEARリポジトリにないファイルには、似たような著作権、ライセンス、 + 作者を記述したブロックを含む必要があります。全てのファイルには、統 + 一したmodelineコメントを含むべきです </para> </sect1> <sect1 id="standards.cvs"> <title>CVSの使用</title> <simpara> - This section applies only to packages using CVS at cvs.php.net. + 本節は、cvs.php.netにあるCVSを使用するパッケージにのみ適用されます。 </simpara> <para> - Include the &dollar;Id&dollar; CVS keyword in each file. As each file - is edited, add this tag if it's not yet present (or replace - existing forms such as "Last Modified:", etc.). + 各ファイルに、CVSのキーワード &dollar;Id&dollar; を含めて下さい。 + 各ファイルを編集した際、まだない場合にはこのタグを追加して下さい。 + (または、"Last Modified:"のような既存の形式を置換して下さい) <!-- <note> <simpara> @@ -279,22 +278,22 @@ --> </para> <para> - The rest of this section assumes that you have basic knowledge - about CVS tags and branches. + 本節の残りの部分は、読者がCVSタグおよびブランチに関する基本的な知 + 識を有していることを前堤とします。 </para> <para> - CVS tags are used to label which revisions of the files in your - package belong to a given release. Below is a list of the - required and suggested CVS tags: + CVSタグは、指定したリリースに属するパッケージのファイルのリビジョ + ンを示すラベルとして使用されます。以下に必須及び推奨されるCVSタグ + のリストを示します。 <variablelist> <varlistentry> <term>RELEASE_<replaceable>n_n</replaceable></term> <listitem> <simpara> - (required) Used for tagging a release. If you don't use it, - there's no way to go back and retrieve your package from the - CVS server in the state it was in at the time of the release. + (必須) リリース用タグとして使用されます。これを使用しない場合、 + リリース時点の状態でCVSサーバからパッケージを取得する手段がな + くなります。 </simpara> </listitem> </varlistentry> @@ -302,11 +301,11 @@ <term>QA_<replaceable>n_n</replaceable></term> <listitem> <simpara> - (branch, optional) If you feel you need to roll out a - release candidate before releasing, it's a good idea to make a - branch for it so you can isolate the release and apply only - those critical fixes before the actual release. Meanwhile, - normal development may continue on the main trunk. + (ブランチ, オプション) リリース前にリリース侯補版を公開する必 + 要があると考えた場合には、リリース版を分岐し、実際のリリース前 + に重要な修正のみが適用されるようにするというのは良い考えです。 + その間に、通常の開発はメイントランクにおいて継続することが可能 + です。 </simpara> </listitem> </varlistentry> @@ -314,55 +313,54 @@ <term>MAINT_<replaceable>n_n</replaceable></term> <listitem> <simpara> - (branch, optional) If you need to make "micro-releases" (for - example 1.2.1 and so on after 1.2), you can use a branch for - that too, if your main trunk is very active and you want only - minor changes between your micro-releases. + (ブランチ, オプション) (例えば1.2の後に1.2.1といった)"マイクロ + リリース"を行う際に、メインの開発トランクが非常に活溌で、マイ + クロリリース間で僅かな変更のみを行いたい場合に、ブランチを使用 + することもできます。 </simpara> </listitem> </varlistentry> </variablelist> - Only the RELEASE tag is required, the rest are recommended for - your convenience. + RELEASEタグのみが必須で、残りは有用なものを推奨しているだけです。 </para> <para> - Below is an example of how to tag the 1.2 release of the - "Money_Fast" package: + 以下は、"Money_Fast"パッケージに1.2リリースタグを付ける方法を示す + ものです。 <informalexample> <screen><prompt>$ </prompt><command>cd pear/Money_Fast</command> <prompt>$ </prompt><command>cvs tag RELEASE_1_2</command> <computeroutput>T Fast.php T README T package.xml -</computeroutput> -</screen> + </computeroutput> + </screen> </informalexample> - By doing this you make it possible for the PEAR web site to take - you through the rest of your release process. + これにより、PEAR Webサイトでリリース手順の残りを行うことができるよ + うになります。 </para> <para> - Here's an example of how to create a QA branch: + 以下は、QAブランチを作成する方法を示す例です。 <informalexample> <screen><prompt>$ </prompt><command>cvs tag QA_2_0_BP</command> ... <prompt>$ </prompt><command>cvs rtag -b -r QA_2_0_BP QA_2_0</command> <prompt>$ </prompt><command>cvs update -r QA_2_0</command> <prompt>$ </prompt><command>cvs tag RELEASE_2_0RC1</command> -...and then the actual release, from the same branch: +...そして、実際のリリースでは、同じブランチから以下のようにします <prompt>$ </prompt><command>cvs tag RELEASE_2_0</command> </screen> </informalexample> - The "QA_2_0_BP" tag is a "branch point" tag, which is the start - point of the tag. It's always a good idea to start a CVS branch - from such branch points. MAINT branches may use the RELEASE tag - as their branch point. + "QA_2_0_BP"タグは"分岐点"タグで、タグの開始点です。このような分岐 + 点からCVSブランチを開始するのは常に良い考えです。 + MAINTブランチはその分岐点と同様にRELEASEタグを使用することが可能で + す。 </para> </sect1> <sect1 id="standards.exampleurls"> <title>URLの例</title> <para> - Use "example.com" for all example URLs, per RFC 2606. + 全てのURLの例についてRFC 2606に基づくURLを使用して下さい。 </para> </sect1> @@ -371,11 +369,11 @@ <sect2> <title>クラス</title> <para> - Classes should be given descriptive names. Avoid using abbreviations - where possible. Class names should always begin with an uppercase - letter. The PEAR class hierarchy is also reflected in the class name, - each level of the hierarchy separated with a single underscore. - Examples of good class names are: + クラスは、内容が分かる名前を指定する必要があります。可能ならば省 + 略した名前を使用することは避けて下さい。クラス名は、常に大文字で + 始まる必要があります。PEARクラス階層は、クラス名にも反映され、各 + 階層レベルは、アンダースコア1つで区切られます。 + 良いクラス名の例を以下に示します。 <informaltable> <tgroup cols="3"> <tbody> @@ -392,12 +390,12 @@ <sect2> <title>関数とメソッド</title> <para> - Functions and methods should be named using the "studly caps" - style (also referred to as "bumpy case" or "camel caps"). - Functions should in addition have the package name as a prefix, - to avoid name collisions between packages. The initial letter of - the name (after the prefix) is lowercase, and each letter that - starts a new "word" is capitalized. Some examples: + 関数とメソッドは、"studly caps"形式("bumpy case"または"camel + caps"とも呼ばれます)を使用して名前を付ける必要があります。 + 関数は、パッケージ間の名前の衝突を避けるためにパッケージ名を接頭 + 辞として加える必要があります。(接頭辞の後の)名前の最初の文字は、 + 小文字で、新しい単語を始める際の各先頭文字は大文字とします。例を + いくつか以下に示します。 <informaltable> <tgroup cols="4"> <tbody> @@ -412,10 +410,10 @@ </informaltable> </para> <para> - Private class members (meaning class members that are intented - to be used only from within the same class in which they are - declared; PHP does not yet support truly-enforceable private - namespaces) are preceded by a single underscore. For example: + プライベートクラスメンバ(このクラスメンバは宣言された同じクラスの + 内部からのみ使用されることを意図しています。PHPはプライベート名前 + 空間をまだサポートしていません)は、アンダースコア1つを前に付けま + す。例を以下に示します。 <informaltable> <tgroup cols="3"> <tbody> @@ -432,20 +430,20 @@ <sect2> <title>定数</title> <para> - Constants should always be all-uppercase, with underscores to - separate words. Prefix constant names with the uppercased name - of the class/package they are used in. For example, the constants - used by the <literal>DB::</literal> package all begin with - "<literal>DB_</literal>". + 定数は常に全て大文字で記述し、単語を区切る際にはアンダースコアを + 使用します。使用されるクラス/パッケージを大文字で表した名前を前置 + 定数名として使用します。例えば、<literal>DB::</literal>パッケージ + で使用される定数は全て"<literal>DB_</literal>"で始まります。 </para> </sect2> <sect2> <title>グローバル変数</title> <para> - If your package needs to define global variables, their name - should start with a single underscore followed by the package - name and another underscore. For example, the PEAR package uses - a global variable called $_PEAR_destructor_object_list. + パッケージでグローバル変数を定義する必要がある場合、その名前は、 + アンダースコアで始まり、その後にパッケージ名と別のアンダースコア + が続くようにする必要があります。例えば、PEARパッケージは、 + $_PEAR_destructor_object_listという名前のグローバル変数を使用しま + す。 </para> </sect2> </sect1>
« previous php.pear.cvs (#2353) next »