Ver Fonte

[DOCUMENTATION] Japanese sync

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20644 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp há 16 anos atrás
pai
commit
89208236ae

+ 52 - 10
documentation/manual/ja/module_specs/Zend_File_Transfer-Introduction.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 19150 -->
+<!-- EN-Revision: 20174 -->
 <sect1 id="zend.file.transfer.introduction">
 
     <title>Zend_File_Transfer</title>
@@ -135,9 +135,9 @@ if (!$adapter->receive()) {
         <itemizedlist>
             <listitem>
                 <para>
-                    <emphasis>ignoreNoFile</emphasis>: このオプションを true にすると、
+                    <emphasis>ignoreNoFile</emphasis>: このオプションを <constant>TRUE</constant> にすると、
                     ファイルがフォームからアップロードされなかったときにバリデータは何も行いません。
-                    このオプションのデフォルトは false で、
+                    このオプションの既定値は <constant>FALSE</constant> で、
                     この場合はファイルがアップロードされなければエラーとなります。
                 </para>
             </listitem>
@@ -270,7 +270,7 @@ $upload->receive();
         <para>
             デフォルトでは、ファイル名はフルパス形式で返されます。
             パス抜きのファイル名だけがほしい場合は、2 番目のパラメータ
-            <code>$path</code> を設定します。これを false
+            <code>$path</code> を設定します。これを <constant>FALSE</constant>
             にするとパスの部分を取り除いた結果を返します。
         </para>
 
@@ -302,7 +302,7 @@ $names = $upload->getFileName('foo');
             <methodname>getFileSize()</methodname> は、デフォルトではファイルサイズを SI 記法で返します。
             つまり、たとえば <code>2048</code> ではなく <code>2kB</code>
             のようになるということです。単にサイズだけが知りたい場合は、オプション
-            <code>useByteString</code> を false に設定してください。
+            <code>useByteString</code> を <constant>FALSE</constant> に設定してください。
         </para>
 
         <example id="zend.file.transfer.introduction.informations.example.getfilesize">
@@ -322,6 +322,17 @@ $size = $upload->getFileSize();
 
         </example>
 
+        <!-- TODO : to be translated -->
+        <note>
+            <title>Client given filesize</title>
+
+            <para>
+                Note that the filesize which is given by the client is not seen as save input.
+                Therefor the real size of the file will be detected and returned instead of the
+                filesize sent by the client.
+            </para>
+        </note>
+
         <para>
             <methodname>getHash()</methodname> の最初のパラメータには、ハッシュアルゴリズムの名前を指定します。
             使用できるアルゴリズムについては
@@ -347,6 +358,7 @@ $names = $upload->getHash('crc32', 'foo');
         </example>
 
         <note>
+            <title>返り値</title>
             <para>
                 複数のファイルを指定した場合は、返される結果が配列となることに注意しましょう。
             </para>
@@ -372,14 +384,44 @@ $names = $upload->getMimeType('foo');
 
         </example>
 
+        <!-- TODO : to be translated -->
         <note>
+            <title>Client given mimetype</title>
+
+             <para>
+                Note that the mimetype which is given by the client is not seen as save input.
+                Therefor the real mimetype of the file will be detected and returned instead of the
+                mimetype sent by the client.
+            </para>
+        </note>
+
+        <warning>
+            <title>ありえる例外</title>
+
             <para>
                 このメソッドは、fileinfo 拡張モジュールが使用可能な場合はそれを使用することに注意しましょう。
                 この拡張モジュールがみつからなかった場合は、mimemagic 拡張モジュールを使用します。
-                それもみつからなかった場合は、ファイルがアップロードされた際にファイルサーバから渡された
-                mimetype を使用します。
+                それもみつからなかった場合は、例外を発生します。
             </para>
-        </note>
+        </warning>
+
+        <!-- TODO : to be translated -->
+        <warning>
+            <title>Original data within $_FILES</title>
+
+            <para>
+                Due to security reasons also the original data within $_FILES will be overridden
+                as soon as <classname>Zend_File_Transfer</classname> is initiated. When you want
+                to omit this behaviour and have the original data simply set the
+                <property>detectInfos</property> option to <constant>FALSE</constant> at initiation.
+            </para>
+
+            <para>
+                This option will have no effect after you initiated
+                <classname>Zend_File_Transfer</classname>.
+            </para>
+        </warning>
+
     </sect2>
 
     <sect2 id="zend.file.transfer.introduction.uploadprogress">
@@ -502,8 +544,8 @@ while (!$upload['done']) {
                 <listitem>
                     <para>
                         <emphasis>done</emphasis>:
-                        アップロードがいつ終了したのかを返します。
-                        終了していない場合は false を返します。
+                        アップロードが終了したときは <constant>TRUE</constant> 、
+                        そうでなければ <constant>FALSE</constant> を返します。
                     </para>
                 </listitem>
 

+ 60 - 25
documentation/manual/ja/module_specs/Zend_View-Helpers-HeadMeta.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 17340 -->
+<!-- EN-Revision: 19777 -->
 <sect3 id="zend.view.helpers.initial.headmeta">
     <title>HeadMeta ヘルパー</title>
 
     <para>
-        HTML の <code>&lt;meta&gt;</code> 要素は、
+        HTML の <emphasis>&lt;meta&gt;</emphasis> 要素は、
         HTML ドキュメントに関するメタ情報を扱います。
         たとえばキーワードや文字セット、キャッシュ方式などです。
         Meta タグには 'http-equiv' 形式と 'name' 形式があり、
@@ -14,27 +14,51 @@
     </para>
 
     <para>
-        <code>HeadMeta</code> ヘルパーは、
+        <classname>HeadMeta</classname> ヘルパーは、
         meta タグを設定したり追加したりするための次のようなメソッドを提供します。
     </para>
 
     <itemizedlist>
-        <listitem><para><code>appendName($keyValue, $content,
-                    $conditionalName)</code></para></listitem>
-        <listitem><para><code>offsetSetName($index, $keyValue, $content,
-                    $conditionalName)</code></para></listitem>
-        <listitem><para><code>prependName($keyValue, $content,
-                    $conditionalName)</code></para></listitem>
-        <listitem><para><code>setName($keyValue, $content,
-                    $modifiers)</code></para></listitem>
-        <listitem><para><code>appendHttpEquiv($keyValue, $content,
-                    $conditionalHttpEquiv)</code></para></listitem>
-        <listitem><para><code>offsetSetHttpEquiv($index, $keyValue, $content,
-                    $conditionalHttpEquiv)</code></para></listitem>
-        <listitem><para><code>prependHttpEquiv($keyValue, $content,
-                    $conditionalHttpEquiv)</code></para></listitem>
-        <listitem><para><code>setHttpEquiv($keyValue, $content,
-                    $modifiers)</code></para></listitem>
+        <listitem>
+            <para>
+                <command>appendName($keyValue, $content, $conditionalName)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>offsetSetName($index, $keyValue, $content, $conditionalName)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>prependName($keyValue, $content, $conditionalName)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>setName($keyValue, $content, $modifiers)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <commande>offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv)</commande>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv)</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>setHttpEquiv($keyValue, $content, $modifiers)</command>
+            </para>
+        </listitem>
     </itemizedlist>
 
     <para>
@@ -47,9 +71,9 @@
 
     <para>
         ヘルパーメソッド <methodname>headMeta()</methodname> で meta タグを設定することもできます。
-        このメソッドのシグネチャは <code>headMeta($content,
+        このメソッドのシグネチャは <command>headMeta($content,
             $keyValue, $keyType = 'name', $modifiers = array(), $placement =
-            'APPEND')</code>
+            'APPEND')</command>
         です。<varname>$keyValue</varname> には、
         <varname>$keyType</varname> ('name' あるいは 'http-equiv')
         で指定したキーのコンテンツを指定します。
@@ -59,17 +83,17 @@
     </para>
 
     <para>
-        <code>HeadMeta</code> は <methodname>append()</methodname> や
+        <classname>HeadMeta</classname> は <methodname>append()</methodname> や
         <methodname>offsetSet()</methodname>、<methodname>prepend()</methodname>、そして <methodname>set()</methodname>
         をそれぞれオーバーライドして、上にあげた特別なメソッドを使用させるようにします。
-        内部的には、各項目を <code>stdClass</code> のトークンとして保管し、
+        内部的には、各項目を <property>stdClass</property> のトークンとして保管し、
         あとで <methodname>itemToString()</methodname> メソッドでシリアライズします。
         これはスタック内の項目についてチェックを行い、
         オプションでそれを修正したものを返します。
     </para>
 
     <para>
-        <code>HeadMeta</code> ヘルパーは、
+        <classname>HeadMeta</classname> ヘルパーは、
         <link linkend="zend.view.helpers.initial.placeholder">Placeholder
         ヘルパー</link> の具象実装です。
     </para>
@@ -78,7 +102,7 @@
         <title>HeadMeta ヘルパーの基本的な使用法</title>
 
         <para>
-            meta タグは、いつでも好きなときに指定することができます。
+            meta タグは、いつでも好きなときに指定できます。
             一般的には、クライアント側でのキャッシュの制御方法や
             SEO 用キーワードなどを指定します。
         </para>
@@ -119,6 +143,17 @@ $this->headMeta()->appendHttpEquiv('Content-Type',
                  ->appendHttpEquiv('Content-Language', 'en-US');
 ]]></programlisting>
 
+        <!-- TODO : to be translated -->
+         <para>
+            If you are serving an HTML5 document, you should provide the character
+            set like this:
+        </para>
+
+        <programlisting language="php"><![CDATA[
+// HTML5 で文字セットを設定します
+$this->headMeta()->setCharset('UTF-8'); // <meta charset="UTF-8"> のように見えます
+]]></programlisting>
+
         <para>
             最後の例として、リダイレクトの前に見せるメッセージを
             "meta refresh" で指定するものを示します。

+ 57 - 22
documentation/manual/ja/module_specs/Zend_View-Helpers-HeadStyle.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 19389 -->
+<!-- EN-Revision: 20143 -->
 <sect3 id="zend.view.helpers.initial.headstyle">
     <title>HeadStyle ヘルパー</title>
 
     <para>
-        HTML の <code>&lt;style&gt;</code> 要素を使用して、
-        <acronym>CSS</acronym> スタイルシートを HTML の <code>&lt;head&gt;</code>
+        HTML の <emphasis>&lt;style&gt;</emphasis> 要素を使用して、
+        <acronym>CSS</acronym> スタイルシートを HTML の <emphasis>&lt;head&gt;</emphasis>
         要素に埋め込みます。
     </para>
 
@@ -15,32 +15,44 @@
 
         <para>
             外部スタイルシートの読み込み用の
-            <code>&lt;link&gt;</code> 要素を作成する場合は
+            <emphasis>&lt;link&gt;</emphasis> 要素を作成する場合は
             <link linkend="zend.view.helpers.initial.headlink">HeadLink</link>
             を使用する必要があります。スタイルシートをインラインで定義したい場合に
-            <code>HeadStyle</code> を使用します。
+            <classname>HeadStyle</classname> を使用します。
         </para>
     </note>
 
     <para>
-        <code>HeadStyle</code> ヘルパーがサポートするメソッドは次のとおりです。
+        <classname>HeadStyle</classname> ヘルパーがサポートするメソッドは次のとおりです。
         これらによってスタイルシート宣言の設定や追加を行います。
     </para>
 
     <itemizedlist>
-        <listitem><para><code>appendStyle($content, $attributes =
-                    array())</code></para></listitem>
-        <listitem><para><code>offsetSetStyle($index, $content, $attributes =
-                    array())</code></para></listitem>
-        <listitem><para><code>prependStyle($content, $attributes =
-                    array())</code></para></listitem>
-        <listitem><para><code>setStyle($content, $attributes =
-                    array())</code></para></listitem>
+        <listitem>
+            <para>
+                <command>appendStyle($content, $attributes = array())</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>offsetSetStyle($index, $content, $attributes = array())</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>prependStyle($content, $attributes = array())</command>
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+                <command>setStyle($content, $attributes = array())</command>
+            </para>
+        </listitem>
     </itemizedlist>
 
     <para>
         すべての場合において、<varname>$content</varname> には実際の <acronym>CSS</acronym> 宣言を指定します。
-        <varname>$attributes</varname> には、<code>style</code> タグに追加したい属性があれば指定します。
+        <varname>$attributes</varname> には、<property>style</property> タグに追加したい属性があれば指定します。
         lang、title、media そして dir のすべてが使用可能です。
     </para>
 
@@ -48,7 +60,7 @@
         <title>条件コメントの設定</title>
 
         <para>
-            <code>HeadStyle</code> では、script タグを条件コメントで囲むことができます。
+            <classname>HeadStyle</classname> では、script タグを条件コメントで囲むことができます。
             そうすれば、特定のブラウザでだけスクリプトを実行しないこともできます。
             これを使用するには conditional タグを設定し、条件をメソッドコール時の
             <varname>$attributes</varname> パラメータで渡します。
@@ -64,7 +76,7 @@ $this->headStyle()->appendStyle($styles, array('conditional' => 'lt IE 7'));
     </note>
 
     <para>
-        <code>HeadStyle</code> はスタイル宣言のキャプチャも行います。
+        <classname>HeadStyle</classname> はスタイル宣言のキャプチャも行います。
         これは、宣言をプログラム上で作成してからどこか別の場所で使いたい場合に便利です。
         使用法は、以下の例で示します。
     </para>
@@ -78,21 +90,44 @@ $this->headStyle()->appendStyle($styles, array('conditional' => 'lt IE 7'));
     </para>
 
     <para>
-        <code>HeadStyle</code> は <methodname>append()</methodname> や
+        <classname>HeadStyle</classname> は <methodname>append()</methodname> や
         <methodname>offsetSet()</methodname>、<methodname>prepend()</methodname>、そして <methodname>set()</methodname>
         をそれぞれオーバーライドして、上にあげた特別なメソッドを使用させるようにします。
-        内部的には、各項目を <code>stdClass</code> のトークンとして保管し、
+        内部的には、各項目を <property>stdClass</property> のトークンとして保管し、
         あとで <methodname>itemToString()</methodname> メソッドでシリアライズします。
         これはスタック内の項目についてチェックを行い、
         オプションでそれを修正したものを返します。
     </para>
 
     <para>
-        <code>HeadStyle</code> ヘルパーは、
+        <classname>HeadStyle</classname> ヘルパーは、
         <link linkend="zend.view.helpers.initial.placeholder">Placeholder
         ヘルパー</link> の具象実装です。
     </para>
 
+    <!-- TODO : to be translated -->
+    <note>
+        <title>UTF-8 encoding used by default</title>
+
+        <para>
+            By default, Zend Framework uses <acronym>UTF-8</acronym> as its default encoding, and,
+            specific to this case, <classname>Zend_View</classname> does as well. Character encoding
+            can be set differently on the view object itself using the
+            <methodname>setEncoding()</methodname> method (or the the <varname>encoding</varname>
+            instantiation parameter). However, since <classname>Zend_View_Interface</classname> does
+            not define accessors for encoding, it's possible that if you are using a custom view
+            implementation with this view helper, you will not have a
+            <methodname>getEncoding()</methodname> method, which is what the view helper uses
+            internally for determining the character set in which to encode.
+        </para>
+
+        <para>
+            If you do not want to utilize <acronym>UTF-8</acronym> in such a situation, you will
+            need to implement a <methodname>getEncoding()</methodname> method in your custom view
+            implementation.
+        </para>
+    </note>
+
     <example id="zend.view.helpers.initial.headstyle.basicusage">
         <title>HeadStyle ヘルパーの基本的な使用法</title>
 
@@ -142,7 +177,7 @@ $this->headStyle()->prependStyle($firstStyles);
             時には <acronym>CSS</acronym> のスタイル宣言をプログラムで生成しなければならないこともあるでしょう。
             文字列の連結やヒアドキュメント等を使っても構いませんが、
             ふつうにスタイルを作成してそれを <acronym>PHP</acronym> のタグに埋め込めればより簡単です。
-            <code>HeadStyle</code> は、スタックにキャプチャすることでこれを実現します。
+            <classname>HeadStyle</classname> は、スタックにキャプチャすることでこれを実現します。
         </para>
 
         <programlisting language="php"><![CDATA[
@@ -166,7 +201,7 @@ body {
             </para></listitem>
 
             <listitem><para>
-                    <code>&lt;style&gt;</code> タグに追加の属性を指定したい場合は、
+                    <emphasis>&lt;style&gt;</emphasis> タグに追加の属性を指定したい場合は、
                     <methodname>captureStart()</methodname> の 2 番目の引数に配列形式で渡します。
             </para></listitem>
         </itemizedlist>