cvs: smarty /docs/ru/designers/language-builtin-functions language-function-if.xml /docs/ru/designers/language-custom-functions language-function-html-options.xml /docs/ru/programmers api-variables.xml /docs/ru/programmers/api-variables variable-global-assign.xml variable-security-settings.xml variable-undefined.xml /docs/ru/programmers/caching caching-cacheable.xml
"George Miroshnikov" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsfreespace1105120581@cvsserver> |
freespace Fri Jan 7 12:56:21 2005 EDT
Removed files:
/smarty/docs/ru/programmers/api-variables
variable-global-assign.xml
variable-undefined.xml
Modified files:
/smarty/docs/ru/designers/language-builtin-functions
language-function-if.xml
/smarty/docs/ru/designers/language-custom-functions
language-function-html-options.xml
/smarty/docs/ru/programmers api-variables.xml
/smarty/docs/ru/programmers/api-variables
variable-security-settings.xml
/smarty/docs/ru/programmers/caching caching-cacheable.xml
Log:
Sync with en.
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
freespace-20050107125621.txt
(text/plain, 18 KB)
http://cvs.php.net/diff.php/smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml?r1=1.5&r2=1.6&ty=u
Index: smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml
diff -u smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml:1.5 smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml:1.6
--- smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml:1.5 Thu Nov 25 18:26:12 2004
+++ smarty/docs/ru/designers/language-builtin-functions/language-function-if.xml Fri Jan 7 12:56:20 2005
@@ -1,61 +1,185 @@
<?xml version="1.0" encoding="windows-1251"?>
-<!-- $Revision: 1.5 $ -->
-<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready -->
+<!-- $Revision: 1.6 $ -->
+<!-- EN-Revision: 1.2 Maintainer: freespace Status: ready -->
<sect1 id="language.function.if">
<title>if,elseif,else</title>
<para>
- Êîíñòðóêöèÿ if â Smarty òàêàÿ æå ãèáêàÿ, êàê è àíàëîãè÷íàÿ
- êîíñòðóêöèèÿ â php, òîëüêî ñ íåñêîëüêî ðàñøèðåííûìè
+ Êîíñòðóêöèÿ <emphasis>{if}</emphasis> â Smarty òàêàÿ æå ãèáêàÿ, êàê è
+ àíàëîãè÷íàÿ êîíñòðóêöèèÿ â PHP, òîëüêî ñ íåñêîëüêî ðàñøèðåííûìè
âîçìîæíîñòÿìè.
- Êàæäûé òýã <emphasis>if</emphasis> äîëæåí èìåòü ïàðó
- <emphasis>/if</emphasis>. <emphasis>else</emphasis> è
- <emphasis>elseif</emphasis> òàê æå äîïóñòèìû. "eq", "ne",
- "neq", "gt", "lt", "lte", "le", "gte" "ge", "is even",
- "is odd", "is not even", "is not odd", "not", "mod",
- "div by", "even by", "odd by", "==", "!=", ">", "<", "<=",
- ">=" -- äîïóñòèìûå êâàëèôèêàòîðû óñëîâèé. Îíè äîëæíû áûòü
- îòäåëåíû îò îêðóæàþùèõ åëåìåíòîâ ïðîáåëàìè.
+ Êàæäûé òýã <emphasis>{if}</emphasis> äîëæåí èìåòü ïàðó
+ <emphasis>{/if}</emphasis>. <emphasis>{else}</emphasis> è
+ <emphasis>{elseif}</emphasis> òàê æå äîïóñòèìû. Äîñóòïíû âñå êâàëèôèêàòîðû
+ èç PHP, òàêèå êàê <emphasis>||</emphasis>, <emphasis>or</emphasis>,
+ <emphasis>&&</emphasis>, <emphasis>and</emphasis> è ò.ä.
</para>
+
+ <para>
+ Íèæå ñëåäóåò ñïèñîê ðàñïîçíàâàåìûõ êâàëèôèêàòîðîâ, êîòîðûå äîëæíû áûòü
+ îòäåëåíû îò îêðóæàþùèõ ýëåìåíòîâ ïðîáåëàìè. Îáðàòèòå âíèìàíèÿ, ÷òî
+ îáúåêòû â [êâàäðàòíûõ ñêîáêàõ] ÿâëÿþòñÿ íåîáÿçàòåëüíûìè. Èíîãäà óêàçàíû
+ ýêâèâàëåíòû â PHP.
+ </para>
+
+ <informaltable frame="all">
+ <tgroup cols="4">
+ <colspec colname="qualifier" align="center" />
+ <colspec colname="alternates" align="center" />
+ <colspec colname="meaning" />
+ <colspec colname="example" />
+ <colspec colname="php" />
+ <thead>
+ <row>
+ <entry>Êâàëèôèêàòîð</entry>
+ <entry>Àëüòåðíàòèâû</entry>
+ <entry>Ïðèìåð ñèíòàêñèñà</entry>
+ <entry>Îïèñàíèå</entry>
+ <entry>Ýêâèâàëåíò PHP</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>==</entry>
+ <entry>eq</entry>
+ <entry>$a eq $b</entry>
+ <entry>ðàâíî</entry>
+ <entry>==</entry>
+ </row>
+ <row>
+ <entry>!=</entry>
+ <entry>ne, neq</entry>
+ <entry>$a neq $b</entry>
+ <entry>íå ðàâíî</entry>
+ <entry>!=</entry>
+ </row>
+ <row>
+ <entry>></entry>
+ <entry>gt</entry>
+ <entry>$a gt $b</entry>
+ <entry>áîëüøå</entry>
+ <entry>></entry>
+ </row>
+ <row>
+ <entry><</entry>
+ <entry>lt</entry>
+ <entry>$a lt $b</entry>
+ <entry>ìåíüøå</entry>
+ <entry><</entry>
+ </row>
+ <row>
+ <entry>>=</entry>
+ <entry>gte, ge</entry>
+ <entry>$a ge $b</entry>
+ <entry>áîëüøå èëè ðàâíî</entry>
+ <entry>>=</entry>
+ </row>
+ <row>
+ <entry><=</entry>
+ <entry>lte, le</entry>
+ <entry>$a le $b</entry>
+ <entry>ìåíüøå èëè ðàâíî</entry>
+ <entry><=</entry>
+ </row>
+ <row>
+ <entry>===</entry>
+ <entry></entry>
+ <entry>$a === 0</entry>
+ <entry>ïðîâåðêà èäåíòè÷íîñòè</entry>
+ <entry>===</entry>
+ </row>
+ <row>
+ <entry>!</entry>
+ <entry>not</entry>
+ <entry>not $a</entry>
+ <entry>îòðèöàíèå</entry>
+ <entry>!</entry>
+ </row>
+ <row>
+ <entry>%</entry>
+ <entry>mod</entry>
+ <entry>$a mod $b</entry>
+ <entry>îñòàòîê îò äåëåíèÿ</entry>
+ <entry>%</entry>
+ </row>
+ <row>
+ <entry>is [not] div by</entry>
+ <entry></entry>
+ <entry>$a is not div by 4</entry>
+ <entry>âîçìîæíî äåëåíèå áåç îñòàòêà</entry>
+ <entry>$a % $b == 0</entry>
+ </row>
+ <row>
+ <entry>is [not] even</entry>
+ <entry></entry>
+ <entry>$a is not even</entry>
+ <entry>[íå]÷¸òíî</entry>
+ <entry>$a % 2 == 0</entry>
+ </row>
+ <row>
+ <entry>is [not] even by</entry>
+ <entry></entry>
+ <entry>$a is not even by $b</entry>
+ <entry>[íå]÷¸òíî çíà÷åíèþ</entry>
+ <entry>($a / $b) % 2 == 0</entry>
+ </row>
+ <row>
+ <entry>is [not] odd</entry>
+ <entry></entry>
+ <entry>$a is not odd</entry>
+ <entry>[íå]íå÷¸òíî</entry>
+ <entry>$a % 2 != 0</entry>
+ </row>
+ <row>
+ <entry>is [not] odd by</entry>
+ <entry></entry>
+ <entry>$a is not odd by $b</entry>
+ <entry>[íå]íå÷¸òíî çíà÷åíèþ</entry>
+ <entry>($a / $b) % 2 != 0</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
<example>
<title>Êîíñòðóêöèÿ if</title>
<programlisting>
<![CDATA[
{if $name eq "Fred"}
- Welcome Sir.
+ Welcome Sir.
{elseif $name eq "Wilma"}
- Welcome Ma'am.
+ Welcome Ma'am.
{else}
- Welcome, whatever you are.
+ Welcome, whatever you are.
{/if}
-{* ïðèìåð ñ ëîãèêîé ÈËÈ ("or") *}
+{* ïðèìåð ñ ëîãèêîé "èëè" *}
{if $name eq "Fred" or $name eq "Wilma"}
...
{/if}
-{* àíàëîãè÷åí ïðåäûäóùåìó *}
+{* òî æå ñàìîå, ÷òî è âûøå *}
{if $name == "Fred" || $name == "Wilma"}
...
{/if}
-{* ñëåäóþùèé ñèíòàêñèñ íå áóäåò ðàáîòàòü. êâàëèôèêàòîðû óñëîâèé äîëæíû
- áûòü îòäåëåíû îò îêðóæàþùèõ ýëåìåíòîâ ïðîáåëàìè *}
+{* ñëåäóþùèé ïðèìåð ÍÅ áóäåò ðàáîòàòü, êâàëèôèêàòîðû óñëîâèé ñëåäóåò
+ îòäåëÿòü îò îêðóæàþùèõ ýëåìåíòîâ ïðîáåëàìè *}
{if $name=="Fred" || $name=="Wilma"}
...
{/if}
-{* äîïóñêàþòñÿ ñêîáêè *}
-{if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#}
+{* ñêîáêè ðàçðåøåíû *}
+{if ( $amount > 0 or $amount < 1000 ) and $volume >= #minVolAmt#}
...
{/if}
-{* ìîæíî òàêæå âûçûâàòü âñòðîåííûå ôóíêöèè php *}
+{* âû òàêæå ìîæåòå èñïîëüçîâàòü ôóíêöèè php *}
{if count($var) gt 0}
...
{/if}
-{* ïðîâåðêà çíà÷åíèÿ íà ÷åòíîñòü *}
+{* ïðîâåðÿåò ÷¸òíîñòü çíà÷åíèé *}
{if $var is even}
...
{/if}
@@ -66,18 +190,18 @@
...
{/if}
-{* ïðîâåðêà íà äåëèìîñòü íà 4 *}
+{* ïðîâåðÿåò, äåëèòñÿ ëè $var íà 4 áåç îñòàòêà *}
{if $var is div by 4}
...
{/if}
-{* ïðîâåðêà íà "÷åòíîñòü" ãðóïèðóÿ ïî 2. ò.å.,
-0=÷åòíî, 1=÷åòíî, 2=íå÷åòíî, 3=íå÷åòíî, 4=÷åòíî, 5=÷åòíî, è ò.ä. *}
+{* ïðîâåðÿåò, ÿâëÿåòñÿ ëè $var ÷¸òíûì äâóì, íàïðèìåð
+0=÷¸òíî, 1=÷¸òíî, 2=íå÷¸òíî, 3=íå÷¸òíî, 4=÷¸òíî, 5=÷¸òíî è ò.ä. *}
{if $var is even by 2}
...
{/if}
-{* 0=÷åòíî, 1=÷åòíî, 2=÷åòíî, 3=íå÷åòíî, 4=íå÷åòíî, 5=íå÷åòíî, è ò.ä. *}
+{* 0=÷¸òíî, 1=÷¸òíî, 2=÷¸òíî, 3=íå÷¸òíî, 4=íå÷¸òíî, 5=íå÷¸òíî è ò.ä. *}
{if $var is even by 3}
...
{/if}
http://cvs.php.net/diff.php/smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml?r1=1.7&r2=1.8&ty=u
Index: smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml
diff -u smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml:1.7 smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml:1.8
--- smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml:1.7 Thu Nov 25 18:26:13 2004
+++ smarty/docs/ru/designers/language-custom-functions/language-function-html-options.xml Fri Jan 7 12:56:21 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="windows-1251"?>
-<!-- $Revision: 1.7 $ -->
-<!-- EN-Revision: 1.2 Maintainer: freespace Status: ready -->
+<!-- $Revision: 1.8 $ -->
+<!-- EN-Revision: 1.4 Maintainer: freespace Status: ready -->
<sect1 id="language.function.html.options">
<title>html_options</title>
<informaltable frame="all">
@@ -84,50 +84,56 @@
<title>html_options</title>
<programlisting>
<![CDATA[
- index.php:
+ÏÐÈÌÅÐ 1
+--------
- 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');
-
- index.tpl:
-
- <select name=customer_id>
- {html_options values=$cust_ids selected=$customer_id output=$cust_names}
- </select>
-
-
- index.php:
-
- require('Smarty.php.class');
- $smarty = new Smarty;
- $smarty->assign('cust_options', array(
- 1001 => 'Joe Schmoe',
- 1002 => 'Jack Smith',
- 1003 => 'Jane Johnson',
- 1004 => 'Charlie Brown'));
- $smarty->assign('customer_id', 1001);
- $smarty->display('index.tpl');
-
- index.tpl:
-
- <select name=customer_id>
- {html_options options=$cust_options selected=$customer_id}
- </select>
-
-
- OUTPUT: (both examples)
-
- <select name=customer_id>
- <option value="1000">Joe Schmoe</option>
- <option value="1001" selected="selected">Jack Smith</option>
- <option value="1002">Jane Johnson</option>
- <option value="1003">Charlie Brown</option>
- </select>
+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','Charlie Brown'));
+$smarty->assign('customer_id', 1001);
+$smarty->display('index.tpl');
+
+index.tpl:
+
+<select name=customer_id>
+ {html_options values=$cust_ids selected=$customer_id output=$cust_names}
+</select>
+
+ÏÐÈÌÅÐ 2
+--------
+
+index.php:
+
+require('Smarty.php.class');
+$smarty = new Smarty;
+$smarty->assign('cust_options', array(
+ 1001 => 'Joe Schmoe',
+ 1002 => 'Jack Smith',
+ 1003 => 'Jane Johnson',
+ 1004 => 'Charlie Brown'));
+$smarty->assign('customer_id', 1001);
+$smarty->display('index.tpl');
+
+index.tpl:
+
+<select name=customer_id>
+ {html_options options=$cust_options selected=$customer_id}
+</select>
+
+
+ÐÅÇÓËÜÒÀÒ: (îáà ïðèìåðà)
+------------------------
+
+<select name=customer_id>
+ <option value="1000">Joe Schmoe</option>
+ <option value="1001" selected="selected">Jack Smith</option>
+ <option value="1002">Jane Johnson</option>
+ <option value="1003">Charlie Brown</option>
+</select>
]]>
</programlisting>
</example>
http://cvs.php.net/diff.php/smarty/docs/ru/programmers/api-variables.xml?r1=1.6&r2=1.7&ty=u
Index: smarty/docs/ru/programmers/api-variables.xml
diff -u smarty/docs/ru/programmers/api-variables.xml:1.6 smarty/docs/ru/programmers/api-variables.xml:1.7
--- smarty/docs/ru/programmers/api-variables.xml:1.6 Thu Nov 25 18:26:13 2004
+++ smarty/docs/ru/programmers/api-variables.xml Fri Jan 7 12:56:21 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="windows-1251"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- EN-Revision: 1.3 Maintainer: tony2001 Status: ready -->
<chapter id="api.variables">
<title>Ïåðåìåííûå</title>
@@ -10,8 +10,6 @@
&programmers.api-variables.variable-debugging;
&programmers.api-variables.variable-debug-tpl;
&programmers.api-variables.variable-debugging-ctrl;
- &programmers.api-variables.variable-global-assign;
- &programmers.api-variables.variable-undefined;
&programmers.api-variables.variable-autoload-filters;
&programmers.api-variables.variable-compile-check;
&programmers.api-variables.variable-force-compile;
http://cvs.php.net/diff.php/smarty/docs/ru/programmers/api-variables/variable-security-settings.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/ru/programmers/api-variables/variable-security-settings.xml
diff -u smarty/docs/ru/programmers/api-variables/variable-security-settings.xml:1.3 smarty/docs/ru/programmers/api-variables/variable-security-settings.xml:1.4
--- smarty/docs/ru/programmers/api-variables/variable-security-settings.xml:1.3 Fri Sep 3 04:24:06 2004
+++ smarty/docs/ru/programmers/api-variables/variable-security-settings.xml Fri Jan 7 12:56:21 2005
@@ -1,25 +1,28 @@
<?xml version="1.0" encoding="windows-1251"?>
-<!-- $Revision: 1.3 $ -->
-<!-- EN-Revision: 1.1 Maintainer: tony2001 Status: ready -->
- <sect1 id="variable.security.settings">
- <title>$security_settings</title>
- <para>
- Ýòî èñïîëüçóåòñÿ äëÿ èçìåíåíèÿ èëè óêàçàíèÿ íàñòðîåê áåçîïàñíîñòè
- êîãäà áåçîïàñíîñèòü (security) âêëþ÷åíà. Äîïóñòèìûå çíà÷åíèÿ:
- </para>
- <itemizedlist>
- <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>
+<!-- $Revision: 1.4 $ -->
+<!-- EN-Revision: 1.2 Maintainer: freespace Status: ready -->
+<sect1 id="variable.security.settings">
+ <title>$security_settings</title>
+ <para>
+ Ýòî èñïîëüçóåòñÿ äëÿ èçìåíåíèÿ èëè óêàçàíèÿ íàñòðîåê áåçîïàñíîñòè
+ êîãäà áåçîïàñíîñèòü (security) âêëþ÷åíà. Äîïóñòèìûå çíà÷åíèÿ:
+ </para>
+ <itemizedlist>
+ <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>
+ <listitem><para>ALLOW_CONSTANTS - true/false. Åñëè óñòàíîâëåíî â true,
+ ðàçðåøàåòñÿ èñïîëüçîâàíèå êîíñòàíò âèäà {$smarty.const.name}.
+ Ïî óìîë÷àíèþ ðàâíî "false" èç ñîîáðàæåíèé áåçîïàñíîñòè.</para></listitem>
+ </itemizedlist>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
http://cvs.php.net/diff.php/smarty/docs/ru/programmers/caching/caching-cacheable.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/ru/programmers/caching/caching-cacheable.xml
diff -u smarty/docs/ru/programmers/caching/caching-cacheable.xml:1.1 smarty/docs/ru/programmers/caching/caching-cacheable.xml:1.2
--- smarty/docs/ru/programmers/caching/caching-cacheable.xml:1.1 Tue Jul 27 02:34:53 2004
+++ smarty/docs/ru/programmers/caching/caching-cacheable.xml Fri Jan 7 12:56:21 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="windows-1251"?>
-<!-- $Revision: 1.1 $ -->
-<!-- EN-Revision: 1.5 Maintainer: tony2001 Status: ready -->
+<!-- $Revision: 1.2 $ -->
+<!-- EN-Revision: 1.6 Maintainer: freespace Status: ready -->
<sect1 id="caching.cacheable">
<title>Óïðàâëåíèå êýøèðîâàíèåì ðåçóëüòàòîâ ðàáîòû ïëàãèíîâ</title>
<para>
@@ -61,7 +61,7 @@
</para>
<programlisting>
<![CDATA[
-Îñòàâøååñÿ âðåìÿ: {remain endtime=$obj->endtime}
+Îñòàâøååñÿ âðåìÿ: {remaining endtime=$obj->endtime}
]]>
</programlisting>
<para>