Просмотр исходного кода

[DOCUMENTATION] French:
- sync manual

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16738 44c647ce-9c0f-0410-b52a-842ac1e357ba

mikaelkael 16 лет назад
Родитель
Сommit
f3e9ae84d2

+ 40 - 1
documentation/manual/fr/module_specs/Zend_Paginator-Usage.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 15617 -->
+<!-- EN-Revision: 16153 -->
 <!-- Reviewed: no -->
 <sect1 id="zend.paginator.usage">
     <title>Utilisation</title>
@@ -169,6 +169,45 @@ $this->view->paginator = $paginator;
 ]]></programlisting></para>
         </sect2>
 
+        <sect2 id="zend.paginator.usage.dbselect">
+            <title>The DbSelect and DbTableSelect adapter</title>
+            <para>
+                The usage of most adapters is pretty straight-forward. However, the
+                database adapters require a more detailed explanation. Contrary to popular
+                believe, these adapters do NOT fetch all records from the database in order to count them.
+                Instead, the adapters manipulates the original query to produce the corresponding
+                COUNT query. Paginator then executes that COUNT query to get the number of rows.
+                This does require an extra round-trip to the database, but this is many times
+                faster than fetching an entire result set and using count(). Especially with
+                large collections of data.
+            </para>
+            
+            <para>
+                The database adapters will try and build the most efficient query that will execute
+                on pretty much all modern databases. However, depending on your database or even your
+                own schema setup, there might be more efficient ways to get a rowcount. For this scenario
+                the database adapters allow you to set a custom COUNT query. For example,
+                if you keep track of the count of blog posts in a separate table, you could achieve a
+                faster count query with the following setup:  
+            </para>
+            
+            <programlisting language="php"><![CDATA[
+$adapter = new Zend_Paginator_Adapter_DbSelect($db->select()->from('posts'));
+$adapter->setRowCount(
+    $db->select()->from('item_counts', array(Zend_Paginator_Adapter_DbSelect::ROW_COUNT_COLUMN => 'post_count')) 
+)
+ 
+$paginator = new Zend_Paginator($adapter);
+]]></programlisting>
+    
+            <para>
+                This approach will probably not give you a huge performance gain on
+                small collections and/or simple select queries. However, with complex
+                queries and large collections, a similar approach could give you a 
+                significant performance boost.
+            </para>
+        </sect2>
+
         <sect2 id="zend.paginator.rendering">
             <title>Rendre des pages avec les scripts de vue</title>
 

+ 73 - 1
documentation/manual/fr/module_specs/Zend_Validate.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 15617 -->
+<!-- EN-Revision: 16286 -->
 <!-- Reviewed: no -->
 <sect1 id="zend.validate.introduction">
     <title>Introduction</title>
@@ -216,6 +216,78 @@ if (Zend_Validate::is($value, 'Between', array(1, 12))) {
             demande pour traiter l'ensemble de données saisies. Voir <xref
             linkend="zend.filter.input" />.
         </para>
+
+        <sect3 id="zend.validate.introduction.static.namespaces">
+
+            <para>
+                When working with self defined validators you can give a forth parameter
+                to <methodname>Zend_Validate::is()</methodname> which is the namespace
+                where your validator can be found.
+            </para>
+
+            <programlisting language="php"><![CDATA[
+if (Zend_Validate::is($value, 'MyValidator', array(1, 12),
+                      array('FirstNamespace', 'SecondNamespace')) {
+    // Yes, $value is ok
+}
+]]></programlisting>
+
+            <para>
+                <classname>Zend_Validate</classname> allows also to set namespaces as default.
+                This means that you can set them once in your bootstrap and have not to give
+                them again for each call of <methodname>Zend_Validate::is()</methodname>. The
+                following code snippet is identical to the above one.
+            </para>
+
+            <programlisting language="php"><![CDATA[
+Zend_Validate::setDefaultNamespaces(array('FirstNamespace', 'SecondNamespace'));
+if (Zend_Validate::is($value, 'MyValidator', array(1, 12)) {
+    // Yes, $value is ok
+}
+
+if (Zend_Validate::is($value, 'OtherValidator', array(1, 12)) {
+    // Yes, $value is ok
+}
+]]></programlisting>
+
+            <para>
+                For your convinience there are following methods which allow the handling of
+                namespaces:
+            </para>
+
+            <itemizedlist>
+                <listitem>
+                    <para>
+                        <emphasis><methodname>Zend_Validator::getDefaultNamespaces()</methodname></emphasis>:
+                        Returns all set default namespaces as array.
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        <emphasis><methodname>Zend_Validator::setDefaultNamespaces()</methodname></emphasis>:
+                        Sets new default namespaces and overrides any previous set. It accepts
+                        eighter a string for a single namespace of an array for multiple namespaces.
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        <emphasis><methodname>Zend_Validator::addDefaultNamespaces()</methodname></emphasis>:
+                        Adds additional namespaces to already set ones. It accepts eighter a string
+                        for a single namespace of an array for multiple namespaces.
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        <emphasis><methodname>Zend_Validator::hasDefaultNamespaces()</methodname></emphasis>:
+                        Returns true when one or more default namespaces are set, and false when no
+                        default namespaces are set.
+                    </para>
+                </listitem>
+            </itemizedlist>
+        </sect3>
     </sect2>
 
     <sect2 id="zend.validate.introduction.translation">

+ 2 - 2
documentation/manual/fr/module_specs/Zend_View-Helpers-HeadStyle.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 15617 -->
+<!-- EN-Revision: 16375 -->
 <!-- Reviewed: no -->
 <sect3 id="zend.view.helpers.initial.headstyle">
     <title>L'aide de vue HeadStyle</title>
@@ -14,7 +14,7 @@
 
         <para>
             <link linkend="zend.view.helpers.initial.headlink">HeadLink</link> devrait être
-            utilisé pour inclure des feuilles de styles externes. <code>HeadScript</code> ne devrait
+            utilisé pour inclure des feuilles de styles externes. <code>HeadStyle</code> ne devrait
             être utilisé que si vous souhaitez définir des feuilles de styles internes.
         </para>
     </note>

+ 5 - 5
documentation/manual/fr/module_specs/Zend_View-Helpers-HtmlObject.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 15617 -->
+<!-- EN-Revision: 16376 -->
 <!-- Reviewed: no -->
 <sect3 id="zend.view.helpers.initial.object">
     <title>L'aide de vue HTML Object</title>
@@ -15,28 +15,28 @@
     <itemizedlist>
         <listitem>
             <para>
-                <code>formFlash</code> : génère le balisage pour l'inclusion de fichiers
+                <code>htmlFlash</code> : génère le balisage pour l'inclusion de fichiers
                 Flash.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>formObject</code> : génère le balisage pour l'inclusion d'objets
+                <code>htmlObject</code> : génère le balisage pour l'inclusion d'objets
                 personnalisés.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>formPage</code> : génère le balisage pour l'inclusion d'autres pages
+                <code>htmlPage</code> : génère le balisage pour l'inclusion d'autres pages
                 (X)HTML.
             </para>
         </listitem>
 
         <listitem>
             <para>
-                <code>formQuicktime</code> : génère le balisage pour l'inclusion de fichiers
+                <code>htmlQuicktime</code> : génère le balisage pour l'inclusion de fichiers
                 QuickTime.
             </para>
         </listitem>

+ 4 - 1
documentation/manual/fr/module_specs/Zend_View-Helpers.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 15617 -->
+<!-- EN-Revision: 16579 -->
 <!-- Reviewed: no -->
 <sect1 id="zend.view.helpers" xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>Aides de vue</title>
@@ -376,6 +376,9 @@ array('us' => 'Etats-Unis', 'fr' => 'France', 'de' => 'Allemagne').
 ]]></programlisting>
 
         <xi:include href="Zend_View-Helpers-Action.xml" />
+        <xi:include href="Zend_View-Helpers-BaseUrl.xml">
+            <xi:fallback><xi:include href="../../en/module_specs/Zend_View-Helpers-BaseUrl.xml" /></xi:fallback>
+        </xi:include>
         <xi:include href="Zend_View-Helpers-Cycle.xml">
             <xi:fallback><xi:include href="../../en/module_specs/Zend_View-Helpers-Cycle.xml" /></xi:fallback>
         </xi:include>