Re[3]: [DOC-RU] Smarty docs sync (sorry again)
| From: | George Miroshnikov | Date: | Mon, 30 Aug 2004 16:18:12 +0000 |
| Subject: | Re[3]: [DOC-RU] Smarty docs sync (sorry again) | ||
| References: | 1 2 3 | Groups: | php.doc.ru |
| Request: | Send a blank email to doc-ru+get-454@lists.php.net to get a copy of this message | ||
Here's fixed version of previous diff.
Hope now it'll work.
Index: language-defs.ent =================================================================== RCS file: /repository/smarty/docs/ru/language-defs.ent,v retrieving revision 1.3 diff -u -r1.3 language-defs.ent --- language-defs.ent 30 Jul 2004 10:45:18 -0000 1.3 +++ language-defs.ent 30 Aug 2004 15:53:37 -0000 @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <!ENTITY SMARTYManual "Ðóêîâîäñòâî ïî Smarty"> <!ENTITY SMARTYDesigners "Smarty äëÿ äèçàéíåðîâ øàáëîíîâ"> Index: language-snippets.ent =================================================================== RCS file: /repository/smarty/docs/ru/language-snippets.ent,v retrieving revision 1.3 diff -u -r1.3 language-snippets.ent --- language-snippets.ent 6 Aug 2004 10:58:34 -0000 1.3 +++ language-snippets.ent 30 Aug 2004 15:53:37 -0000 @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="windows-1251"?> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> + <!ENTITY note.parameter.merge '<note> <title>Òåõíè÷åñêîå çàìå÷àíèå</title> <para> Ïåðàìåòð <parameter>merge</parameter> ïðèíèìàåò êëþ÷è â âèäå ìàññèâà, - ïîýòîìó åñëè âû îáúåäèíÿåòå ìàññèâû ñ ÷èñëîâûìè èíäåêñàìè, òî îíè ìîãóò - íàëîæèòüñÿ äðóã íà äðóãà èëè â ðåçóëüòàòå ìîæåò ïîëó÷èòüñÿ ìàññèâ ñ + ïîýòîìó åñëè âû îáúåäèíÿåòå ìàññèâû ñ ÷èñëîâûìè èíäåêñàìè, òî îíè ìîãóò + íàëîæèòüñÿ äðóã íà äðóãà èëè â ðåçóëüòàòå ìîæåò ïîëó÷èòüñÿ ìàññèâ ñ ïðîïóùåííûìè êëþ÷àìè. Çàìåòüòå, ÷òî â îòëè÷èå îò ýòîãî, ôóíêöèÿ PHP array_merge() ïåðåíóìåðîâûâàåò ñîâïàäàþùèå ÷èñëîâûå èíäåêñû. </para> @@ -13,13 +15,13 @@ <!ENTITY parameter.compileid '<para>  êà÷åñòâå íåîáÿçàòåëüíîãî òðåòüåãî ïàðàìåòðà âû ìîæåòå ïåðåäàòü <parameter>compile_id</parameter>. Ýòî óêàçûâàåò íà òî, ÷òî âû õîòèòå - èìåòü íåñêîëüêî ðàçíûõ âåðñèé îäíîãî è òîãî æå ñêîìïèëèðîâàííîãî øàáëîíà, - íàïðèìåð, äëÿ ðàçíûõ ÿûçêîâ. Äðóãîé âàðèàíò ïðèìåíåíèÿ - <parameter>compile_id</parameter> - ýòî êîãäà ó âàñ åñòü íåñêîëüêî + èìåòü íåñêîëüêî ðàçíûõ âåðñèé îäíîãî è òîãî æå ñêîìïèëèðîâàííîãî øàáëîíà, + íàïðèìåð, äëÿ ðàçíûõ ÿûçêîâ. Äðóãîé âàðèàíò ïðèìåíåíèÿ + <parameter>compile_id</parameter> - ýòî êîãäà ó âàñ åñòü íåñêîëüêî äèðåêòîðèé ñ øàáëîíàìè ($template_dir), íî òîëüêî îäíà äèðåêòîðèÿ ñ - êîìïèëèðîâàííûìè øàáëîíàìè ($compile_dir). Óñòàíîâèòå îòäåëüíûé - <parameter>compile_id</parameter> äëÿ êàæäîé $template_dir, èíà÷å + êîìïèëèðîâàííûìè øàáëîíàìè ($compile_dir). Óñòàíîâèòå îòäåëüíûé + <parameter>compile_id</parameter> äëÿ êàæäîé $template_dir, èíà÷å îäíîèìåííûå øàáëîíû èç ðàçíûõ äèðåêòîðèé áóäóò ïåðåçàïèñûâàòü äðóã äðóãà. - Âû òàêæå ìîæåòå óêàçàòü <link linkend="variable.compile.id">$compile_id</link> + Âû òàêæå ìîæåòå óêàçàòü <link linkend="variable.compile.id">$compile_id</link> îäèí ðàç âìåñòî òîãî, ÷òîáû êàæäûé ðàç ïåðåäàâàòü åãî ýòîé ôóíêöèè. </para>'> Index: appendixes/troubleshooting.xml =================================================================== RCS file: /repository/smarty/docs/ru/appendixes/troubleshooting.xml,v retrieving revision 1.4 diff -u -r1.4 troubleshooting.xml --- appendixes/troubleshooting.xml 27 Jul 2004 06:34:53 -0000 1.4 +++ appendixes/troubleshooting.xml 30 Aug 2004 15:53:39 -0000 @@ -1,53 +1,60 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.4 $ --> -<chapter id="troubleshooting"> - <title>Troubleshooting</title> - <sect1 id="smarty.php.errors"> - <title>Smarty/PHP errors</title> - <para> - Smarty can catch many errors such as missing tag attributes - or malformed variable names. If this happens, you will see an error - similar to the following: - </para> - <example> - <title>Smarty errors</title> - <programlisting> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> + <chapter id="troubleshooting"> + <title>Ðåøåíèå ïðîáëåì</title> + <para></para> + <sect1 id="smarty.php.errors"> + <title>Îøèáêè Smarty/PHP</title> + <para> + Smarty ìîæåò ëîâèòü ìíîãèå îøèáêè, íàïðèìåð îòñóòñòâóþùèå àòòðèáóòû + òýãîâ èëè íåäîïóñòèìûå èìåíà ïåðåìåííûõ. Åñëè ýòî ïðîèçîéäåò, âû óâèäèòå + îøèáêó íàïîäîáèå ñëåäóþùåé: + </para> + <example> + <title>Îøèáêà Smarty</title> + <screen> +<![CDATA[ Warning: Smarty: [in index.tpl line 4]: syntax error: unknown tag - '%blah' -in /path/to/smarty/Smarty.class.php on line 1041 + in /path/to/smarty/Smarty.class.php on line 1041 Fatal error: Smarty: [in index.tpl line 28]: syntax error: missing section name -in /path/to/smarty/Smarty.class.php on line 1041 - </programlisting> - </example> - <para> - Smarty shows you the template name, the line number and the error. - After that, the error consists of the actual line number in the Smarty - class that the error occured. - </para> - - <para> - There are certain errors that Smarty cannot catch, such as missing - close tags. These types of errors usually end up in PHP compile-time - parsing errors. - </para> - <example> - <title>PHP parsing errors</title> - <programlisting> + in /path/to/smarty/Smarty.class.php on line 1041 +]]> + </screen> + </example> + <para> + Smarty ïîêàæåò âàì èìÿ øàáëîíà, íîìåð ñòðîêè è îøèáêó. + Äàëåå ñîîáùåíèå îá îøèáêå ñîñòîèò èç ôàêòè÷åñêîãî íîìåðà ñòðîêè â êëàññå + Smarty, ãäå âîçíèêëà îøèáêà. + </para> + + <para> + Åñòü îïðåäåëåííûå îøèáêè, êîòîðûå íå ìîæåò ïîéìàòü Smarty, íàïðèìåð + îòñóòñòâóþùèå çàêðûâàþùèå òýãè. Òàêèå îøèáêè îáû÷íî ïðèâîäÿò ê îøèáêàì + ðàçáîðà PHP íà ýòàïå êîìïèëÿöèè. + </para> + + <example> + <title>Îøèáêè ðàçáîðà PHP</title> + <screen> +<![CDATA[ Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75 - </programlisting> - </example> - - <para> - When you encounter a PHP parsing error, the error line number will - correspond to the compiled PHP script, not the template itself. Usually - you can look at the template and spot the syntax error. Here are some - common things to look for: missing close tags for {if}{/if} or - {section}{/section}, or syntax of logic within an {if} tag. If you - can't find the error, you might have to open the compiled PHP file and - go to the line number to figure out where the corresponding error is in - the template. - </para> - </sect1> +]]> + </screen> + </example> + + <para> + Êîãäà âû âñòðå÷àåòåñü ñ îøèáêîé ðàçáîðà PHP, íîìåð ñòðîêè, â êîòîðîé + äîïóùåíà îøèáêà, áóäåò ñîîòâåòñòâîâàòü ñêîìïèëèðîâàííîìó PHP-ñêðèïòó, + à íå ñàìîìó øàáëîíó. Îáû÷íî âû ìîæåòå ïîñìîòðåòü íà øàáëîí è óâèäèòü + ñèíòàêñè÷åñêóþ îøèáêó. Òèïè÷íûå îøèáêè: îòñóòñòâóþùèå çàêðûâàþùèå òýãè + äëÿ {if}{/if} èëè {section}{/section}, èëè ñèíòàêñèñ ëîãèêè âíóòðè òýãà {if}. + Åñëè âû íå ìîæåòå íàéòè îøèáêó, âàì ìîæåò ïîíàäîáèòüñÿ îòêðûòü ñêîìïèëèðîâàííûé + PHP-ôàéë è ïåðåéòè ê íîìåðó ñòðîêè ÷òîáû âûÿñíèòü, â ÷¸ì çàêëþ÷àåòñÿ îøèáêà + â øàáëîíå. + </para> + </sect1> </chapter> <!-- Keep this comment at the end of the file Local variables: Index: designers/language-builtin-functions/language-function-foreach.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-builtin-functions/language-function-foreach.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-foreach.xml --- designers/language-builtin-functions/language-function-foreach.xml 19 Jul 2004 13:11:25 -0000 1.3 +++ designers/language-builtin-functions/language-function-foreach.xml 30 Aug 2004 15:53:42 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.foreach"> <title>foreach,foreachelse</title> @@ -15,7 +15,7 @@ <row> <entry>Èìÿ àòòðèáóòà</entry> <entry>Òèï</entry> - <entry>Îáÿçàòåëåí</entry> + <entry>Îáÿçàòåëåí</entry> <entry>Ïî óìîë÷àíèþ</entry> <entry>Îïèñàíèå</entry> </row> @@ -23,17 +23,17 @@ <tbody> <row> <entry>from</entry> - <entry>ñòðîêà (string)</entry> + <entry>ìàññèâ (array)</entry> <entry>Äà</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ìàññèâà, ïî êîòîðîìó íàäî ïðîéòèñü</entry> + <entry>Ìàññèâ, ïî êîòîðîìó íàäî ïðîéòèñü</entry> </row> <row> <entry>item</entry> <entry>ñòðîêà (string)</entry> <entry>Äà</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â + <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â êà÷åñòâå çíà÷åíèÿ òåêóùåãî åëåìåíòà</entry> </row> <row> @@ -41,7 +41,7 @@ <entry>ñòðîêà (string)</entry> <entry>Íåò</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â + <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â êà÷åñòâå êëþ÷à òåêóùåãî åëåìåíòà</entry> </row> <row> @@ -49,7 +49,7 @@ <entry>ñòðîêà (string)</entry> <entry>Íåò</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Íàçâàíèå öèêëà foreach äëÿ äîñòóïà ê åãî + <entry>Íàçâàíèå öèêëà foreach äëÿ äîñòóïà ê åãî ñâîéñòâàì</entry> </row> </tbody> @@ -58,17 +58,17 @@ <para> Öèêëû <emphasis>foreach</emphasis> ÿâëÿþòñÿ àëüòåðíàòèâîé - öèêëàì <emphasis>section</emphasis>. Öèêëû - <emphasis>foreach</emphasis> èñïîëüçóþòñÿ äëÿ ïðîõîæäåíèÿ - ïî îäíîìó ìàññèâó. Ñèíòàêñèñ <emphasis>foreach</emphasis> - íàìíîãî ïðîùå, ÷åì <emphasis>section</emphasis>, íî åãî + öèêëàì <emphasis>section</emphasis>. Öèêëû + <emphasis>foreach</emphasis> èñïîëüçóþòñÿ äëÿ ïðîõîæäåíèÿ + ïî îäíîìó ìàññèâó. Ñèíòàêñèñ <emphasis>foreach</emphasis> + íàìíîãî ïðîùå, ÷åì <emphasis>section</emphasis>, íî åãî ìîæíî èñïîëüçîâàòü òîëüêî äëÿ îäíîãî ìàññèâà. - Òýã <emphasis>foreach</emphasis> äîëæåí èìåòü â ïàðó òýã - <emphasis>/foreach</emphasis>. Îáÿçàòåëüíûå ïàðàìåòðû - + Òýã <emphasis>foreach</emphasis> äîëæåí èìåòü â ïàðó òýã + <emphasis>/foreach</emphasis>. Îáÿçàòåëüíûå ïàðàìåòðû - <emphasis>from</emphasis> è <emphasis>item</emphasis>. Íàçâàíèå - öèêëà foreach ìîæåò áûòü ëþáîé ïîñëåäîâàòåëüíîñòüþ áóêâ, öèôð + öèêëà foreach ìîæåò áûòü ëþáîé ïîñëåäîâàòåëüíîñòüþ áóêâ, öèôð è çíàêîâ ïîä÷åðêèâàíèé _. Öèêëû <emphasis>foreach</emphasis> - ìîãóò áûòü âëîæåííûå, è èìåíà âëîæåííûõ öèêëîâ äîëæíû áûòü + ìîãóò áûòü âëîæåííûå, è èìåíà âëîæåííûõ öèêëîâ äîëæíû áûòü óíèêàëüíûå. Ïåðåìåííàÿ <emphasis>from</emphasis> (îáû÷íî ìàññèâ çíà÷åíèé) óêàçûâàåò êîëè÷åñòâî èòåðàöèé öèêëà. <emphasis>foreachelse</emphasis> âûïîëíÿåòñÿ, åñëè íåòó çíà÷åíèé @@ -154,20 +154,20 @@ </para> </sect2> - <sect2 id="foreach.property.show"> + <sect2 id="foreach.property.show"> <title>show</title> <para> - Àòòðèáóò <emphasis>show</emphasis> ìîæåò ïðèíèìàòü ëîãè÷åñêèå + Àòòðèáóò <emphasis>show</emphasis> ìîæåò ïðèíèìàòü ëîãè÷åñêèå çíà÷åíèÿ (èñòèíà èëè ëîæü). Åñëè ëîæü, òî öèêë foreach íå áóäåò îòîáðàæàòüñÿ. Åñëè ïðèñóòñòâóåò òýã foreachelse, òî îí áóäåò îòîáðàæåí. </para> </sect2> - - <sect2 id="foreach.property.total"> + + <sect2 id="foreach.property.total"> <title>total</title> <para> - <emphasis>total</emphasis> õðàíèò êîëè÷åñòâî èòåðàöèé öèêëà. + <emphasis>total</emphasis> õðàíèò êîëè÷åñòâî èòåðàöèé öèêëà. Ìîæåò áûòü èñïîëüçîâàíî êàê â öèêëå, òàê è âíå åãî.. </para> </sect2> Index: designers/language-builtin-functions/language-function-literal.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-builtin-functions/language-function-literal.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-literal.xml --- designers/language-builtin-functions/language-function-literal.xml 19 Jul 2004 13:11:26 -0000 1.3 +++ designers/language-builtin-functions/language-function-literal.xml 30 Aug 2004 15:53:43 -0000 @@ -1,14 +1,17 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.literal"> <title>literal</title> <para> - Òýã Literal ïîçâîëÿåò óêàçàòü áëîê äàííûõ, êîòîðûé íå äîëæåí - áûòü îáðàáîòàí Smarty. Ýòî óäîáíî äëÿ âûâîäà javascript êîäà, - êîãäà ñèìâîëû { è } ìîãóò áûòü íå ïðàâèëüíî ïîíÿòû ïàðñåðîì - øàáëîíîâ. Âñå, ÷òî îêðóæåíî òýãàìè {literal} è {/literal} - íå îáðàáàòûâàåòñÿ è ïðîñòî îòîáðàæàåòñÿ êàê åñòü. + Òýãè literal ïîçâîëÿþò âîñïðèíèìàòü áëîêè äàííûõ áóêâàëüíî. + Îáû÷íî îíè èñïîëüçóþòñÿ âìåñòå ñ javascript èëè òàáëèöàìè ñòèëåé, â êîòîðûõ + ôèãóðíûå ñêîáêè êîíôëèêòóþò ñ ñèíòàêñèñîì ðàçäåëèòåëåé. + Âåñü òåêñò âíóòðè òýãîâ {literal}{/literal} íå èíòåðïðåòèðóåòñÿ, à âûâîäèòñÿ + "êàê åñòü". Åñëè âàì íóæíî âñòàâèòü òýãè øàáëîíîâ â áëîê literal, âàì ñëåäóåò + ïîéòè ïî äðóãîìó ïóòè è èñïîëüçîâàòü <link + linkend="language.function.ldelim">{ldelim}{rdelim}</link> äëÿ ýêðàíèðîâàíèÿ + îòäåëüíûõ ðàçäåëèòåëåé. </para> <example> <title>òýã literal</title> @@ -19,7 +22,7 @@ <!-- function isblank(field) { - if (field.value == '') + if (field.value == '') { return false; } else { @@ -55,4 +58,3 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - Index: designers/language-custom-functions/language-function-html-radios.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-custom-functions/language-function-html-radios.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-html-radios.xml --- designers/language-custom-functions/language-function-html-radios.xml 19 Jul 2004 13:11:27 -0000 1.3 +++ designers/language-custom-functions/language-function-html-radios.xml 30 Aug 2004 15:53:46 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.html.radios"> <title>html_radios</title> <informaltable frame="all"> @@ -14,7 +14,7 @@ <row> <entry>Èìÿ àòòðèáóòà</entry> <entry>Òèï</entry> - <entry>Îáÿçàòåëåí</entry> + <entry>Îáÿçàòåëåí</entry> <entry>Ïî óìîë÷àíèþ</entry> <entry>Îïèñàíèå</entry> </row> @@ -53,7 +53,7 @@ <entry>àññîöèàòèâíûé ìàññèâ</entry> <entry>Äà, åñëè íå óêàçàíû àòòðèáóòû values è output</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>àññîöèàòèâíûé ìàññèâ çíà÷åíèé è íàçâàíèé + <entry>àññîöèàòèâíûé ìàññèâ çíà÷åíèé è íàçâàíèé ýëåìåíòîâ âûáîðà</entry> </row> <row> @@ -67,64 +67,61 @@ </tgroup> </informaltable> <para> - Ïîëüçîâàòåëüñÿêàÿ ôóíêöèÿ html_radios ãåíåðèðóåò HMTL êîä + Ïîëüçîâàòåëüñÿêàÿ ôóíêöèÿ html_radios ãåíåðèðóåò HMTL êîä ãðóïïû ýëåìåíòîâ âûáîðà (radio button group). Àâòîìàòè÷åñêè - óñòàíàâëèâàåò âûáðàííîå çíà÷åíèå, åñëè îíî óêçàíî. Òðåáóåò - íàëè÷èÿ àòòðèáóòîâ values è output èëè àòòðèáóòà options. + óñòàíàâëèâàåò âûáðàííîå çíà÷åíèå, åñëè îíî óêçàíî. Òðåáóåò + íàëè÷èÿ àòòðèáóòîâ values è output èëè àòòðèáóòà options. Ñãåíåðèðîâàííûé HMTL êîä ñîâìåñòèì ñ XHTML. </para> <para> - Âñå ïàðàìåòðû, êîòîðûå íå óêàçàíû â òàáëèöå âûøå, ïåðåäàþòñÿ + Âñå ïàðàìåòðû, êîòîðûå íå óêàçàíû â òàáëèöå âûøå, ïåðåäàþòñÿ è âûâîäÿòñÿ âíóòðè êàæäîãî ñîçäàííîãî òýãà <input>. </para> <example> <title>html_radios</title> <programlisting> -<![CDATA[ - index.php: +index.php: - require('Smarty.php.class'); - $smarty = new Smarty; - $smarty->assign('cust_ids', array(1000,1001,1002,1003)); - $smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane - Johnson','Carlie Brown')); - $smarty->assign('customer_id', 1001); - $smarty->display('index.tpl'); +require('Smarty.class.php'); +$smarty = new Smarty; +$smarty->assign('cust_ids', array(1000,1001,1002,1003)); +$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane +Johnson','Charlie Brown')); +$smarty->assign('customer_id', 1001); +$smarty->display('index.tpl'); - index.tpl: +index.tpl: - {html_radios values=$cust_ids checked=$customer_id output=$cust_names separator="<br />"} +{html_radios name="id" values=$cust_ids selected=$customer_id output=$cust_names separator="<br />"} - index.php: +index.php: - require('Smarty.php.class'); - $smarty = new Smarty; - $smarty->assign('cust_radios', array( - 1001 => 'Joe Schmoe', - 1002 => 'Jack Smith', - 1003 => 'Jane Johnson', - 1004 => 'Charlie Brown')); - $smarty->assign('customer_id', 1001); - $smarty->display('index.tpl'); +require('Smarty.class.php'); +$smarty = new Smarty; +$smarty->assign('cust_radios', array( + 1000 => 'Joe Schmoe', + 1001 => 'Jack Smith', + 1002 => 'Jane Johnson', + 1003 => 'Charlie Brown')); +$smarty->assign('customer_id', 1001); +$smarty->display('index.tpl'); - index.tpl: +index.tpl: - {html_radios name="id" options=$cust_radios checked=$customer_id separator="<br />"} +{html_radios name="id" options=$cust_radios selected=$customer_id separator="<br />"} - OUTPUT: (both examples) +OUTPUT: (both examples) - <input type="radio" name="id[]" value="1000">Joe Schmoe<br /> - <input type="radio" name="id[]" value="1001" checked="checked"><br /> - <input type="radio" name="id[]" value="1002">Jane Johnson<br /> - <input type="radio" name="id[]" value="1003">Charlie Brown<br /> -]]> - </programlisting> - </example> +<input type="radio" name="id" value="1000">Joe Schmoe<br /> +<input type="radio" name="id" value="1001" checked="checked">Jack Smith<br /> +<input type="radio" name="id" value="1002">Jane Johnson<br /> +<input type="radio" name="id" value="1003">Charlie Brown<br /></programlisting> +</example> </sect1> <!-- Keep this comment at the end of the file Local variables: Index: programmers/api-functions/api-unregister-postfilter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-functions/api-unregister-postfilter.xml,v retrieving revision 1.4 diff -u -r1.4 api-unregister-postfilter.xml --- programmers/api-functions/api-unregister-postfilter.xml 2 Aug 2004 06:46:01 -0000 1.4 +++ programmers/api-functions/api-unregister-postfilter.xml 30 Aug 2004 15:53:56 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <refentry id="api.unregister.postfilter"> <refnamediv> <refname>unregister_postfilter</refname> Index: programmers/api-variables/variable-cache-modified-check.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-cache-modified-check.xml,v retrieving revision 1.3 diff -u -r1.3 variable-cache-modified-check.xml --- programmers/api-variables/variable-cache-modified-check.xml 19 Jul 2004 13:11:34 -0000 1.3 +++ programmers/api-variables/variable-cache-modified-check.xml 30 Aug 2004 15:53:57 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <sect1 id="variable.cache.modified.check"> <title>$cache_modified_check</title> <para> Index: programmers/api-variables/variable-left-delimiter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-left-delimiter.xml,v retrieving revision 1.3 diff -u -r1.3 variable-left-delimiter.xml --- programmers/api-variables/variable-left-delimiter.xml 19 Jul 2004 13:11:35 -0000 1.3 +++ programmers/api-variables/variable-left-delimiter.xml 30 Aug 2004 15:53:58 -0000 @@ -4,7 +4,7 @@ <sect1 id="variable.left.delimiter"> <title>$left_delimiter</title> <para> - Ëåâûé îãðàíè÷èòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. + Ëåâûé ðàçäåëèòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. Ïî óìîë÷àíèþ ðàâíî "{". </para> </sect1> Index: programmers/api-variables/variable-plugins-dir.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-plugins-dir.xml,v retrieving revision 1.2 diff -u -r1.2 variable-plugins-dir.xml --- programmers/api-variables/variable-plugins-dir.xml 2 Aug 2004 06:46:01 -0000 1.2 +++ programmers/api-variables/variable-plugins-dir.xml 30 Aug 2004 15:53:58 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <sect1 id="variable.plugins.dir"> <title>$plugins_dir</title> <para> Index: programmers/api-variables/variable-right-delimiter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-right-delimiter.xml,v retrieving revision 1.1 diff -u -r1.1 variable-right-delimiter.xml --- programmers/api-variables/variable-right-delimiter.xml 13 Apr 2004 11:46:22 -0000 1.1 +++ programmers/api-variables/variable-right-delimiter.xml 30 Aug 2004 15:53:58 -0000 @@ -1,10 +1,11 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<?xml version="1.0" encoding="windows-1251"?> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <sect1 id="variable.right.delimiter"> <title>$right_delimiter</title> <para> - This is the right delimiter used by the template language. - Default is "}". + Ïðàâûé ðàçäåëèòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. + Ïî óìîë÷àíèþ ðàâíî "}". </para> </sect1> <!-- Keep this comment at the end of the file Index: programmers/api-variables/variable-security-settings.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-security-settings.xml,v retrieving revision 1.1 diff -u -r1.1 variable-security-settings.xml --- programmers/api-variables/variable-security-settings.xml 13 Apr 2004 11:46:22 -0000 1.1 +++ programmers/api-variables/variable-security-settings.xml 30 Aug 2004 15:53:58 -0000 @@ -1,23 +1,25 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.1 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> + <sect1 id="variable.plugins.dir"> <sect1 id="variable.security.settings"> <title>$security_settings</title> <para> - These are used to override or specify the security settings when - security is enabled. These are the possible settings: - </para> + Ýòî èñïîëüçóåòñÿ äëÿ èçìåíåíèÿ èëè óêàçàíèÿ íàñòðîåê áåçîïàñíîñòè + êîãäà áåçîïàñíîñèòü (security) âêëþ÷åíà. Äîïóñòèìûå çíà÷åíèÿ: + /para> <itemizedlist> - <listitem><para>PHP_HANDLING - true/false. If set to true, the - $php_handling setting is not checked for security.</para></listitem> - <listitem><para>IF_FUNCS - This is an array of the names of permitted - PHP functions in IF statements.</para></listitem> - <listitem><para>INCLUDE_ANY - true/false. If set to true, any - template can be included from the file system, regardless of the - $secure_dir list.</para></listitem> - <listitem><para>PHP_TAGS - true/false. If set to true, {php}{/php} - tags are permitted in the templates.</para></listitem> - <listitem><para>MODIFIER_FUNCS - This is an array of the names of permitted - PHP functions used as variable modifiers.</para></listitem> + <listitem><para>PHP_HANDLING - true/false. Åñëè óñòàíîâëåíî â true, ïàðàìåòð + $php_handling íå ïðîâåðÿåòñÿ íà áåçîïàñíîñòü.</para></listitem> + <listitem><para>IF_FUNCS - Ýòî ìàññèâ èì¸í PHP-ôóíêöèé, ðàçðåøåííûõ + ê èñïîëüçîâàíèþ â óñëîâèÿõ IF.</para></listitem> + <listitem><para>INCLUDE_ANY - true/false. Åñëè óñòàíîâëåíî â true, ëþáîé + øàáëîí ìîæåò áûòü ïîäêëþ÷åí èç ôàéëîâîé ñèñòåìû, íåçàâèñèìî îò ñïèñêà + $secure_dir.</para></listitem> + <listitem><para>PHP_TAGS - true/false. Åñëè óñòàíîâëåíî â true, òýãè {php}{/php} + ðàçðåøåíû ê èñïîëüçîâàíèþ â øàáëîíàõ.</para></listitem> + <listitem><para>MODIFIER_FUNCS - Ýòî ìàññèâ èì¸í PHP-ôóíêöèé, ðàçðåøåííûõ + ê èñïîëüçîâàíèþ â êà÷åñòâå ìîäèôèêàòîðîâ ïåðåìåííûõ.</para></listitem> </itemizedlist> </sect1> <!-- Keep this comment at the end of the file
Index: language-defs.ent =================================================================== RCS file: /repository/smarty/docs/ru/language-defs.ent,v retrieving revision 1.3 diff -u -r1.3 language-defs.ent --- language-defs.ent 30 Jul 2004 10:45:18 -0000 1.3 +++ language-defs.ent 30 Aug 2004 15:53:37 -0000 @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <!ENTITY SMARTYManual "Ðóêîâîäñòâî ïî Smarty"> <!ENTITY SMARTYDesigners "Smarty äëÿ äèçàéíåðîâ øàáëîíîâ"> Index: language-snippets.ent =================================================================== RCS file: /repository/smarty/docs/ru/language-snippets.ent,v retrieving revision 1.3 diff -u -r1.3 language-snippets.ent --- language-snippets.ent 6 Aug 2004 10:58:34 -0000 1.3 +++ language-snippets.ent 30 Aug 2004 15:53:37 -0000 @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="windows-1251"?> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> + <!ENTITY note.parameter.merge '<note> <title>Òåõíè÷åñêîå çàìå÷àíèå</title> <para> Ïåðàìåòð <parameter>merge</parameter> ïðèíèìàåò êëþ÷è â âèäå ìàññèâà, - ïîýòîìó åñëè âû îáúåäèíÿåòå ìàññèâû ñ ÷èñëîâûìè èíäåêñàìè, òî îíè ìîãóò - íàëîæèòüñÿ äðóã íà äðóãà èëè â ðåçóëüòàòå ìîæåò ïîëó÷èòüñÿ ìàññèâ ñ + ïîýòîìó åñëè âû îáúåäèíÿåòå ìàññèâû ñ ÷èñëîâûìè èíäåêñàìè, òî îíè ìîãóò + íàëîæèòüñÿ äðóã íà äðóãà èëè â ðåçóëüòàòå ìîæåò ïîëó÷èòüñÿ ìàññèâ ñ ïðîïóùåííûìè êëþ÷àìè. Çàìåòüòå, ÷òî â îòëè÷èå îò ýòîãî, ôóíêöèÿ PHP array_merge() ïåðåíóìåðîâûâàåò ñîâïàäàþùèå ÷èñëîâûå èíäåêñû. </para> @@ -13,13 +15,13 @@ <!ENTITY parameter.compileid '<para>  êà÷åñòâå íåîáÿçàòåëüíîãî òðåòüåãî ïàðàìåòðà âû ìîæåòå ïåðåäàòü <parameter>compile_id</parameter>. Ýòî óêàçûâàåò íà òî, ÷òî âû õîòèòå - èìåòü íåñêîëüêî ðàçíûõ âåðñèé îäíîãî è òîãî æå ñêîìïèëèðîâàííîãî øàáëîíà, - íàïðèìåð, äëÿ ðàçíûõ ÿûçêîâ. Äðóãîé âàðèàíò ïðèìåíåíèÿ - <parameter>compile_id</parameter> - ýòî êîãäà ó âàñ åñòü íåñêîëüêî + èìåòü íåñêîëüêî ðàçíûõ âåðñèé îäíîãî è òîãî æå ñêîìïèëèðîâàííîãî øàáëîíà, + íàïðèìåð, äëÿ ðàçíûõ ÿûçêîâ. Äðóãîé âàðèàíò ïðèìåíåíèÿ + <parameter>compile_id</parameter> - ýòî êîãäà ó âàñ åñòü íåñêîëüêî äèðåêòîðèé ñ øàáëîíàìè ($template_dir), íî òîëüêî îäíà äèðåêòîðèÿ ñ - êîìïèëèðîâàííûìè øàáëîíàìè ($compile_dir). Óñòàíîâèòå îòäåëüíûé - <parameter>compile_id</parameter> äëÿ êàæäîé $template_dir, èíà÷å + êîìïèëèðîâàííûìè øàáëîíàìè ($compile_dir). Óñòàíîâèòå îòäåëüíûé + <parameter>compile_id</parameter> äëÿ êàæäîé $template_dir, èíà÷å îäíîèìåííûå øàáëîíû èç ðàçíûõ äèðåêòîðèé áóäóò ïåðåçàïèñûâàòü äðóã äðóãà. - Âû òàêæå ìîæåòå óêàçàòü <link linkend="variable.compile.id">$compile_id</link> + Âû òàêæå ìîæåòå óêàçàòü <link linkend="variable.compile.id">$compile_id</link> îäèí ðàç âìåñòî òîãî, ÷òîáû êàæäûé ðàç ïåðåäàâàòü åãî ýòîé ôóíêöèè. </para>'> Index: appendixes/troubleshooting.xml =================================================================== RCS file: /repository/smarty/docs/ru/appendixes/troubleshooting.xml,v retrieving revision 1.4 diff -u -r1.4 troubleshooting.xml --- appendixes/troubleshooting.xml 27 Jul 2004 06:34:53 -0000 1.4 +++ appendixes/troubleshooting.xml 30 Aug 2004 15:53:39 -0000 @@ -1,53 +1,60 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.4 $ --> -<chapter id="troubleshooting"> - <title>Troubleshooting</title> - <sect1 id="smarty.php.errors"> - <title>Smarty/PHP errors</title> - <para> - Smarty can catch many errors such as missing tag attributes - or malformed variable names. If this happens, you will see an error - similar to the following: - </para> - <example> - <title>Smarty errors</title> - <programlisting> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> + <chapter id="troubleshooting"> + <title>Ðåøåíèå ïðîáëåì</title> + <para></para> + <sect1 id="smarty.php.errors"> + <title>Îøèáêè Smarty/PHP</title> + <para> + Smarty ìîæåò ëîâèòü ìíîãèå îøèáêè, íàïðèìåð îòñóòñòâóþùèå àòòðèáóòû + òýãîâ èëè íåäîïóñòèìûå èìåíà ïåðåìåííûõ. Åñëè ýòî ïðîèçîéäåò, âû óâèäèòå + îøèáêó íàïîäîáèå ñëåäóþùåé: + </para> + <example> + <title>Îøèáêà Smarty</title> + <screen> +<![CDATA[ Warning: Smarty: [in index.tpl line 4]: syntax error: unknown tag - '%blah' -in /path/to/smarty/Smarty.class.php on line 1041 + in /path/to/smarty/Smarty.class.php on line 1041 Fatal error: Smarty: [in index.tpl line 28]: syntax error: missing section name -in /path/to/smarty/Smarty.class.php on line 1041 - </programlisting> - </example> - <para> - Smarty shows you the template name, the line number and the error. - After that, the error consists of the actual line number in the Smarty - class that the error occured. - </para> - - <para> - There are certain errors that Smarty cannot catch, such as missing - close tags. These types of errors usually end up in PHP compile-time - parsing errors. - </para> - <example> - <title>PHP parsing errors</title> - <programlisting> + in /path/to/smarty/Smarty.class.php on line 1041 +]]> + </screen> + </example> + <para> + Smarty ïîêàæåò âàì èìÿ øàáëîíà, íîìåð ñòðîêè è îøèáêó. + Äàëåå ñîîáùåíèå îá îøèáêå ñîñòîèò èç ôàêòè÷åñêîãî íîìåðà ñòðîêè â êëàññå + Smarty, ãäå âîçíèêëà îøèáêà. + </para> + + <para> + Åñòü îïðåäåëåííûå îøèáêè, êîòîðûå íå ìîæåò ïîéìàòü Smarty, íàïðèìåð + îòñóòñòâóþùèå çàêðûâàþùèå òýãè. Òàêèå îøèáêè îáû÷íî ïðèâîäÿò ê îøèáêàì + ðàçáîðà PHP íà ýòàïå êîìïèëÿöèè. + </para> + + <example> + <title>Îøèáêè ðàçáîðà PHP</title> + <screen> +<![CDATA[ Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75 - </programlisting> - </example> - - <para> - When you encounter a PHP parsing error, the error line number will - correspond to the compiled PHP script, not the template itself. Usually - you can look at the template and spot the syntax error. Here are some - common things to look for: missing close tags for {if}{/if} or - {section}{/section}, or syntax of logic within an {if} tag. If you - can't find the error, you might have to open the compiled PHP file and - go to the line number to figure out where the corresponding error is in - the template. - </para> - </sect1> +]]> + </screen> + </example> + + <para> + Êîãäà âû âñòðå÷àåòåñü ñ îøèáêîé ðàçáîðà PHP, íîìåð ñòðîêè, â êîòîðîé + äîïóùåíà îøèáêà, áóäåò ñîîòâåòñòâîâàòü ñêîìïèëèðîâàííîìó PHP-ñêðèïòó, + à íå ñàìîìó øàáëîíó. Îáû÷íî âû ìîæåòå ïîñìîòðåòü íà øàáëîí è óâèäèòü + ñèíòàêñè÷åñêóþ îøèáêó. Òèïè÷íûå îøèáêè: îòñóòñòâóþùèå çàêðûâàþùèå òýãè + äëÿ {if}{/if} èëè {section}{/section}, èëè ñèíòàêñèñ ëîãèêè âíóòðè òýãà {if}. + Åñëè âû íå ìîæåòå íàéòè îøèáêó, âàì ìîæåò ïîíàäîáèòüñÿ îòêðûòü ñêîìïèëèðîâàííûé + PHP-ôàéë è ïåðåéòè ê íîìåðó ñòðîêè ÷òîáû âûÿñíèòü, â ÷¸ì çàêëþ÷àåòñÿ îøèáêà + â øàáëîíå. + </para> + </sect1> </chapter> <!-- Keep this comment at the end of the file Local variables: Index: designers/language-builtin-functions/language-function-foreach.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-builtin-functions/language-function-foreach.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-foreach.xml --- designers/language-builtin-functions/language-function-foreach.xml 19 Jul 2004 13:11:25 -0000 1.3 +++ designers/language-builtin-functions/language-function-foreach.xml 30 Aug 2004 15:53:42 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.foreach"> <title>foreach,foreachelse</title> @@ -15,7 +15,7 @@ <row> <entry>Èìÿ àòòðèáóòà</entry> <entry>Òèï</entry> - <entry>Îáÿçàòåëåí</entry> + <entry>Îáÿçàòåëåí</entry> <entry>Ïî óìîë÷àíèþ</entry> <entry>Îïèñàíèå</entry> </row> @@ -23,17 +23,17 @@ <tbody> <row> <entry>from</entry> - <entry>ñòðîêà (string)</entry> + <entry>ìàññèâ (array)</entry> <entry>Äà</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ìàññèâà, ïî êîòîðîìó íàäî ïðîéòèñü</entry> + <entry>Ìàññèâ, ïî êîòîðîìó íàäî ïðîéòèñü</entry> </row> <row> <entry>item</entry> <entry>ñòðîêà (string)</entry> <entry>Äà</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â + <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â êà÷åñòâå çíà÷åíèÿ òåêóùåãî åëåìåíòà</entry> </row> <row> @@ -41,7 +41,7 @@ <entry>ñòðîêà (string)</entry> <entry>Íåò</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â + <entry>Èìÿ ïåðåìåííîé, êîòîðàÿ áóäåò âûñòóïàòü â êà÷åñòâå êëþ÷à òåêóùåãî åëåìåíòà</entry> </row> <row> @@ -49,7 +49,7 @@ <entry>ñòðîêà (string)</entry> <entry>Íåò</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>Íàçâàíèå öèêëà foreach äëÿ äîñòóïà ê åãî + <entry>Íàçâàíèå öèêëà foreach äëÿ äîñòóïà ê åãî ñâîéñòâàì</entry> </row> </tbody> @@ -58,17 +58,17 @@ <para> Öèêëû <emphasis>foreach</emphasis> ÿâëÿþòñÿ àëüòåðíàòèâîé - öèêëàì <emphasis>section</emphasis>. Öèêëû - <emphasis>foreach</emphasis> èñïîëüçóþòñÿ äëÿ ïðîõîæäåíèÿ - ïî îäíîìó ìàññèâó. Ñèíòàêñèñ <emphasis>foreach</emphasis> - íàìíîãî ïðîùå, ÷åì <emphasis>section</emphasis>, íî åãî + öèêëàì <emphasis>section</emphasis>. Öèêëû + <emphasis>foreach</emphasis> èñïîëüçóþòñÿ äëÿ ïðîõîæäåíèÿ + ïî îäíîìó ìàññèâó. Ñèíòàêñèñ <emphasis>foreach</emphasis> + íàìíîãî ïðîùå, ÷åì <emphasis>section</emphasis>, íî åãî ìîæíî èñïîëüçîâàòü òîëüêî äëÿ îäíîãî ìàññèâà. - Òýã <emphasis>foreach</emphasis> äîëæåí èìåòü â ïàðó òýã - <emphasis>/foreach</emphasis>. Îáÿçàòåëüíûå ïàðàìåòðû - + Òýã <emphasis>foreach</emphasis> äîëæåí èìåòü â ïàðó òýã + <emphasis>/foreach</emphasis>. Îáÿçàòåëüíûå ïàðàìåòðû - <emphasis>from</emphasis> è <emphasis>item</emphasis>. Íàçâàíèå - öèêëà foreach ìîæåò áûòü ëþáîé ïîñëåäîâàòåëüíîñòüþ áóêâ, öèôð + öèêëà foreach ìîæåò áûòü ëþáîé ïîñëåäîâàòåëüíîñòüþ áóêâ, öèôð è çíàêîâ ïîä÷åðêèâàíèé _. Öèêëû <emphasis>foreach</emphasis> - ìîãóò áûòü âëîæåííûå, è èìåíà âëîæåííûõ öèêëîâ äîëæíû áûòü + ìîãóò áûòü âëîæåííûå, è èìåíà âëîæåííûõ öèêëîâ äîëæíû áûòü óíèêàëüíûå. Ïåðåìåííàÿ <emphasis>from</emphasis> (îáû÷íî ìàññèâ çíà÷åíèé) óêàçûâàåò êîëè÷åñòâî èòåðàöèé öèêëà. <emphasis>foreachelse</emphasis> âûïîëíÿåòñÿ, åñëè íåòó çíà÷åíèé @@ -154,20 +154,20 @@ </para> </sect2> - <sect2 id="foreach.property.show"> + <sect2 id="foreach.property.show"> <title>show</title> <para> - Àòòðèáóò <emphasis>show</emphasis> ìîæåò ïðèíèìàòü ëîãè÷åñêèå + Àòòðèáóò <emphasis>show</emphasis> ìîæåò ïðèíèìàòü ëîãè÷åñêèå çíà÷åíèÿ (èñòèíà èëè ëîæü). Åñëè ëîæü, òî öèêë foreach íå áóäåò îòîáðàæàòüñÿ. Åñëè ïðèñóòñòâóåò òýã foreachelse, òî îí áóäåò îòîáðàæåí. </para> </sect2> - - <sect2 id="foreach.property.total"> + + <sect2 id="foreach.property.total"> <title>total</title> <para> - <emphasis>total</emphasis> õðàíèò êîëè÷åñòâî èòåðàöèé öèêëà. + <emphasis>total</emphasis> õðàíèò êîëè÷åñòâî èòåðàöèé öèêëà. Ìîæåò áûòü èñïîëüçîâàíî êàê â öèêëå, òàê è âíå åãî.. </para> </sect2> Index: designers/language-builtin-functions/language-function-literal.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-builtin-functions/language-function-literal.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-literal.xml --- designers/language-builtin-functions/language-function-literal.xml 19 Jul 2004 13:11:26 -0000 1.3 +++ designers/language-builtin-functions/language-function-literal.xml 30 Aug 2004 15:53:43 -0000 @@ -1,14 +1,17 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.literal"> <title>literal</title> <para> - Òýã Literal ïîçâîëÿåò óêàçàòü áëîê äàííûõ, êîòîðûé íå äîëæåí - áûòü îáðàáîòàí Smarty. Ýòî óäîáíî äëÿ âûâîäà javascript êîäà, - êîãäà ñèìâîëû { è } ìîãóò áûòü íå ïðàâèëüíî ïîíÿòû ïàðñåðîì - øàáëîíîâ. Âñå, ÷òî îêðóæåíî òýãàìè {literal} è {/literal} - íå îáðàáàòûâàåòñÿ è ïðîñòî îòîáðàæàåòñÿ êàê åñòü. + Òýãè literal ïîçâîëÿþò âîñïðèíèìàòü áëîêè äàííûõ áóêâàëüíî. + Îáû÷íî îíè èñïîëüçóþòñÿ âìåñòå ñ javascript èëè òàáëèöàìè ñòèëåé, â êîòîðûõ + ôèãóðíûå ñêîáêè êîíôëèêòóþò ñ ñèíòàêñèñîì ðàçäåëèòåëåé. + Âåñü òåêñò âíóòðè òýãîâ {literal}{/literal} íå èíòåðïðåòèðóåòñÿ, à âûâîäèòñÿ + "êàê åñòü". Åñëè âàì íóæíî âñòàâèòü òýãè øàáëîíîâ â áëîê literal, âàì ñëåäóåò + ïîéòè ïî äðóãîìó ïóòè è èñïîëüçîâàòü <link + linkend="language.function.ldelim">{ldelim}{rdelim}</link> äëÿ ýêðàíèðîâàíèÿ + îòäåëüíûõ ðàçäåëèòåëåé. </para> <example> <title>òýã literal</title> @@ -19,7 +22,7 @@ <!-- function isblank(field) { - if (field.value == '') + if (field.value == '') { return false; } else { @@ -55,4 +58,3 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - Index: designers/language-custom-functions/language-function-html-radios.xml =================================================================== RCS file: /repository/smarty/docs/ru/designers/language-custom-functions/language-function-html-radios.xml,v retrieving revision 1.3 diff -u -r1.3 language-function-html-radios.xml --- designers/language-custom-functions/language-function-html-radios.xml 19 Jul 2004 13:11:27 -0000 1.3 +++ designers/language-custom-functions/language-function-html-radios.xml 30 Aug 2004 15:53:46 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: tony2001 Status: ready --> <sect1 id="language.function.html.radios"> <title>html_radios</title> <informaltable frame="all"> @@ -14,7 +14,7 @@ <row> <entry>Èìÿ àòòðèáóòà</entry> <entry>Òèï</entry> - <entry>Îáÿçàòåëåí</entry> + <entry>Îáÿçàòåëåí</entry> <entry>Ïî óìîë÷àíèþ</entry> <entry>Îïèñàíèå</entry> </row> @@ -53,7 +53,7 @@ <entry>àññîöèàòèâíûé ìàññèâ</entry> <entry>Äà, åñëè íå óêàçàíû àòòðèáóòû values è output</entry> <entry><emphasis>n/a</emphasis></entry> - <entry>àññîöèàòèâíûé ìàññèâ çíà÷åíèé è íàçâàíèé + <entry>àññîöèàòèâíûé ìàññèâ çíà÷åíèé è íàçâàíèé ýëåìåíòîâ âûáîðà</entry> </row> <row> @@ -67,64 +67,61 @@ </tgroup> </informaltable> <para> - Ïîëüçîâàòåëüñÿêàÿ ôóíêöèÿ html_radios ãåíåðèðóåò HMTL êîä + Ïîëüçîâàòåëüñÿêàÿ ôóíêöèÿ html_radios ãåíåðèðóåò HMTL êîä ãðóïïû ýëåìåíòîâ âûáîðà (radio button group). Àâòîìàòè÷åñêè - óñòàíàâëèâàåò âûáðàííîå çíà÷åíèå, åñëè îíî óêçàíî. Òðåáóåò - íàëè÷èÿ àòòðèáóòîâ values è output èëè àòòðèáóòà options. + óñòàíàâëèâàåò âûáðàííîå çíà÷åíèå, åñëè îíî óêçàíî. Òðåáóåò + íàëè÷èÿ àòòðèáóòîâ values è output èëè àòòðèáóòà options. Ñãåíåðèðîâàííûé HMTL êîä ñîâìåñòèì ñ XHTML. </para> <para> - Âñå ïàðàìåòðû, êîòîðûå íå óêàçàíû â òàáëèöå âûøå, ïåðåäàþòñÿ + Âñå ïàðàìåòðû, êîòîðûå íå óêàçàíû â òàáëèöå âûøå, ïåðåäàþòñÿ è âûâîäÿòñÿ âíóòðè êàæäîãî ñîçäàííîãî òýãà <input>. </para> <example> <title>html_radios</title> <programlisting> -<![CDATA[ - index.php: +index.php: - require('Smarty.php.class'); - $smarty = new Smarty; - $smarty->assign('cust_ids', array(1000,1001,1002,1003)); - $smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane - Johnson','Carlie Brown')); - $smarty->assign('customer_id', 1001); - $smarty->display('index.tpl'); +require('Smarty.class.php'); +$smarty = new Smarty; +$smarty->assign('cust_ids', array(1000,1001,1002,1003)); +$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane +Johnson','Charlie Brown')); +$smarty->assign('customer_id', 1001); +$smarty->display('index.tpl'); - index.tpl: +index.tpl: - {html_radios values=$cust_ids checked=$customer_id output=$cust_names separator="<br />"} +{html_radios name="id" values=$cust_ids selected=$customer_id output=$cust_names separator="<br />"} - index.php: +index.php: - require('Smarty.php.class'); - $smarty = new Smarty; - $smarty->assign('cust_radios', array( - 1001 => 'Joe Schmoe', - 1002 => 'Jack Smith', - 1003 => 'Jane Johnson', - 1004 => 'Charlie Brown')); - $smarty->assign('customer_id', 1001); - $smarty->display('index.tpl'); +require('Smarty.class.php'); +$smarty = new Smarty; +$smarty->assign('cust_radios', array( + 1000 => 'Joe Schmoe', + 1001 => 'Jack Smith', + 1002 => 'Jane Johnson', + 1003 => 'Charlie Brown')); +$smarty->assign('customer_id', 1001); +$smarty->display('index.tpl'); - index.tpl: +index.tpl: - {html_radios name="id" options=$cust_radios checked=$customer_id separator="<br />"} +{html_radios name="id" options=$cust_radios selected=$customer_id separator="<br />"} - OUTPUT: (both examples) +OUTPUT: (both examples) - <input type="radio" name="id[]" value="1000">Joe Schmoe<br /> - <input type="radio" name="id[]" value="1001" checked="checked"><br /> - <input type="radio" name="id[]" value="1002">Jane Johnson<br /> - <input type="radio" name="id[]" value="1003">Charlie Brown<br /> -]]> - </programlisting> - </example> +<input type="radio" name="id" value="1000">Joe Schmoe<br /> +<input type="radio" name="id" value="1001" checked="checked">Jack Smith<br /> +<input type="radio" name="id" value="1002">Jane Johnson<br /> +<input type="radio" name="id" value="1003">Charlie Brown<br /></programlisting> +</example> </sect1> <!-- Keep this comment at the end of the file Local variables: Index: programmers/api-functions/api-unregister-postfilter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-functions/api-unregister-postfilter.xml,v retrieving revision 1.4 diff -u -r1.4 api-unregister-postfilter.xml --- programmers/api-functions/api-unregister-postfilter.xml 2 Aug 2004 06:46:01 -0000 1.4 +++ programmers/api-functions/api-unregister-postfilter.xml 30 Aug 2004 15:53:56 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <refentry id="api.unregister.postfilter"> <refnamediv> <refname>unregister_postfilter</refname> Index: programmers/api-variables/variable-cache-modified-check.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-cache-modified-check.xml,v retrieving revision 1.3 diff -u -r1.3 variable-cache-modified-check.xml --- programmers/api-variables/variable-cache-modified-check.xml 19 Jul 2004 13:11:34 -0000 1.3 +++ programmers/api-variables/variable-cache-modified-check.xml 30 Aug 2004 15:53:57 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> <sect1 id="variable.cache.modified.check"> <title>$cache_modified_check</title> <para> Index: programmers/api-variables/variable-left-delimiter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-left-delimiter.xml,v retrieving revision 1.3 diff -u -r1.3 variable-left-delimiter.xml --- programmers/api-variables/variable-left-delimiter.xml 19 Jul 2004 13:11:35 -0000 1.3 +++ programmers/api-variables/variable-left-delimiter.xml 30 Aug 2004 15:53:58 -0000 @@ -4,7 +4,7 @@ <sect1 id="variable.left.delimiter"> <title>$left_delimiter</title> <para> - Ëåâûé îãðàíè÷èòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. + Ëåâûé ðàçäåëèòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. Ïî óìîë÷àíèþ ðàâíî "{". </para> </sect1> Index: programmers/api-variables/variable-plugins-dir.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-plugins-dir.xml,v retrieving revision 1.2 diff -u -r1.2 variable-plugins-dir.xml --- programmers/api-variables/variable-plugins-dir.xml 2 Aug 2004 06:46:01 -0000 1.2 +++ programmers/api-variables/variable-plugins-dir.xml 30 Aug 2004 15:53:58 -0000 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <sect1 id="variable.plugins.dir"> <title>$plugins_dir</title> <para> Index: programmers/api-variables/variable-right-delimiter.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-right-delimiter.xml,v retrieving revision 1.1 diff -u -r1.1 variable-right-delimiter.xml --- programmers/api-variables/variable-right-delimiter.xml 13 Apr 2004 11:46:22 -0000 1.1 +++ programmers/api-variables/variable-right-delimiter.xml 30 Aug 2004 15:53:58 -0000 @@ -1,10 +1,11 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<?xml version="1.0" encoding="windows-1251"?> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> <sect1 id="variable.right.delimiter"> <title>$right_delimiter</title> <para> - This is the right delimiter used by the template language. - Default is "}". + Ïðàâûé ðàçäåëèòåëü, èñïîëüçóåìûé â ÿçûêå øàáëîíîâ. + Ïî óìîë÷àíèþ ðàâíî "}". </para> </sect1> <!-- Keep this comment at the end of the file Index: programmers/api-variables/variable-security-settings.xml =================================================================== RCS file: /repository/smarty/docs/ru/programmers/api-variables/variable-security-settings.xml,v retrieving revision 1.1 diff -u -r1.1 variable-security-settings.xml --- programmers/api-variables/variable-security-settings.xml 13 Apr 2004 11:46:22 -0000 1.1 +++ programmers/api-variables/variable-security-settings.xml 30 Aug 2004 15:53:58 -0000 @@ -1,23 +1,25 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.0" encoding="windows-1251"?> <!-- $Revision: 1.1 $ --> +<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready --> + <sect1 id="variable.plugins.dir"> <sect1 id="variable.security.settings"> <title>$security_settings</title> <para> - These are used to override or specify the security settings when - security is enabled. These are the possible settings: - </para> + Ýòî èñïîëüçóåòñÿ äëÿ èçìåíåíèÿ èëè óêàçàíèÿ íàñòðîåê áåçîïàñíîñòè + êîãäà áåçîïàñíîñèòü (security) âêëþ÷åíà. Äîïóñòèìûå çíà÷åíèÿ: + /para> <itemizedlist> - <listitem><para>PHP_HANDLING - true/false. If set to true, the - $php_handling setting is not checked for security.</para></listitem> - <listitem><para>IF_FUNCS - This is an array of the names of permitted - PHP functions in IF statements.</para></listitem> - <listitem><para>INCLUDE_ANY - true/false. If set to true, any - template can be included from the file system, regardless of the - $secure_dir list.</para></listitem> - <listitem><para>PHP_TAGS - true/false. If set to true, {php}{/php} - tags are permitted in the templates.</para></listitem> - <listitem><para>MODIFIER_FUNCS - This is an array of the names of permitted - PHP functions used as variable modifiers.</para></listitem> + <listitem><para>PHP_HANDLING - true/false. Åñëè óñòàíîâëåíî â true, ïàðàìåòð + $php_handling íå ïðîâåðÿåòñÿ íà áåçîïàñíîñòü.</para></listitem> + <listitem><para>IF_FUNCS - Ýòî ìàññèâ èì¸í PHP-ôóíêöèé, ðàçðåøåííûõ + ê èñïîëüçîâàíèþ â óñëîâèÿõ IF.</para></listitem> + <listitem><para>INCLUDE_ANY - true/false. Åñëè óñòàíîâëåíî â true, ëþáîé + øàáëîí ìîæåò áûòü ïîäêëþ÷åí èç ôàéëîâîé ñèñòåìû, íåçàâèñèìî îò ñïèñêà + $secure_dir.</para></listitem> + <listitem><para>PHP_TAGS - true/false. Åñëè óñòàíîâëåíî â true, òýãè {php}{/php} + ðàçðåøåíû ê èñïîëüçîâàíèþ â øàáëîíàõ.</para></listitem> + <listitem><para>MODIFIER_FUNCS - Ýòî ìàññèâ èì¸í PHP-ôóíêöèé, ðàçðåøåííûõ + ê èñïîëüçîâàíèþ â êà÷åñòâå ìîäèôèêàòîðîâ ïåðåìåííûõ.</para></listitem> </itemizedlist> </sect1> <!-- Keep this comment at the end of the file