Browse Source

sync en

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

+ 36 - 1
documentation/manual/ja/module_specs/Zend_Filter.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 22389 -->
+<!-- EN-Revision: 22722 -->
 <sect1 id="zend.filter.introduction">
 
     <title>導入</title>
@@ -184,6 +184,41 @@ echo Zend_Filter::filterStatic('"', 'OtherFilter', array($parameters));
             </itemizedlist>
         </sect3>
     </sect2>
+
+    <sect2 id="zend.filter.introduction.caveats">
+        <title>Double filtering</title>
+
+        <para>
+            When using two filters after each other you have to keep in mind that it is often not
+            possible to get the original output by using the opposite filter. Take the following
+            example:
+        </para>
+
+        <programlisting language="php"><![CDATA[
+$original = "my_original_content";
+
+// Attach a filter
+$filter   = new Zend_Filter_Word_UnderscoreToCamelCase();
+$filtered = $filter->filter($original);
+
+// Use it's opposite
+$filter2  = new Zend_Filter_Word_CamelCaseToUnderscore();
+$filtered = $filter2->filter($filtered)
+]]></programlisting>
+
+        <para>
+            The above code example could lead to the impression that you will get the original
+            output after the second filter has been applied. But thinking logically this is not the
+            case. After applying the first filter <emphasis>my_original_content</emphasis> will be
+            changed to <emphasis>MyOriginalContent</emphasis>. But after applying the second filter
+            the result is <emphasis>My_Original_Content</emphasis>.
+        </para>
+
+        <para>
+            As you can see it is not always possible to get the original output by using a filter
+            which seems to be the opposite. It depends on the filter and also on the given input.
+        </para>
+    </sect2>
 </sect1>
 <!--
 vim:se ts=4 sw=4 et:

+ 21 - 21
documentation/manual/ja/module_specs/Zend_Form-Forms.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 20774 -->
+<!-- EN-Revision: 22147 -->
 <sect1 id="zend.form.forms">
     <title>Zend_Form によるフォームの作成</title>
 
@@ -444,7 +444,7 @@ $form->setElementDecorators(
                     たとえば、すべての値を <methodname>trim()</methodname> するなどです。
                 </para>
 
-        <programlisting language="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 $form->setElementFilters(array('StringTrim'));
 ]]></programlisting>
             </example>
@@ -914,7 +914,7 @@ $form->setDefaultDisplayGroupClass('My_DisplayGroup');
             サブフォームは <classname>Zend_Form</classname> のオブジェクトです。一般的には
             <classname>Zend_Form_SubForm</classname> のオブジェクトとなります。
             後者のクラスには、大きなフォームに含めるのに適したデコレータが含まれています
-            (HTML の form タグをレンダリングせず、要素をグループ化するものです)。
+            (<acronym>HTML</acronym> の form タグをレンダリングせず、要素をグループ化するものです)。
             サブフォームをアタッチするには、単にそれを要素に追加して名前を指定するだけです。
         </para>
 
@@ -1011,11 +1011,11 @@ $form->setSubFormDecorators(array(
         <para>
             フォームで一番大切なのはフォームが含む要素ですが、
             フォームにはそれ以外のメタデータも含まれます。たとえばフォームの名前
-            (この名前は、HTML のマークアップ時に ID として用いられます)
+            (この名前は、<acronym>HTML</acronym> のマークアップ時に ID として用いられます)
             やアクション、そしてメソッドなどです。
             要素や表示グループ、サブフォームの数も含まれます。
             それ以外にも任意のメタデータを含めることができます
-            (通常は、form タグで指定する HTML 属性などをここに含めます)。
+            (通常は、form タグで指定する <acronym>HTML</acronym> 属性などをここに含めます)。
         </para>
 
         <para>
@@ -1069,7 +1069,7 @@ $form->setAction('/user/login')
         </note>
 
         <para>
-            <classname>Zend_Form</classname> は <code>Countable</code>
+            <classname>Zend_Form</classname> は <classname>Countable</classname>
             インターフェイスを実装しており、count 関数の引数として使用できます。
         </para>
 
@@ -1152,7 +1152,7 @@ $form->setDecorators(array(
 
         <para>
             フォームオブジェクトに設定した任意の属性は、
-            HTML の <code>&lt;form&gt;</code> タグの属性となります。
+            <acronym>HTML</acronym> の <emphasis>&lt;form&gt;</emphasis> タグの属性となります。
         </para>
 
         <note>
@@ -1226,8 +1226,8 @@ $fooBar  = $form->getDecorator('FooBar');
 
         <para>
             独自のデコレータを使用してフォームを作成することもできます。
-            一般的な使用例としては、作成したい HTML が厳密に決まっている場合などがあります。
-            デコレータでそれとまったく同じ HTML を作成し、単純にそれを返せばいいのです。
+            一般的な使用例としては、作成したい <acronym>HTML</acronym> が厳密に決まっている場合などがあります。
+            デコレータでそれとまったく同じ <acronym>HTML</acronym> を作成し、単純にそれを返せばいいのです。
             個々の要素や表示グループに対してもそれぞれデコレータを使用できます。
         </para>
 
@@ -1702,17 +1702,17 @@ $validValues = $form->getValidValues($_POST);
 
         <itemizedlist>
             <listitem><para>
-                    <code>prefixPaths</code> は
+                    <property>prefixPath</property> は
                     <methodname>addPrefixPaths()</methodname> に渡されます。
             </para></listitem>
 
             <listitem><para>
-                <code>elementPrefixPaths</code> は
+                <property>elementPrefixPath</property> は
                 <methodname>addElementPrefixPaths()</methodname> に渡されます。
             </para></listitem>
 
             <listitem><para>
-                <code>displayGroupPrefixPaths</code> は
+                <property>displayGroupPrefixPath</property> は
                 <methodname>addDisplayGroupPrefixPaths()</methodname> に渡されます。
             </para></listitem>
 
@@ -1720,21 +1720,21 @@ $validValues = $form->getValidValues($_POST);
                 <para>以下のセッターはこの方式では設定できません。</para>
 
                 <itemizedlist>
-                    <listitem><para><code>setAttrib (ただし、setAttribs は動作します)</code></para></listitem>
+                    <listitem><para><property>setAttrib (ただし、setAttribs は動作します)</property></para></listitem>
 
-                    <listitem><para><code>setConfig</code></para></listitem>
+                    <listitem><para><property>setConfig</property></para></listitem>
 
-                    <listitem><para><code>setDefault</code></para></listitem>
+                    <listitem><para><property>setDefault</property></para></listitem>
 
-                    <listitem><para><code>setOptions</code></para></listitem>
+                    <listitem><para><property>setOptions</property></para></listitem>
 
-                    <listitem><para><code>setPluginLoader</code></para></listitem>
+                    <listitem><para><property>setPluginLoader</property></para></listitem>
 
-                    <listitem><para><code>setSubForms</code></para></listitem>
+                    <listitem><para><property>setSubForms</property></para></listitem>
 
-                    <listitem><para><code>setTranslator</code></para></listitem>
+                    <listitem><para><property>setTranslator</property></para></listitem>
 
-                    <listitem><para><code>setView</code></para></listitem>
+                    <listitem><para><property>setView</property></para></listitem>
                 </itemizedlist>
             </listitem>
         </itemizedlist>
@@ -1837,7 +1837,7 @@ class My_Form_Login extends Zend_Form
 
         $password = new Zend_Form_Element_Password('password');
         $password->class = 'formtext';
-        $password->setLabel('Username:')
+        $password->setLabel('Password:')
                  ->setDecorators(array(
                      array('ViewHelper',
                            array('helper' => 'formPassword')),

+ 43 - 1
documentation/manual/ja/module_specs/Zend_Translate-Additional.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 22585 -->
+<!-- EN-Revision: 22725 -->
 <sect1 id="zend.translate.additional">
 
     <title>翻訳用の追加機能</title>
@@ -174,6 +174,17 @@ $translate->addTranslation(
                             <emphasis>Untranslated message within '%locale%': %message%</emphasis>
                         </entry>
                     </row>
+
+                     <row>
+                        <entry>logPriority</entry>
+                        <entry>all</entry>
+                        <entry>The priority which is used to write the message into the log</entry>
+
+                        <entry>
+                            <emphasis>5</emphasis>
+                        </entry>
+                    </row>
+
                     <row>
                         <entry>logUntranslated</entry>
                         <entry>すべて</entry>
@@ -1165,6 +1176,37 @@ $translate->translate('unknown string');
 ]]></programlisting>
         </example>
 
+        <para>
+            Additionally you are also able to change the priority which is used to write the message
+            into the log. Per default the priority <emphasis>Zend_Log::NOTICE</emphasis> is used.
+            It equals with <emphasis>5</emphasis>. When you want to change the priority you can use
+            any of <classname>Zend_Log</classname>'s priorities. See the following example:
+        </para>
+
+        <example id="zend.translate.additional.logging.example3">
+            <title>Self defined log priority</title>
+
+            <programlisting language="php"><![CDATA[
+// Create a log instance
+$writer = new Zend_Log_Writer_Stream('/path/to/file.log');
+$log    = new Zend_Log($writer);
+
+$translate = new Zend_Translate(
+    array(
+        'adapter' => 'gettext',
+        'content' => $path,
+        'locale'  => 'de',
+        'log'             => $log,
+        'logMessage'      => "Missing '%message%' within locale '%locale%'",
+        'logPriority'     => Zend_Log::ALERT,
+        'logUntranslated' => true
+    )
+);
+
+$translate->translate('unknown string');
+]]></programlisting>
+        </example>
+
     </sect2>
 
     <sect2 id="zend.translate.additional.sourcedata">

+ 2 - 2
documentation/manual/ja/module_specs/Zend_Validate-Hostname.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 21821 -->
+<!-- EN-Revision: 22146 -->
 <sect2 id="zend.validate.set.hostname">
 
     <title>ホスト名</title>
@@ -8,7 +8,7 @@
     <para>
         <classname>Zend_Validate_Hostname</classname> は、ホスト名が仕様を満たしているかどうかの検証を行います。
         三種類の形式のホスト名、つまり <acronym>DNS</acronym> ホスト名
-        (たとえば domain.com)、IP アドレス (たとえば 1.2.3.4)
+        (たとえば <filename>domain.com</filename>)、IP アドレス (たとえば 1.2.3.4)
         そしてローカルホスト名 (たとえば localhost) の検証が可能です。
         デフォルトでは <acronym>DNS</acronym> ホスト名のみが有効となります。
     </para>