Преглед изворни кода

[MANUAL] German:

- sync to r19720

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19801 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas пре 16 година
родитељ
комит
76057990bb

+ 87 - 0
documentation/manual/de/module_specs/Zend_Markup-Getting-Started.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- EN-Revision: 19720 -->
+<!-- Reviewed: no -->
+<sect1 id="zend.markup.getting-started">
+    <title>Beginnen mit Zend_Markup</title>
+
+    <para>
+        This guide to get you started with <classname>Zend_Markup</classname> uses the BBCode parser
+        and <acronym>HTML</acronym> renderer. The priciples discussed can be adapted to other
+        parsers and renderers.
+    </para>
+
+    <example id="zend.markup.getting-started.basic-usage">
+        <title>Basic Zend_Markup Usage</title>
+
+        <para>
+            We will first instantiate a <classname>Zend_Markup_Renderer_Html</classname> object
+            using the <methodname>Zend_Markup::factory()</methodname> method.  This will also create
+            a <classname>Zend_Markup_Parser_Bbcode</classname> object which will be added to the
+            renderer object.
+        </para>
+
+        <para>
+            Afther that, we will use the <methodname>render()</methodname> method to convert a piece
+            of BBCode to <acronym>HTML</acronym>.
+        </para>
+
+        <programlisting language="php"><![CDATA[
+// Creates instance of Zend_Markup_Renderer_Html,
+// with Zend_Markup_Parser_BbCode as its parser
+$bbcode = Zend_Markup::factory('Bbcode');
+
+echo $bbcode->render('[b]bold text[/b] and [i]cursive text[/i]');
+// Outputs: '<strong>bold text</strong> and <em>cursive text</em>'
+]]></programlisting>
+    </example>
+
+    <example id="zend.markup.getting-started.complicated-example">
+        <title>A more complicated example of Zend_Markup</title>
+
+        <para>
+            This time, we will do exactly the same as above, but with more complicated BBCode
+            markup.
+        </para>
+
+        <programlisting language="php"><![CDATA[
+$bbcode = Zend_Markup::factory('Bbcode');
+
+$input = <<<EOT
+[list]
+[*]Zend Framework
+[*]Foobar
+[/list]
+EOT;
+
+echo $bbcode->render($input);
+/*
+Should output something like:
+<ul>
+<li>Zend Framework</li>
+<li>Foobar</li>
+</ul>
+*/
+]]></programlisting>
+    </example>
+
+    <example id="zend.markup.getting-started.incorrect-input">
+        <title>Processing incorrect input</title>
+
+        <para>
+            Besides simply parsing and rendering markup such as BBCode,
+            <classname>Zend_Markup</classname> is also able to handle incorrect input. Most BBCode
+            processors are not able to render all input to <acronym>XHTML</acronym> valid output.
+            <classname>Zend_Markup</classname> corrects input that is nested incorrectly, and also
+            closes tags that were not closed:
+        </para>
+
+        <programlisting language="php"><![CDATA[
+$bbcode = Zend_Markup::factory('Bbcode');
+
+echo $bbcode->render('some [i]wrong [b]sample [/i] text');
+// Note that the '[b]' tag is never closed, and is also incorrectly
+// nested; regardless, Zend_Markup renders it correctly as:
+// some <em>wrong <strong>sample </strong></em><strong> text</strong>
+]]></programlisting>
+    </example>
+</sect1>

+ 226 - 0
documentation/manual/de/module_specs/Zend_Markup-Parsers.xml

@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- EN-Revision: 19720 -->
+<!-- Reviewed: no -->
+<sect1 id="zend.markup.parsers">
+    <title>Zend_Markup Parsers</title>
+
+    <para>
+        <classname>Zend_Markup</classname> is currently shipped with two parsers, a BBCode parser
+        and a Textile parser.
+    </para>
+
+    <sect2 id="zend.markup.parsers.theory">
+        <title>Theory of Parsing</title>
+
+        <para>
+            The parsers of <classname>Zend_Markup</classname> are classes that convert text with
+            markup to a token tree. Although we are using the BBCode parser as example here, the
+            idea of the token tree remains the same across all parsers. We will start with this
+            piece of BBCode for example:
+        </para>
+
+        <programlisting><![CDATA[
+[b]foo[i]bar[/i][/b]baz
+]]></programlisting>
+
+        <para>
+            Then the BBCode parser will take that value, tear it apart and create the following
+            tree:
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>[b]</para>
+
+                <itemizedlist>
+                    <listitem>
+                        <para>foo</para>
+                    </listitem>
+
+                    <listitem>
+                        <para>[i]</para>
+
+                        <itemizedlist>
+                            <listitem>
+                                <para>bar</para>
+                            </listitem>
+                        </itemizedlist>
+                    </listitem>
+                </itemizedlist>
+            </listitem>
+
+            <listitem>
+                <para>baz</para>
+            </listitem>
+        </itemizedlist>
+
+        <para>
+            You will notice that the closing tags are gone, they don't show up as content in the
+            tree structure. This is because the closing tag isn't part of the actual content.
+            Although, this does not mean that the closing tag is just lost, it is stored inside the
+            tag information for the tag itself. Also, please note that this is just a simplified
+            view of the tree itself. The actual tree contains a lot more information, like the tag's
+            attributes and its name.
+        </para>
+    </sect2>
+
+    <sect2 id="zend.markup.parsers.bbcode">
+        <title>The BBCode parser</title>
+
+        <para>
+            The BBCode parser is a <classname>Zend_Markup</classname> parser that converts BBCode to
+            a token tree. The syntax of all BBCode tags is:
+        </para>
+
+        <programlisting language="text"><![CDATA[
+[name(=(value|"value"))( attribute=(value|"value"))*]
+]]></programlisting>
+
+        <para>
+            Some examples of valid BBCode tags are:
+        </para>
+
+        <programlisting><![CDATA[
+[b]
+[list=1]
+[code file=Zend/Markup.php]
+[url="http://framework.zend.com/" title="Zend Framework!"]
+]]></programlisting>
+
+        <para>
+            By default, all tags are closed by using the format '[/tagname]'.
+        </para>
+    </sect2>
+
+    <sect2 id="zend.markup.parsers.textile">
+        <title>The Textile parser</title>
+
+        <para>
+            The Textile parser is a <classname>Zend_Markup</classname> parser that converts Textile
+            to a token tree. Because Textile doesn't have a tag structure, the following is a list
+            of example tags:
+        </para>
+
+        <table id="zend.markup.parsers.textile.tags">
+            <title>List of basic Textile tags</title>
+
+            <tgroup cols="2" align="left" colsep="1" rowsep="1">
+                <thead>
+                    <row>
+                        <entry>Sample input</entry>
+
+                        <entry>Sample output</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry>*foo*</entry>
+
+                        <entry><![CDATA[<strong>foo</strong>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>_foo_</entry>
+
+                        <entry><![CDATA[<em>foo</em>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>??foo??</entry>
+
+                        <entry><![CDATA[<cite>foo</cite>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>-foo-</entry>
+
+                        <entry><![CDATA[<del>foo</del>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>+foo+</entry>
+
+                        <entry><![CDATA[<ins>foo</ins>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>^foo^</entry>
+
+                        <entry><![CDATA[<sup>foo</sup>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>~foo~</entry>
+
+                        <entry><![CDATA[<sub>foo</sub>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>%foo%</entry>
+
+                        <entry><![CDATA[<span>foo</span>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>PHP(PHP Hypertext Preprocessor)</entry>
+
+                        <entry><![CDATA[<acronym title="PHP Hypertext Preprocessor">PHP</acronym>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>"Zend Framework":http://framework.zend.com/</entry>
+
+                        <entry><![CDATA[<a href="http://framework.zend.com/">Zend Framework</a>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>h1. foobar</entry>
+
+                        <entry><![CDATA[<h1>foobar</h1>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>h6. foobar</entry>
+
+                        <entry><![CDATA[<h6>foobar</h6>]]></entry>
+                    </row>
+
+                    <row>
+                        <entry>!http://framework.zend.com/images/logo.gif!</entry>
+
+                        <entry><![CDATA[<img src="http://framework.zend.com/images/logo.gif" />]]></entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <para>
+            Also, the Textile parser wraps all tags into paragraphs; a paragraph ends with two
+            newlines, and if there are more tags, a new paragraph will be added.
+        </para>
+
+        <sect3 id="zend.markup.parsers.textile.lists">
+            <title>Lists</title>
+
+            <para>
+                The Textile parser also supports two types of lists. The numeric type, using the "#"
+                character and bullit-lists using the "*" character. An example of both lists:
+            </para>
+
+            <programlisting><![CDATA[
+# Item 1
+# Item 2
+
+* Item 1
+* Item 2
+]]></programlisting>
+
+            <para>
+                The above will generate two lists: the first, numbered; and the second, bulleted.
+                Inside list items, you can use normal tags like strong (*), and emphasized (_). Tags
+                that need to start on a new line (like 'h1' etc.) cannot be used inside lists.
+            </para>
+        </sect3>
+    </sect2>
+</sect1>

+ 53 - 0
documentation/manual/de/module_specs/Zend_Markup-Renderers.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- EN-Revision: 19720 -->
+<!-- Reviewed: no -->
+<sect1 id="zend.markup.renderers">
+    <title>Zend_Markup Renderer</title>
+
+    <para>
+        <classname>Zend_Markup</classname> wird aktuell mit einem Renderer ausgeliefert, dem
+        <acronym>HTML</acronym> Renderer.
+    </para>
+
+    <sect2 id="zend.markup.renderers.add">
+        <title>Eigene Tags hinzufügen</title>
+
+        <para>
+            Indem man eigene Tags hinzufügt, kann man den <classname>Zend_Markup</classname>
+            Renderern eigene Funktionalitäten hinzufügen. Mit der Tag Struktur kann man jede
+            Funktionalität welche man haben will hinzufügen. Von einfachen Tags bis zu komplizierten
+            Tag Strukturen. Ein einfaches Beispiel für ein 'foo' Tag:
+        </para>
+
+        <programlisting language="php"><![CDATA[
+// Erstellt eine Instanz von Zend_Markup_Renderer_Html,
+// mit Zend_Markup_Parser_BbCode als seinen Parser
+$bbcode = Zend_Markup::factory('Bbcode');
+
+// Dies erstellt ein einfaches 'foo' Tag
+// Der erste Parameter definiert den Namen des Tags
+// Der zweite Parameter nimmt ein Integer welche den Typ des Tags definiert
+// Der dritte Parameter ist ein Array die andere Dinge des Tags definiert
+// wie die Gruppe des Tags, und (in diesem Fall) ein Start und Ende Tag
+$bbcode->addTag(
+    'foo',
+    Zend_Markup_Renderer_RendererAbstract::TYPE_REPLACE
+        | Zend_Markup_Renderer_RendererAbstract::TAG_NORMAL,
+    array(
+        'start' => '-bar-',
+        'end'   => '-baz-',
+        'group' => 'inline',
+    )
+);
+
+// Jetzt gibt dies folgendes aus: 'my -bar-tag-baz-'
+echo $bbcode->render('my [foo]tag[/foo]');
+]]></programlisting>
+
+        <para>
+            Es gilt zu beachten das die Erstellung eigener Tag nur dann Sinn macht wenn der eigene
+            Parser diese auch in einer Tag Struktur unterstützt. Aktuell unterstützt dies nur
+            BBCode. Textile hat keine Unterstützung für eigene Tags.
+        </para>
+    </sect2>
+</sect1>

+ 21 - 0
documentation/manual/de/module_specs/Zend_Markup.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- EN-Revision: 19720 -->
+<!-- Reviewed: no -->
+<sect1 id="zend.markup.introduction">
+    <title>Einführung</title>
+
+    <para>
+        Die Komponente <classname>Zend_Markup</classname> bietet einen erweiterbaren Weg für das
+        Parsen von Text und die Darstellung von leichtgewichtigen Markup Sprachen wie BBcode und
+        Textile. Sie ist ab Zend Framework Version 1.10 vorhanden.
+    </para>
+
+    <para>
+        <classname>Zend_Markup</classname> verwendet eine Factory Methode um eine Instanz eines
+        Renderers zu instanzieren der <classname>Zend_Markup_Renderer_Abstract</classname>
+        erweitert. Die Factory Methode akzeptiert drei Argumente. Der erste ist der Parser welcher
+        verwendet wird um den Text in Token zu zerlegen (z.B. BbCode). Der zweite (optionale)
+        Parameter ist der Renderer der verwendet wird. Er ist standardmäßig Html. Drittens ein
+        Array mit Optionen die spezifiziert werden können und mit dem Renderer verwendet werden.
+    </para>
+</sect1>

+ 4 - 4
documentation/manual/de/ref/project-structure.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 18656 -->
+<!-- EN-Revision: 19711 -->
 <!-- Reviewed: no -->
 <appendix id="project-structure">
     <title>Vorgeschlagene Struktur für die Projekt Struktur von Zend Framework MVC Anwendungen</title>
@@ -39,7 +39,7 @@
     <sect1 id="project-structure.project">
         <title>Vorgeschlagene Verzeichnis Struktur für Projekte</title>
 
-        <programlisting language="txt"><![CDATA[
+        <programlisting language="text"><![CDATA[
 <project name>/
     application/
         configs/
@@ -264,7 +264,7 @@
             entsprechen:
         </para>
 
-        <programlisting language="xml"><![CDATA[
+        <programlisting language="text"><![CDATA[
 <modulename>/
     configs/
         application.ini
@@ -323,7 +323,7 @@
                     wenn eine passende Datei im <property>document_root</property> gefunden wurde.
                 </para>
 
-                <programlisting language="xml"><![CDATA[
+                <programlisting language="text"><![CDATA[
 <VirtualHost my.domain.com:80>
     ServerName   my.domain.com
     DocumentRoot /path/to/server/root/my.domain.com/public