Browse Source

[DOCUMENTATION] Japanese sync 19568, 19887, 19912

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19913 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 years ago
parent
commit
9862d28261

+ 28 - 1
documentation/manual/ja/module_specs/Zend_Json-Basics.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
 <!-- Reviewed: no -->
-<!-- EN-Revision: 17166 -->
+<!-- EN-Revision: 19912 -->
 <sect1 id="zend.json.basics">
 <sect1 id="zend.json.basics">
     <title>基本的な使用法</title>
     <title>基本的な使用法</title>
     <para>
     <para>
@@ -16,6 +16,33 @@ $phpNative = Zend_Json::decode($encodedValue);
 // クライアントに返すために、それをエンコードします
 // クライアントに返すために、それをエンコードします
 $json = Zend_Json::encode($phpNative);
 $json = Zend_Json::encode($phpNative);
 ]]></programlisting>
 ]]></programlisting>
+
+    <!-- TODO : to be translated -->
+    <sect2 id="zend.json.basics.prettyprint">
+        <title>Pretty-printing JSON</title>
+
+        <para>
+            Sometimes, it may be hard to explore <acronym>JSON</acronym> data generated by
+            <methodname>Zend_Json::encode()</methodname>,
+            since it has no spacing or indentation. In order to make it easier, <classname>Zend_Json</classname>
+            allows you to pretty-print <acronym>JSON</acronym> data in the human-readable format
+            with <methodname>Zend_Json::prettyPrint()</methodname>.
+        </para>
+
+        <programlisting language="php"><![CDATA[
+// クライアントに返すために、それをエンコードします
+$json = Zend_Json::encode($phpNative);
+if($debug) {
+    echo Zend_Json::prettyPrint($json, array("indent" => " "));
+}
+]]></programlisting>
+
+        <!-- TODO : to be translated -->
+        <para>
+            Second optional argument of <methodname>Zend_Json::prettyPrint()</methodname> is an option array.
+            Option <code>indent</code> allows to set indentation string - by default it's a single tab character.
+        </para>
+    </sect2>
 </sect1>
 </sect1>
 <!--
 <!--
 vim:se ts=4 sw=4 et:
 vim:se ts=4 sw=4 et:

+ 29 - 30
documentation/manual/ja/module_specs/Zend_Tool_Framework-WritingProviders.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
 <!-- Reviewed: no -->
-<!-- EN-Revision: 18840 -->
+<!-- EN-Revision: 19568 -->
 <sect1 id="zend.tool.framework.writing-providers">
 <sect1 id="zend.tool.framework.writing-providers">
     <title>Zend_Tool_Frameworkを利用してプロバイダを作成する</title>
     <title>Zend_Tool_Frameworkを利用してプロバイダを作成する</title>
 
 
@@ -73,24 +73,24 @@
                 with a special filename ending with "Manifest.php".
                 with a special filename ending with "Manifest.php".
                 A Provider Manifest is an implementation of the
                 A Provider Manifest is an implementation of the
                 <interface>Zend_Tool_Framework_Manifest_ProviderManifestable</interface>
                 <interface>Zend_Tool_Framework_Manifest_ProviderManifestable</interface>
-                and requires the <code>getProviders()</code> method to return
+                and requires the <methodname>getProviders()</methodname> method to return
                 an array of instantiated providers. In anticipation of our first
                 an array of instantiated providers. In anticipation of our first
                 own provider <classname>My_Component_HelloProvider</classname>
                 own provider <classname>My_Component_HelloProvider</classname>
                 we will create the following manifest:
                 we will create the following manifest:
             </para>
             </para>
 
 
             <programlisting language="php"><![CDATA[
             <programlisting language="php"><![CDATA[
-    class My_Component_Manifest implements Zend_Tool_Framework_Manifest_ProviderManifestable
+class My_Component_Manifest
+    implements Zend_Tool_Framework_Manifest_ProviderManifestable
+{
+    public function getProviders()
     {
     {
-        public function getProviders()
-        {
-            return array(
-                new My_Component_HelloProvider()
-            );
-        }
+        return array(
+            new My_Component_HelloProvider()
+        );
     }
     }
-    ]]>
-            </programlisting>
+}
+]]></programlisting>
 
 
         </example>
         </example>
     </sect2>
     </sect2>
@@ -139,8 +139,9 @@ Hello from my provider!
         <para>
         <para>
             As discussed in the architecture section Zend Tool allows to hook different clients for
             As discussed in the architecture section Zend Tool allows to hook different clients for
             using your Zend Tool providers. To keep compliant with different clients you should
             using your Zend Tool providers. To keep compliant with different clients you should
-            use the response object to return messages from your providers instead of using <code>echo</code>
-            or a similiar output mechanism. Rewritting our hello provider with this knowledge it looks like:
+            use the response object to return messages from your providers instead of using
+            <methodname>echo()</methodname> or a similiar output mechanism. Rewritting our hello
+            provider with this knowledge it looks like:
         </para>
         </para>
 
 
         <programlisting language="php"><![CDATA[
         <programlisting language="php"><![CDATA[
@@ -149,11 +150,11 @@ class My_Component_HelloProvider
 {
 {
     public function say()
     public function say()
     {
     {
-        $this->_registry->getResponse()->appendContent("Hello from my provider!");
+        $this->_registry->getResponse
+                        ->appendContent("Hello from my provider!");
     }
     }
 }
 }
-]]>
-        </programlisting>
+]]></programlisting>
 
 
         <!-- TODO: to be translated -->
         <!-- TODO: to be translated -->
         <para>
         <para>
@@ -226,14 +227,15 @@ class My_Component_HelloProvider
 {
 {
     public function say($name = 'Ralph')
     public function say($name = 'Ralph')
     {
     {
-        $nameResponse = $this->_registry->getClient()->promptInteractiveInput("Whats your name?");
+        $nameResponse = $this->_registry
+                             ->getClient()
+                             ->promptInteractiveInput("Whats your name?");
         $name = $name->getContent();
         $name = $name->getContent();
 
 
         echo 'Hello' . $name . ', from my provider!';
         echo 'Hello' . $name . ', from my provider!';
     }
     }
 }
 }
-]]>
-            </programlisting>
+]]></programlisting>
 
 
             <!-- TODO: to be translated -->
             <!-- TODO: to be translated -->
             <para>
             <para>
@@ -317,8 +319,7 @@ class My_Component_HelloProvider
         }
         }
     }
     }
 }
 }
-]]>
-            </programlisting>
+]]></programlisting>
         </sect3>
         </sect3>
 
 
         <sect3 id="zend.tool.framework.writing-providers.advanced.configstorage">
         <sect3 id="zend.tool.framework.writing-providers.advanced.configstorage">
@@ -347,14 +348,14 @@ class My_Component_HelloProvider
         }
         }
     }
     }
 }
 }
-]]>
-            </programlisting>
+]]></programlisting>
 
 
             <!-- TODO: to be translated -->
             <!-- TODO: to be translated -->
             <para>
             <para>
-                The returned configuration is of the type <classname>Zend_Tool_Framework_Client_Config</classname>
-                but internally the <code>__get</code> and <code>__set</code> magic methods proxy to a
-                <classname>Zend_Config</classname> of the given configuration type.
+                The returned configuration is of the type
+                <classname>Zend_Tool_Framework_Client_Config</classname> but internally the
+                <methodname>__get</methodname> and <methodname>__set</methodname> magic methods
+                proxy to a <classname>Zend_Config</classname> of the given configuration type.
             </para>
             </para>
 
 
             <para>
             <para>
@@ -373,8 +374,7 @@ class My_Component_HelloProvider
         echo "Hello $aValue!";
         echo "Hello $aValue!";
     }
     }
 }
 }
-]]>
-            </programlisting>
+]]></programlisting>
 
 
             <para>
             <para>
                 ストレージ API はとても簡単です。
                 ストレージ API はとても簡単です。
@@ -391,8 +391,7 @@ class Zend_Tool_Framework_Client_Storage
     public function remove($name);
     public function remove($name);
     public function getStreamUri($name);
     public function getStreamUri($name);
 }
 }
-]]>
-            </programlisting>
+]]></programlisting>
 
 
             <!-- TODO: to be translated -->
             <!-- TODO: to be translated -->
             <important>
             <important>

+ 2 - 1
documentation/manual/ja/ref/language-snippets.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 19862 -->
+<!-- Reviewed: no -->
+<!-- EN-Revision: 19887 -->
 <!-- links -->
 <!-- links -->
 <!ENTITY lang                                   'ja'>
 <!ENTITY lang                                   'ja'>
 <!ENTITY zf.manual.link                         'http://framework.zend.com/manual/ja/'>
 <!ENTITY zf.manual.link                         'http://framework.zend.com/manual/ja/'>