cvs: smarty /docs/pt_BR/designers/language-builtin-functions language-function-capture.xml language-function-config-load.xml language-function-foreach.xml language-function-if.xml language-function-include-php.xml language-function-include.xml language-function-insert.xml language-function-ldelim.xml language-function-literal.xml language-function-php.xml language-function-section.xml language-function-strip.xml
"Thomas Gonzalez Miranda" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsthomasgm1095865040@cvsserver> |
thomasgm Wed Sep 22 10:57:20 2004 EDT
Modified files:
/smarty/docs/pt_BR/designers/language-builtin-functions
language-function-capture.xml
language-function-config-load.xml
language-function-foreach.xml
language-function-if.xml
language-function-include-php.xml
language-function-include.xml
language-function-insert.xml
language-function-ldelim.xml
language-function-literal.xml
language-function-php.xml
language-function-section.xml
language-function-strip.xml
Log:
review of text and changed all examples to CDATA support
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thomasgm-20040922105720.txt
(text/plain, 74 KB)
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-capture.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.capture">
<title>capture</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -40,7 +40,7 @@
capture é usado para coletar toda a saída do template em uma variável ao invés
de mostra-lo. Qualquer conteúdo entre {capture
name="foo"} e {/capture} coletado na variável especificada no atributo name.
- O conteúdo capturado pode ser usado no template a apertir da variável especial
+ O conteúdo capturado pode ser usado no template a partir da variável especial
$smarty.capture.foo aonde foo é o valor passado para o atributo name. Se você não
passar um atributo name, então será usado "default". Todos os comandos
{capture} devem ter o seu {/capture}. Você pode aninhar(colocar um dentro de outro)
@@ -66,17 +66,20 @@
<example>
<title>capturando conteúdo do template</title>
<programlisting>
-{* we don't want to print a table row unless content is displayed *}
+<![CDATA[
+{* nós não queremos mostrar uma linha de tabela à não ser que haja conteúdo para ela *}
{capture name=banner}
-{include file="get_banner.tpl"}
+{include file="pegar_banner.tpl"}
{/capture}
{if $smarty.capture.banner ne ""}
- <tr>
- <td>
+ <tr>
+ <td>
{$smarty.capture.banner}
- </td>
- </tr>
-{/if}</programlisting>
+ </td>
+ </tr>
+{/if}
+]]>
+</programlisting>
</example>
</para>
</sect1>
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-config-load.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.config.load">
<title>config_load</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -23,14 +23,14 @@
<entry>file</entry>
<entry>string</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome do arquivo de configuração para incluir</entry>
</row>
<row>
<entry>section</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da seção a carregar</entry>
</row>
<row>
@@ -56,7 +56,7 @@
<entry>
Quando ou não as variáveis são visiveis para o template
superior(aquele que chamou este), o mesmo que scope=parent.
- NOTA: este atributo esta obsoleto pelo atributo scope, mas
+ NOTA: este atributo esta obsoleto devido ao atributo scope, mas
ainda é suportado. Se scope for indicado, este valor é ignorado.
</entry>
</row>
@@ -65,31 +65,33 @@
</informaltable>
<para>
Esta função é usada para carregar as variáveis de um arquivo de configuração
- dentro de um template. Veja <link linkend="config.files">Config Files</link>
- para maiores
- informações.
+ dentro de um template. Veja <link linkend="config.files">Arquivos de Configuração</link>
+ para mais informações.
</para>
<example>
<title>Função config_load</title>
<programlisting>
-{config_load file="colors.conf"}
+<![CDATA[
+{config_load file="cores.conf"}
-<html>
-<title>{#pageTitle#}</title>
-<body bgcolor="{#bodyBgColor#}">
-<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
- <tr bgcolor="{#rowBgColor#}">
- <td>First</td>
- <td>Last</td>
- <td>Address</td>
- </tr>
-</table>
-</body>
-</html></programlisting>
+<html>
+<title>{#tituloPagina#}</title>
+<body bgcolor="{#cordeFundo}">
+<table border="{#tamanhoBordaTabela}" bgcolor="{#cordeFundotabela#}">
+ <tr bgcolor="{#cordeFundoLinha#}">
+ <td>First</td>
+ <td>Last</td>
+ <td>Address</td>
+ </tr>
+</table>
+</body>
+</html>
+]]>
+</programlisting>
</example>
<para>
- Arquivos de configuração podem conter seções também. Voce pode carregar
+ Arquivos de configuração podem conter seções também. Você pode carregar
variáveis de uma seção adicionando o atributo
<emphasis>section</emphasis>.
</para>
@@ -102,20 +104,23 @@
<example>
<title>Função config_load com seções</title>
<programlisting>
-{config_load file="colors.conf" section="Customer"}
+<![CDATA[
+{config_load file="cores.conf" section="Consumidor"}
-<html>
-<title>{#pageTitle#}</title>
-<body bgcolor="{#bodyBgColor#}">
-<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
- <tr bgcolor="{#rowBgColor#}">
- <td>First</td>
- <td>Last</td>
- <td>Address</td>
- </tr>
-</table>
-</body>
-</html></programlisting>
+<html>
+<title>{#tituloPagina#}</title>
+<body bgcolor="{#cordeFundo}">
+<table border="{#tamanhoBordaTabela}" bgcolor="{#cordeFundotabela#}">
+ <tr bgcolor="{#cordeFundoLinha#}">
+ <td>First</td>
+ <td>Last</td>
+ <td>Address</td>
+ </tr>
+</table>
+</body>
+</html>
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-foreach.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.foreach">
<title>foreach,foreachelse</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -23,14 +23,14 @@
<entry>from</entry>
<entry>string</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da matriz que você estará pegando os elementos</entry>
</row>
<row>
<entry>item</entry>
<entry>string</entry>
<entry>Yes</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da variável
que é o elemento atual</entry>
</row>
@@ -38,14 +38,14 @@
<entry>key</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da variável que é a chave atual</entry>
</row>
<row>
<entry>name</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome do loop foreach para acessar as
propriedades foreach</entry>
</row>
@@ -55,7 +55,7 @@
<para>
Loops <emphasis>foreach</emphasis> são uma alternativa para loops
<emphasis>section</emphasis>. <emphasis>foreach</emphasis> é usado
- para pegar cada elemento de uma matriz associativa simples.
+ para pegar cada elemento de uma matriz associativa simples.
A sintaxe para <emphasis>foreach</emphasis> é muito mais simples do que
<emphasis>section</emphasis>, mas tem a desvantagem de poder ser usada
apenas para uma única matriz. Tags <emphasis>foreach</emphasis> devem ter
@@ -73,49 +73,58 @@
<example>
<title>foreach</title>
<programlisting>
-
+<![CDATA[
{* este exemplo irá mostrar todos os valores da matriz $custid *}
{foreach from=$custid item=curr_id}
- id: {$curr_id}<br>
+ id: {$curr_id}<br>
{/foreach}
-
-MOSTRA:
-
-id: 1000<br>
-id: 1001<br>
-id: 1002<br></programlisting>
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+id: 1000<br>
+id: 1001<br>
+id: 1002<br>
+]]>
+</programlisting>
</example>
<example>
<title>foreach key</title>
<programlisting>
+<![CDATA[
{* A key contém a chave para cada valor do loop
-A definição é alo assim:
+A definição se parece com isso:
-$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
- array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
+$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
+ array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
*}
{foreach name=outer item=contact from=$contacts}
{foreach key=key item=item from=$contact}
- {$key}: {$item}<br>
+ {$key}: {$item}<br>
{/foreach}
{/foreach}
-
-MOSTRA:
-
-phone: 1<br>
-fax: 2<br>
-cell: 3<br>
-phone: 555-4444<br>
-fax: 555-3333<br>
-cell: 760-1234<br></programlisting>
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+phone: 1<br>
+fax: 2<br>
+cell: 3<br>
+phone: 555-4444<br>
+fax: 555-3333<br>
+cell: 760-1234<br>
+]]>
+</programlisting>
</example>
<para>
- Loop foreach também tem as suas próprias variáveis para manipilar a as propriedades
+ Loop foreach também tem as suas próprias variáveis para manipilar as propriedades
foreach. Estas são indicadas assim: {$smarty.foreach.foreachname.varname} com
foreachname sendo o nome especificado no atributo
<emphasis>name</emphasis> do foreach.
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-if.xml Wed Sep 22 10:57:20 2004
@@ -1,22 +1,136 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.if">
<title>if,elseif,else</title>
<para>
- Comandos if no Smarty tem muito da mesma flexibilidade do php,
- com algumas adições para a ferramenta de template.
+ Comandos {if} no Smarty tem muito da mesma flexibilidade do php,
+ com algumas características à mais para o sistema de template.
Todo <emphasis>if</emphasis> deve ter o seu
<emphasis>/if</emphasis>. <emphasis>else</emphasis> e
- <emphasis>elseif</emphasis> também são permitidos. "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","==","!=",">", "<","<=",">=" são todos os qualificadores
- de condição válidos, e ddevem estar separados
- dos elementos em roda por espaço.
+ <emphasis>elseif</emphasis> também são permitidos. Todos os
+ condicionais do PHP são reconhecidos, tais como ||, or, &&, and, etc.
</para>
+
+ <para>
+ A seguir está uma lsita dos qualificadores, que devem estar separados dos elementos
+ por espaço. Note que itens listado entre [conchetes] são opcionais. Os equivalentes
+ em PHP são mostrados quando aplicáveis.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="4">
+ <colspec colname="qualifier" align="center" />
+ <colspec colname="alternates" align="center" />
+ <colspec colname="example" />
+ <colspec colname="meaning" />
+ <colspec colname="php" />
+ <thead>
+ <row>
+ <entry>Qualificador</entry>
+ <entry>Alternativas</entry>
+ <entry>Exemplo de sintaxe</entry>
+ <entry>Significado</entry>
+ <entry>Equivalente no PHP</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>==</entry>
+ <entry>eq</entry>
+ <entry>$a eq $b</entry>
+ <entry>iguais</entry>
+ <entry>==</entry>
+ </row>
+ <row>
+ <entry>!=</entry>
+ <entry>ne, neq</entry>
+ <entry>$a neq $b</entry>
+ <entry>não iguais</entry>
+ <entry>!=</entry>
+ </row>
+ <row>
+ <entry>></entry>
+ <entry>gt</entry>
+ <entry>$a gt $b</entry>
+ <entry>maior que</entry>
+ <entry>></entry>
+ </row>
+ <row>
+ <entry><</entry>
+ <entry>lt</entry>
+ <entry>$a lt $b</entry>
+ <entry>menor que</entry>
+ <entry><</entry>
+ </row>
+ <row>
+ <entry>>=</entry>
+ <entry>gte, ge</entry>
+ <entry>$a ge $b</entry>
+ <entry>maior ou igual à</entry>
+ <entry>>=</entry>
+ </row>
+ <row>
+ <entry><=</entry>
+ <entry>lte, le</entry>
+ <entry>$a le $b</entry>
+ <entry>menor ou igual à</entry>
+ <entry><=</entry>
+ </row>
+ <row>
+ <entry>!</entry>
+ <entry>not</entry>
+ <entry>not $a</entry>
+ <entry>negação (unary)</entry>
+ <entry>!</entry>
+ </row>
+ <row>
+ <entry>%</entry>
+ <entry>mod</entry>
+ <entry>$a mod $b</entry>
+ <entry>módulo</entry>
+ <entry>%</entry>
+ </row>
+ <row>
+ <entry>is [not] div by</entry>
+ <entry></entry>
+ <entry>$a is not div by 4</entry>
+ <entry>divisível por</entry>
+ <entry>$a % $b == 0</entry>
+ </row>
+ <row>
+ <entry>is [not] even</entry>
+ <entry></entry>
+ <entry>$a is not even</entry>
+ <entry>[not] an even number (unary)</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>grouping level [not] even</entry>
+ <entry>($a / $b) % 2 == 0</entry>
+ </row>
+ <row>
+ <entry>is [not] odd</entry>
+ <entry></entry>
+ <entry>$a is not odd</entry>
+ <entry>[not] an odd number (unary)</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>[not] an odd grouping</entry>
+ <entry>($a / $b) % 2 != 0</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
<example>
<title>comandos if</title>
<programlisting>
+<![CDATA[
{if $name eq "Fred"}
Welcome Sir.
{elseif $name eq "Wilma"}
@@ -43,7 +157,7 @@
{* parenteses são permitidos *}
-{if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#}
+{if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#}
...
{/if}
@@ -63,7 +177,7 @@
...
{/if}
-{* test if var is divisible by 4 *}
+{* verifica se a variável é divisível por 4 *}
{if $var is div by 4}
...
{/if}
@@ -77,7 +191,9 @@
{* 0=even, 1=even, 2=even, 3=odd, 4=odd, 5=odd, etc. *}
{if $var is even by 3}
...
-{/if}</programlisting>
+{/if}
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include-php.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.include.php">
<title>include_php</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -45,18 +45,29 @@
</tbody>
</tgroup>
</informaltable>
+ <note>
+ <title>Nota Técnica</title>
+ <para>
+ include_php está quase sendo retirado do Smarty, você pode obter a mesma funcionalidade
+ usando uma função customizada em um template. A única razão para usar o include_php é
+ se você realmente precisar deixar função php fora do diretório de plugin ou código da
+ sua aplicação. Veja a seção
+ <link linkend="tips.componentized.templates">templates componentizados</link>
+ para mais detalhes.
+ </para>
+ </note>
<para>
Tags include_php são usadas para incluir um script php no seu template.
Se a segurança estiver ativada, então o script php deve estar localizado
- no caminho $trusted_dir. A tag include_php deve ter o atributo
- "file", o qual contém o caminho para o arquivo php a ser incluído,
- ou relativo a $trusted_dir, ou um caminho absoluto.
+ no diretório especificado na variável $trusted_dir. A tag include_php
+ deve ter o atributo "file", o qual contém o caminho para o arquivo php
+ incluído, pode ser um camiho tanto absoluto ou relativo a $trusted_dir.
</para>
<para>
- include_php é um bom meio de manipular templates com componentes,
- e mante o código PHP separado dos arquivos de template. Vamos dizer
+ include_php é um bom meio de manipular templates componentizados,
+ e manter o código PHP separado dos arquivos de template. Digamos
que você tenha um template que mostre a navegação do seu site, o qual
- é prenchido automaticamente a partir de um banco de dados. Você pode
+ é preenchido automaticamente a partir de um banco de dados. Você pode
manter a sua lógica PHP que obtém os dados em um diretório separado,
e inclui-la no topo do template. Agora você pode incluir este template
em qualquer lugar sem se preocupar se a informação do banco de dados foi
@@ -82,29 +93,32 @@
<example>
<title>Função include_php</title>
<programlisting>
+<![CDATA[
load_nav.php
-------------
-<?php
+<?php
- // carrega variáveis de um banco de dados mysql e define ela para o template
+ // carrega variáveis de um banco de dados mysql e define elas para o template
require_once("MySQL.class.php");
$sql = new MySQL;
$sql->query("select * from site_nav_sections order by name",SQL_ALL);
$this->assign('sections',$sql->record);
-?>
+?>
index.tpl
---------
{* caminho absoluto ou relativo a $trusted_dir *}
-{include_php file="/path/to/load_nav.php"}
+{include_php file="/caminho/para/load_nav.php"}
{foreach item="curr_section" from=$sections}
- <a href="{$curr_section.url}">{$curr_section.name}</a><br>
-{/foreach}</programlisting>
+ <a href="{$curr_section.url}">{$curr_section.name}</a><br>
+{/foreach}
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-include.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.include">
<title>include</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -23,14 +23,14 @@
<entry>file</entry>
<entry>string</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome do arquivo de template a incluir</entry>
</row>
<row>
<entry>assign</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome de uma variável que irá
conter toda a saída do template</entry>
</row>
@@ -38,32 +38,35 @@
<entry>[var ...]</entry>
<entry>[var type]</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>Variável para passar localmente para o template</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
- Tags include são usados para incluir outros templates no template
- atual. Quaisquer variáveis disponíveis no template atual também esta
- disponível dentro do template incluido. A tag include deve ter o atributo
+ Tags include são usadas para incluir outros templates no template
+ atual. Quaisquer variáveis disponíveis no template atual também estarão
+ disponíveis junto com template incluído. A tag include deve ter o atributo
"file", o qual contém o caminho do arquivo a incluir.
</para>
<para>
Você pode opcionalmente passar o atributo <emphasis>assign</emphasis>,
o qual irá especificar o nome de uma variável de template para a qual
- conterá toda a saída de <emphasis>include</emphasis> ao
- invés de mostra-la.
+ conterá todo o conteúdo do <emphasis>include</emphasis> ao
+ invés de mostrá-lo.
</para>
<example>
<title>function include</title>
<programlisting>
-{include file="header.tpl"}
+<![CDATA[
+{include file="cabecalho.tpl"}
-{* O corpo do template vai aqui *}
+{* O conteúdo do template vem aqui *}
-{include file="footer.tpl"}</programlisting>
+{include file="rodape.tpl"}
+]]>
+</programlisting>
</example>
<para>
Você pode também passar variáveis para o template incluído como atributos.
@@ -75,31 +78,37 @@
<example>
<title>Função include passando variáveis</title>
<programlisting>
-{include file="header.tpl" title="Main Menu" table_bgcolor="#c0c0c0"}
+<![CDATA[
+{include file="cabecalho.tpl" title="Menu Principal" table_bgcolor="#c0c0c0"}
-{* O corpo de template vai aqui *}
+{* O conteúdo de template vem aqui *}
-{include file="footer.tpl" logo="http://my.domain.com/logo.gif"}</programlisting>
+{include file="rodape.tpl" logo="http://meu.dominio.com/logo.gif"}
+]]>
+</programlisting>
</example>
<para>
- Use a sintaxe para <link
+ Use a sintaxe de <link
linkend="template.resources">template resources</link> para
incluir arquivos fora do diretório $template_dir.
</para>
<example>
<title>Exemplos de recursos para a função include</title>
<programlisting>
+<![CDATA[
{* caminho absoluto *}
-{include file="/usr/local/include/templates/header.tpl"}
+{include file="/usr/local/include/templates/cabecalho.tpl"}
-{* caminho absoluto (mesma coisa) *}
-{include file="file:/usr/local/include/templates/header.tpl"}
+{* caminho absoluto (idem) *}
+{include file="file:/usr/local/include/templates/cabecalho.tpl"}
{* caminho absoluto do windows (DEVE usar o prefixo "file:") *}
-{include file="file:C:/www/pub/templates/header.tpl"}
+{include file="file:C:/www/pub/templates/cabecalho.tpl"}
{* incluir a partir do recurso de template chamado "db" *}
-{include file="db:header.tpl"}</programlisting>
+{include file="db:header.tpl"}
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-insert.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.insert">
<title>insert</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do Atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -23,14 +23,14 @@
<entry>name</entry>
<entry>string</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da função insert (insert_name)</entry>
</row>
<row>
<entry>assign</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da variável que
irá receber a saída</entry>
</row>
@@ -38,7 +38,7 @@
<entry>script</entry>
<entry>string</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome de um script php que será incluido
antes que a função insert seja chamada</entry>
</row>
@@ -46,7 +46,7 @@
<entry>[var ...]</entry>
<entry>[var type]</entry>
<entry>Não</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>Variável para passar para a função insert</entry>
</row>
</tbody>
@@ -59,18 +59,18 @@
executada a cada invocação do template.
</para>
<para>
- Vamos dizer que você tenha um template com um banner em cima. O
- banner pode conter qualquer mistura de html, imagens, flash, etc.
- Assin nós não podemos usar uma ligação estatica aqui, e nós não
- queremos que este conteúdo fique no cache com a página. Aqui vem a tag
+ Digamos que você tenha um template com um banner no topo da página. O
+ banner pode conter uma mistura de html, imagens, flash, etc.
+ Assim nós não podemos usar um link estatico aqui, e nós não
+ queremos que este conteúdo fique no cache junto com a página. E aí que entra a tag
insert: o template conhece os valores #banner_location_id# e
#site_id# (obtidos de um arquivo de configuração), e precisa chamar
uma função para obter o conteúdo do banner.
</para>
<example>
-<title>function insert</title>
+<title>função insert</title>
<programlisting>
-{* example of fetching a banner *}
+{* exemplo de como obter um banner *}
{insert name="getBanner" lid=#banner_location_id# sid=#site_id#}</programlisting>
</example>
<para>
@@ -82,28 +82,34 @@
aplicação devem ser precedidas por "insert_" para prevenir possíveis
problemas com nomes de funções repetidos. Sua função insert_getBanner()
deve fazer alguma coisa com os valores passados e retornar os resultados.
- Estes resultados são mostrados no template em lugar da tag insert.
+ Estes resultados são mostrados no template no lugar da tag insert.
Neste exemplo, o Smarty irá chamar esta função:
insert_getBanner(array("lid" => "12345","sid" => "67890"));
e mostrar o resultado retornado no lugar da tag insert.
</para>
<para>
- Se você der o atributo "assign", a saída da tag insert será
+ Se você passar o atributo "assign", a saída da tag insert será
dada para esta variável ao invés de ser mostrada
- no template. Nota: definir a saída para uma variável não é
- útil quando o cache esta ativo.
- </para>
+ no template.
+ </para>
+ <note>
+ <title>Nota</title>
+ <para>
+ definir a saída para uma variável não é
+ útil quando o cache esta ativo.
+ </para>
+ </note>
<para>
- Se você der o atributo "script", este script php será incluido
+ Se você passar o atributo "script", este script php será incluido
(apenas uma vez) antes da execução da função insert. Este
é o caso onde a função insert não existe ainda, e um script
php deve ser incluído antes para faze-la funcionar. O caminho pode
- ser absoluto ou relativo a $trusted_dir. Quando a segurança esta
- ativada, o script deve estar em $trusted_dir.
+ ser absoluto ou relativo à variável $trusted_dir. Quando a segurança esta
+ ativada, o script deve estar no local definido na variável $trusted_dir.
</para>
<para>
- O objeto Smarty é passado como segundo argumento. Desde modo
- pocê pode refenciar o objeto Smarty
+ O objeto Smarty é passado como segundo argumento. Deste modo
+ você pode refenciar o objeto Smarty
de dentro da função.
</para>
<note>
@@ -114,7 +120,7 @@
ativado, tags insert não estarão no cache. Ela será executada
dinamicamente a cada vez que a página seja criada, mesmo com
páginas em cache. Isto funciona bem para coisas como banners, pesquisa,
- clima, resultados de pesquisa, areas de opnião do usuário, etc.
+ previsões do tempo, resultados de pesquisa, áreas de opnião do usuário, etc.
</para>
</note>
</sect1>
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-ldelim.xml Wed Sep 22 10:57:20 2004
@@ -1,23 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.ldelim">
<title>ldelim,rdelim</title>
<para>
- ldelim e rdelim são usados para mostrar os delimitadores literalmente,
- no nosso caso "{" ou "}". A ferramente de template sempre
- tenta interpretar os delimitadores, então este é o meio de contornar isso.
+ ldelim e rdelim são usados para mostrar os delimitadores de templates literalmente,
+ no nosso caso "{" ou "}". Ou você pode usar {literal}{/literal} para
+ interpretar blocos de texto literalmente. Veja também {$smarty.ldelim} e {$smarty.rdelim}
</para>
<example>
<title>ldelim, rdelim</title>
<programlisting>
-{* isto irá mostrar os delimitadore no template *}
+<![CDATA[
+{* isto fará com que os delimitadores de template sejam tratados literalmente *}
-{ldelim}funcname{rdelim} is how functions look in Smarty!
-
-
-MOSTRA:
-
-{funcname} is how functions look in Smarty!</programlisting>
+{ldelim}funcname{rdelim} é como a função aparecer no Smarty!
+]]>
+</programlisting>
+<para>O exemplo acima exibirá:</para>
+<programlisting>
+<![CDATA[
+{funcname} é como a função aparecer no Smarty
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-literal.xml Wed Sep 22 10:57:20 2004
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.literal">
<title>literal</title>
<para>
- Tags literal permitem que um bloco de dados seja tomado literalmente,
- não sendo interpretado pelo smarty. Isto é útil
- para coisas como seções javascript, aonde podem haver
- chaves("{}") e coisas assim que possam confundir
- o interpretador do template.
- Qualquer coisa dentro das {literal}{/literal} não será interpretado, mas mostrado como estiver.
+ Tags literal permitem que um bloco de dados seja tratado literalmente, ou seja,
+ não é interpretado pelo Smarty. Isto é tipicamente usado com blocos de código
+ javascript ou folhas de estilo (stylesheet), que às vezes contém chaves
+ que podem entrar em conflito com o delimitador de sintaxe. Qualquer coisa entre
+ {literal}{/literal} não é interpretado, mas é mostrado. Se você precisa que
+ tags de templates sejam embutidas em um bloco literal, use {ldelim}{rdelim}.
</para>
<example>
<title>Tags literal</title>
<programlisting>
+<![CDATA[
{literal}
- <script language=javascript>
+ <script language=javascript>
- <!--
+ <!--
function isblank(field) {
if (field.value == '')
{ return false; }
@@ -26,10 +27,12 @@
return true;
}
}
- // -->
+ // -->
- </script>
-{/literal}</programlisting>
+ </script>
+{/literal}
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-php.xml Wed Sep 22 10:57:20 2004
@@ -1,21 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.php">
<title>php</title>
<para>
- Tags php permitem que você adicione código php diretamente no template.
- Não será escapado, não importando a definição de <link
- linkend="variable.php.handling">$php_handling</link>. Isto
- é apenas para usuários avançados e normalmente não é necessário.
+ Tags php permitem que códigos php sejam embutidos diretamente nos templates.
+ Eles não serão interpretados, não importando a definição de
+ <link linkend="variable.php.handling">$php_handling</link>. Esta opção é
+ somente para usuários avançados e normalmente não é necessária.
</para>
<example>
<title>Tags php</title>
<programlisting>
+<![CDATA[
{php}
// incluindo um script php
// diretamente no template.
- include("/path/to/display_weather.php");
-{/php}</programlisting>
+ include("/caminho/para/condicoes_do_tempo.php");
+{/php}
+]]>
+</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-section.xml Wed Sep 22 10:57:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.section">
<title>section,sectionelse</title>
<informaltable frame="all">
@@ -13,7 +13,7 @@
<row>
<entry>Nome do atributo</entry>
<entry>Tipo</entry>
- <entry>Requerido</entry>
+ <entry>Obrigatório</entry>
<entry>Padrão</entry>
<entry>Descrição</entry>
</row>
@@ -23,14 +23,14 @@
<entry>name</entry>
<entry>string</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da seção</entry>
</row>
<row>
<entry>loop</entry>
<entry>[$variable_name]</entry>
<entry>Sim</entry>
- <entry><emphasis>n/a</emphasis></entry>
+ <entry><emphasis>n/d</emphasis></entry>
<entry>O nome da variável para determinar o
número de interações</entry>
</row>
@@ -41,10 +41,10 @@
<entry><emphasis>0</emphasis></entry> <entry>A posição
do índice que a seção vai começar. Se o valor
é negativo, a posição de inicio é calculada a partir
- do final da matriz. For exemplo, se houverem
- sete valores na matriz e start for -2, o
+ do final da matriz. Por exemplo, se houverem
+ sete valores na matriz e 'start' for -2, o
índice inicial é 5. Valores inválidos (valores fora do
- tamanho da matriz) são automaticamente truncados
+ tamanho da matriz) são automaticamente corrigidos
para o valor válido mais próximo.</entry>
</row>
<row>
@@ -52,8 +52,8 @@
<entry>integer</entry>
<entry>Não</entry>
<entry><emphasis>1</emphasis></entry>
- <entry>O valor do passo que será usado para o loop
- na matriz. Por exemplo, step=2 irá realizar o loop com
+ <entry>O valor do passo que será usado para percorrer
+ a matriz. Por exemplo, step=2 irá percorrer
os índices 0,2,4, etc. Se step for negativo, ele irá caminhar
pela matriz de trás para frente.</entry>
</row>
@@ -76,149 +76,170 @@
</tgroup>
</informaltable>
<para>
- sections de template são usada para realizar um loop por uma matriz. Todas as tags
- <emphasis>section</emphasis> devem ter as suas
- <emphasis>/section</emphasis>. Parâmetros requeridos são
- <emphasis>name</emphasis> e <emphasis>loop</emphasis>. O nome
- de section pode ser o que você quiser, feito de letras,
- números e sublinhados. Sections podem ser aninhadas, e os nomes das section
- aninhadas devem ser diferentes um dos outros. A variável do loop
- (normalmente uma matriz de valores) determina o número de vezes do
- loop da section. Quando estiver mostrando uma variável dentro de uma section,
- o nome da section deve estar ao lado da variável dentro de conchetes
- []. <emphasis>sectionelse</emphasis> é
- executado quando não houverem valores para a variável de loop.
+ Os 'sections' de template são usados para percorrer os dados de uma matriz.
+ Todas as tags <emphasis>section</emphasis> devem ser finalizadas com <emphasis>/section</emphasis>.
+ Os parâmetros obrigatórios são <emphasis>name</emphasis> e <emphasis>loop</emphasis>.
+ O nome da 'section' pode ser o que você quiser, contendo letras, números e sublinhados.
+ As 'sections' podem ser aninhadas, e os nomes das sections devem ser únicos. A variável
+ 'loop' (normalmente uma matriz de valores) determina o número de vezes que a section
+ será percorrida. Quando estiver exibindo uma variável dentro de uma section,
+ o nome da section deve estar ao lado da variável dentro de conchetes [].
+ <emphasis>sectionelse</emphasis> é executado quando não houver valores na
+ variável 'loop'.
</para>
<example>
<title>section</title>
<programlisting>
-
-{* este exemplo irá mostrar todos os valores de $custid array *}
-{section name=customer loop=$custid}
- id: {$custid[customer]}<br>
+<![CDATA[
+{* este exemplo irá mostrar todos os valores da matriz $custid *}
+{section name=consumidor loop=$custid}
+ id: {$custid[consumidor]}<br>
{/section}
-
-MOSTRA:
-
-id: 1000<br>
-id: 1001<br>
-id: 1002<br></programlisting>
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+id: 1000<br>
+id: 1001<br>
+id: 1002<br>
+]]>
+</programlisting>
</example>
<example>
<title>loop de variável section</title>
<programlisting>
-{* a variável de loo´p determina o número de vezes do loop.
- Vocâ pode acessar qualquer variável do template dentro da section.
- Este exemplo assume que $custid, $name e $address são todas
+<![CDATA[
+{* a variável 'loop' somente determina o número de vezes que irá percorrer a matriz.
+ Você pode acessar qualquer variável do template dentro da section.
+ Este exemplo assume que $custid, $nome e $endereco são todas
matrizes contendo o mesmo número de valores *}
-{section name=customer loop=$custid}
- id: {$custid[customer]}<br>
- name: {$name[customer]}<br>
- address: {$address[customer]}<br>
- <p>
-{/section}
-
-MOSTRA:
-
-id: 1000<br>
-name: John Smith<br>
-address: 253 N 45th<br>
-<p>
-id: 1001<br>
-name: Jack Jones<br>
-address: 417 Mulberry ln<br>
-<p>
-id: 1002<br>
-name: Jane Munson<br>
-address: 5605 apple st<br>
-<p></programlisting>
+{section name=consumidor loop=$custid}
+ id: {$custid[consumidor]}<br>
+ nome: {$nome[consumidor]}<br>
+ endereço: {$endereco[customer]}<br>
+ <p>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+id: 1000<br>
+nome: John Smith<br>
+endereço: 253 N 45th<br>
+<p>
+id: 1001<br>
+nome: Jack Jones<br>
+endereço: 417 Mulberry ln<br>
+<p>
+id: 1002<br>
+nome: Jane Munson<br>
+endereço: 5605 apple st<br>
+<p>
+]]>
+</programlisting>
</example>
<example>
<title>Nomes de section</title>
<programlisting>
-{* o nome de section pode ser o que você quiser,
- e é usado para referenciar os dados dentro da section *}
-{section name=mydata loop=$custid}
- id: {$custid[mydata]}<br>
- name: {$name[mydata]}<br>
- address: {$address[mydata]}<br>
- <p>
-{/section}</programlisting>
+<![CDATA[
+{* o nome da seção pode ser o que você qusier,
+ e é usado para referenciar os dados contido na seção *}
+
+{section name=meusdados loop=$custid}
+ id: {$custid[meusdados]}<br>
+ nome: {$nome[meusdados]}<br>
+ endereço: {$endereco[meusdados]}<br>
+ <p>
+{/section}
+]]>
+</programlisting>
</example>
<example>
<title>sections aninhadas</title>
<programlisting>
-{* sections podem ser aninhadas tão profundamente quanto você quiser. Com sections aninhadas,
- você pode acessar estruturas de dados complexas, como matriz multi-dimensionais.
- Neste exemplo, $contact_type[customer] é uma matriz de
- tipos de contato para o custumer atual. *}
+<![CDATA[
+{* sections podem ser aninhadas até o nível que você quiser. Com sections aninhadas,
+ você pode acessar complexas estruturas de dados, tais como matrizes multi-dimensionais.
+ Neste exemplo, $contact_type[customer] é uma matriz contendo os tipos de contatos
+ do consumidor atualmente selecionado. *}
+
{section name=customer loop=$custid}
- id: {$custid[customer]}<br>
- name: {$name[customer]}<br>
- address: {$address[customer]}<br>
+ id: {$custid[customer]}<br>
+ name: {$name[customer]}<br>
+ address: {$address[customer]}<br>
{section name=contact loop=$contact_type[customer]}
- {$contact_type[customer][contact]}: {$contact_info[customer][contact]}<br>
+ {$contact_type[customer][contact]}: {$contact_info[customer][contact]}<br>
{/section}
- <p>
+ <p>
{/section}
-
-
-MOSTRA:
-
-id: 1000<br>
-name: John Smith<br>
-address: 253 N 45th<br>
-home phone: 555-555-5555<br>
-cell phone: 555-555-5555<br>
-e-mail: [email protected]<br>
-<p>
-id: 1001<br>
-name: Jack Jones<br>
-address: 417 Mulberry ln<br>
-home phone: 555-555-5555<br>
-cell phone: 555-555-5555<br>
-e-mail: [email protected]<br>
-<p>
-id: 1002<br>
-name: Jane Munson<br>
-address: 5605 apple st<br>
-home phone: 555-555-5555<br>
-cell phone: 555-555-5555<br>
-e-mail: [email protected]<br>
-<p></programlisting>
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+id: 1000<br>
+name: John Smith<br>
+address: 253 N 45th<br>
+home phone: 555-555-5555<br>
+cell phone: 555-555-5555<br>
+e-mail: [email protected]<br>
+<p>
+id: 1001<br>
+name: Jack Jones<br>
+address: 417 Mulberry ln<br>
+home phone: 555-555-5555<br>
+cell phone: 555-555-5555<br>
+e-mail: [email protected]<br>
+<p>
+id: 1002<br>
+name: Jane Munson<br>
+address: 5605 apple st<br>
+home phone: 555-555-5555<br>
+cell phone: 555-555-5555<br>
+e-mail: [email protected]<br>
+<p>
+]]>
+</programlisting>
</example>
<example>
<title>sections e matrizes associativas</title>
<programlisting>
-{* Este é um exemplo de mostrar os dados de matriz associativa
- dentro da section *}
-{section name=customer loop=$contacts}
- name: {$contacts[customer].name}<br>
- home: {$contacts[customer].home}<br>
- cell: {$contacts[customer].cell}<br>
- e-mail: {$contacts[customer].email}<p>
+<![CDATA[
+{* Este é um exemplo de exibição de uma matriz associativa
+ dentro de uma seção *}
+
+{section name=consumidor loop=$contatos}
+ nome: {$contatos[consumidor].nome}<br>
+ telefone: {$contatos[consumidor].telefone}<br>
+ celular: {$contatos[consumidor].celular}<br>
+ e-mail: {$contatos[consumidor].email}<p>
{/section}
-
-
-MOSTRA:
-
-name: John Smith<br>
-home: 555-555-5555<br>
-cell: 555-555-5555<br>
-e-mail: [email protected]<p>
-name: Jack Jones<br>
-home phone: 555-555-5555<br>
-cell phone: 555-555-5555<br>
-e-mail: [email protected]<p>
-name: Jane Munson<br>
-home phone: 555-555-5555<br>
-cell phone: 555-555-5555<br>
-e-mail: [email protected]<p></programlisting>
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+name: John Smith<br>
+home: 555-555-5555<br>
+cell: 555-555-5555<br>
+e-mail: [email protected]<p>
+name: Jack Jones<br>
+home phone: 555-555-5555<br>
+cell phone: 555-555-5555<br>
+e-mail: [email protected]<p>
+name: Jane Munson<br>
+home phone: 555-555-5555<br>
+cell phone: 555-555-5555<br>
+e-mail: [email protected]<p>
+]]>
+</programlisting>
</example>
@@ -226,52 +247,61 @@
<example>
<title>sectionelse</title>
<programlisting>
-{* sectionelse irá executar se não houverem mais valores $custid *}
-{section name=customer loop=$custid}
- id: {$custid[customer]}<br>
+<![CDATA[
+{* sectionelse irá executar se não houverem mais valores em $custid *}
+
+{section name=consumidor loop=$custid}
+ id: {$custid[consumidor]}<br>
{sectionelse}
- there are no values in $custid.
-{/section}</programlisting>
+ não há valores em $custid.
+{/section}
+]]>
+</programlisting>
</example>
<para>
- Sections também tem as suas próprias variáveis que manipulam as propriedaes section.
- Estas são indicadas assim: {$smarty.section.sectionname.varname}
- </para>
- <para>
- NOTA: a partir do Smarty 1.5.0, a sintaxe para as variáveis de propriedades de section
- mudou de {%sectionname.varname%} para
- {$smarty.section.sectionname.varname}. A sintaxe antiga ainda é suportada,
- mas você irá ver referencias apenas a nova sintaxe nos
- exemplos do manual.
+ Sections também tem as suas próprias variáveis que manipulam as propriedades da section.
+ Estas são indicadas assim: {$smarty.section.nomesection.nomevariavel}
</para>
+ <note>
+ <title>Nota</title>
+ <para>
+ A partir do Smarty 1.5.0, a sintaxe para as variáveis de propriedades da section
+ mudou de {%nomesecao.nomevariavel%} para {$smarty.section.nomesection.nomevariavel}. A
+ sintaxe antiga ainda é suportada, mas você verá referências somente à nova sintaxe no
+ manual.
+ </para>
+ </note>
<sect2 id="section.property.index">
<title>index</title>
<para>
index é usado para mostrar o índice atual do loop, começando em zero
- (ou pelo atributo start se dado), e incrementando por um (ou pelo
- atributo step se dado).
+ (ou pelo atributo start caso tenha sido definido), e incrementado por um
+ (ou pelo atributo step caso tenha sido definido).
</para>
<note>
- <title>Nota Técnica</title>
+ <title>Nota Técnica:</title>
<para>
- Se as propriedades section não for modificada,
- então isto funciona igual a propriedade iteration da section,
- exceto que começa em 0 ao invés de 1.
+ Se as propriedades 'start' e 'step' da section não foram modificadas,
+ elas irão funcionar da mesma maneira que a propriedade 'interation' da
+ section funcionam, exceto que ela começa do 0 ao invés de 1.
</para>
</note>
<example>
- <title>section property index</title>
+ <title>propriedade index da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {/section}
-
-
- MOSTRA:
-
- 0 id: 1000<br>
- 1 id: 1001<br>
- 2 id: 1002<br>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+0 id: 1000<br>
+1 id: 1001<br>
+2 id: 1002<br>
+]]>
</programlisting>
</example>
</sect2>
@@ -279,28 +309,31 @@
<title>index_prev</title>
<para>
index_prev é usado para mostrar o índice anterior do loop.
- No primeiro loop, isto é definido como -1.
+ No primeiro loop, o valor dele é -1.
</para>
<example>
- <title>section property index_prev</title>
+ <title>propriedade index_prev da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {* FYI, $custid[customer.index] and $custid[customer] are identical in meaning *}
- {if $custid[customer.index_prev] ne $custid[customer.index]}
- The customer id changed<br>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+ {* Para sua informação, $custid[consumidor.index] e $custid[consumidor] tem o mesmo significado *}
+ {if $custid[consumidor.index_prev] ne $custid[consumidor.index]}
+ O id do consumidor irá mudar<br>
{/if}
- {/section}
-
-
- MOSTRA:
-
- 0 id: 1000<br>
- The customer id changed<br>
- 1 id: 1001<br>
- The customer id changed<br>
- 2 id: 1002<br>
- The customer id changed<br>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+0 id: 1000<br>
+ O id do consumidor irá mudar<br>
+1 id: 1001<br>
+ O id do consumidor irá mudar<br>
+2 id: 1002<br>
+ O id do consumidor irá mudar<br>
+]]>
</programlisting>
</example>
</sect2>
@@ -309,28 +342,31 @@
<para>
index_next é usado para mostrar o próximo indice do loop. No último loop,
isto ainda é um mais o índice atual( respeitando a definição
- do atributo step, se dado.)
+ do atributo step, caso tenha sido definido.)
</para>
<example>
- <title>section property index_next</title>
+ <title>propriedade index_next section</title>
<programlisting>
- {section name=customer loop=$custid}
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {* FYI, $custid[customer.index] and $custid[customer] are identical in meaning *}
- {if $custid[customer.index_next] ne $custid[customer.index]}
- The customer id will change<br>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+ {* Para sua informação, $custid[consumidor.index] e $custid[consumidor] tem o mesmo significado *}
+ {if $custid[consumidor.index_next] ne $custid[consumidor.index]}
+ O id do consumidor irá mudar<br>
{/if}
- {/section}
-
-
- MOSTRA:
-
- 0 id: 1000<br>
- The customer id will change<br>
- 1 id: 1001<br>
- The customer id will change<br>
- 2 id: 1002<br>
- The customer id will change<br>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+0 id: 1000<br>
+ O id do consumidor irá mudar<br>
+1 id: 1001<br>
+ O id do consumidor irá mudar<br>
+2 id: 1002<br>
+ O id do consumidor irá mudar<br>
+]]>
</programlisting>
</example>
</sect2>
@@ -339,36 +375,42 @@
<para>
iteration é usado para mostrar a interação atual do loop.
</para>
- <para>
- NOTA: isto não é afetado pelas propriedades start, step e
- max, diferentemente das propriedade index. Iteration também começa com 1
- ao invés de 0 como index. rownum é um apelido para iteration,
- elas funcionam de modo identico.
- </para>
+ <note>
+ <title>Nota:</title>
+ <para>
+ 'interation' não é afetado pelas propriedades start, step e max da section,
+ diferentemente da propriedade index. Interation diferente de 'index' começa
+ com 1 ao invés de 0. 'rownum' é um sinônimo de 'interation', eles exercem a
+ mesma função.
+ </para>
+ </note>
<example>
- <title>section property iteration</title>
+ <title>propriedade interation da section</title>
<programlisting>
- {section name=customer loop=$custid start=5 step=2}
- current loop iteration: {$smarty.section.customer.iteration}<br>
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {* FYI, $custid[customer.index] and $custid[customer] are identical in meaning *}
- {if $custid[customer.index_next] ne $custid[customer.index]}
- The customer id will change<br>
+<![CDATA[
+{section name=consumidor loop=$custid start=5 step=2}
+ interação atual do loop: {$smarty.section.consumidor.iteration}<br>
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+ {* Para sua informação, $custid[consumidor.index] e $custid[consumidor] tem o mesmo significado *}
+ {if $custid[consumidor.index_next] ne $custid[consumidor.index]}
+ O id do consumidor irá mudar<br>
{/if}
- {/section}
-
-
- MOSTRA:
-
- current loop iteration: 1
- 5 id: 1000<br>
- The customer id will change<br>
- current loop iteration: 2
- 7 id: 1001<br>
- The customer id will change<br>
- current loop iteration: 3
- 9 id: 1002<br>
- The customer id will change<br>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+interação atual do loop: 1
+5 id: 1000<br>
+ O id do consumidor irá mudar<br>
+interação atual do loop: 2
+7 id: 1001<br>
+ O id do consumidor irá mudar<br>
+interação atual do loop: 3
+9 id: 1002<br>
+ O id do consumidor irá mudar<br>
+]]>
</programlisting>
</example>
</sect2>
@@ -379,62 +421,66 @@
é a primeira.
</para>
<example>
- <title>section property first</title>
+ <title>propriedade first da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {if $smarty.section.customer.first}
- <table>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {if $smarty.section.consumidor.first}
+ <table>
{/if}
- <tr><td>{$smarty.section.customer.index} id:
- {$custid[customer]}</td></tr>
+ <tr><td>{$smarty.section.consumidor.index} id: {$custid[consumidor]}</td></tr>
- {if $smarty.section.customer.last}
- </table>
+ {if $smarty.section.consumidor.last}
+ </table>
{/if}
- {/section}
-
-
- MOSTRA:
-
- <table>
- <tr><td>0 id: 1000</td></tr>
- <tr><td>1 id: 1001</td></tr>
- <tr><td>2 id: 1002</td></tr>
- </table>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+<table>
+ <tr><td>0 id: 1000</td></tr>
+ <tr><td>1 id: 1001</td></tr>
+ <tr><td>2 id: 1002</td></tr>
+</table>
+]]>
</programlisting>
</example>
</sect2>
<sect2 id="section.property.last">
<title>last</title>
<para>
- last é definido como true de a interação atual da
+ last é definido como true se a interação atual da
section é a última.
</para>
<example>
- <title>section property last</title>
+ <title>propriedade last da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {if $smarty.section.customer.first}
- <table>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {if $smarty.section.consumidor.first}
+ <table>
{/if}
- <tr><td>{$smarty.section.customer.index} id:
- {$custid[customer]}</td></tr>
+ <tr><td>{$smarty.section.consumidor.index} id: {$custid[consumidor]}</td></tr>
- {if $smarty.section.customer.last}
- </table>
+ {if $smarty.section.consumidor.last}
+ </table>
{/if}
- {/section}
-
-
- MOSTRA:
-
- <table>
- <tr><td>0 id: 1000</td></tr>
- <tr><td>1 id: 1001</td></tr>
- <tr><td>2 id: 1002</td></tr>
- </table>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+<table>
+ <tr><td>0 id: 1000</td></tr>
+ <tr><td>1 id: 1001</td></tr>
+ <tr><td>2 id: 1002</td></tr>
+</table>
+]]>
</programlisting>
</example>
</sect2>
@@ -442,106 +488,120 @@
<title>rownum</title>
<para>
rownum é usado para mostrar a interação atual do loop,
- começando em um. É um apelido para iteration,
- elas funcionam de modo identico.
+ começando em um. É um sinônimo de iteration,
+ eles exercem a mesma função.
</para>
<example>
- <title>section property rownum</title>
+ <title>propriedade rownum da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {$smarty.section.customer.rownum} id: {$custid[customer]}<br>
- {/section}
-
-
- MOSTRA:
-
- 1 id: 1000<br>
- 2 id: 1001<br>
- 3 id: 1002<br>
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {$smarty.section.consumidor.rownum} id: {$custid[consumidor]}<br>
+{/section}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+1 id: 1000<br>
+2 id: 1001<br>
+3 id: 1002<br>
+]]>
</programlisting>
</example>
</sect2>
<sect2 id="section.property.loop">
<title>loop</title>
<para>
- loop é usado para mostrar o último número do índice do loop desta
- section. Isto pode ser usado dentro ou depois de section.
+ loop é usado para exibir o número do último índice que a section percorreu.
+ Ele pode ser usado dentro ou após o término da section.
</para>
<example>
- <title>section property index</title>
+ <title>propridade index da section</title>
<programlisting>
- {section name=customer loop=$custid}
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {/section}
-
- There were {$smarty.section.customer.loop} customers shown above.
-
- MOSTRA:
+<![CDATA[
+{section name=consumidor loop=$custid}
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+{/section}
- 0 id: 1000<br>
- 1 id: 1001<br>
- 2 id: 1002<br>
+ Foram mostrados {$smarty.section.customer.loop} consumidores acima.
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+0 id: 1000<br>
+1 id: 1001<br>
+2 id: 1002<br>
- There were 3 customers shown above.
+Foram mostrados 3 consumidores acima.
+]]>
</programlisting>
</example>
</sect2>
<sect2 id="section.property.show">
<title>show</title>
<para>
- <emphasis>show</emphasis> é usado como parâmetro para section.
- <emphasis>show</emphasis> é um valor booleano, true ou false. Se
- false, a section não será mostrada. Se existir um sectionelse
- presente, esta será alternativamente mostrado.
+ <emphasis>show</emphasis> é usado como um parâmetro da section. <emphasis>show</emphasis>
+ é um valor booleano, verdadeiro ou falso. Caso seja falso, a section não será mostrada.
+ Se existir uma sectionelse presente, ela será exibida.
</para>
<example>
- <title>section attribute show</title>
+ <title>atributo show da section</title>
<programlisting>
- {* $show_customer_info deve ser passada da aplicação PHP,
- para regular quando mostrar ou não mostrar esta section *}
- {section name=customer loop=$custid show=$show_customer_info}
- {$smarty.section.customer.rownum} id: {$custid[customer]}<br>
- {/section}
-
- {if $smarty.section.customer.show}
- the section was shown.
- {else}
- the section was not shown.
- {/if}
-
+<![CDATA[
+{* $mostrar_info_consumidor talvez tenha que ser enviada pela
+ aplicação PHP, para decidir quando mostrar ou não mostrar esta section *}
- MOSTRA:
+{section name=consumidor loop=$custid show=$mostrar_info_consumidor}
+ {$smarty.section.consumidor.rownum} id: {$custid[consumidor]}<br>
+{/section}
- 1 id: 1000<br>
- 2 id: 1001<br>
- 3 id: 1002<br>
+{if $smarty.section.consumidor.show}
+ a section foi mostrada.
+{else}
+ a section não foi mostrada.
+{/if}
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+1 id: 1000<br>
+2 id: 1001<br>
+3 id: 1002<br>
- the section was shown.
+a section foi mostrada.
+]]>
</programlisting>
</example>
</sect2>
<sect2 id="section.property.total">
<title>total</title>
<para>
- total é usado para mostrar o número de interações que esta section terá.
- Isto pode ser usado dentro ou depois da section.
+ total é usado para exibir o número de interações que esta section irá percorrer.
+ Ela pode ser usada dentro ou após a section.
</para>
<example>
- <title>section property total</title>
+ <title>propriedade total da section</title>
<programlisting>
- {section name=customer loop=$custid step=2}
- {$smarty.section.customer.index} id: {$custid[customer]}<br>
- {/section}
-
- There were {$smarty.section.customer.total} customers shown above.
-
- MOSTRA:
+<![CDATA[
+{section name=consumidor loop=$custid step=2}
+ {$smarty.section.consumidor.index} id: {$custid[consumidor]}<br>
+{/section}
- 0 id: 1000<br>
- 2 id: 1001<br>
- 4 id: 1002<br>
+ Foram mostrados {$smarty.section.customer.loop} consumidores acima.
+]]>
+</programlisting>
+<para>MOSTRA:</para>
+<programlisting>
+<![CDATA[
+0 id: 1000<br>
+2 id: 1001<br>
+4 id: 1002<br>
- There were 3 customers shown above.
+Foram mostrados 3 consumidores acima.
+]]>
</programlisting>
</example>
</sect2>
http://cvs.php.net/diff.php/smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml
diff -u smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml:1.1 smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml:1.2
--- smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml:1.1 Tue Apr 13 04:45:29 2004
+++ smarty/docs/pt_BR/designers/language-builtin-functions/language-function-strip.xml Wed Sep 22 10:57:20 2004
@@ -1,55 +1,59 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<sect1 id="language.function.strip">
<title>strip</title>
<para>
- Várias vezes web designers tem problemas com espaços em branco e
- carriage returns afetam a saída do HTML (browser
- "features"), assim você tem que colocar todas as suas tags juntas para ter
- os resultados desejados. Isto normalmente termina em um
- template ilegível ou que não se consegue ler.
+ Muitas vezes web designers tem problemas com espaços em branco e
+ caracteres especiais (carriage returns) afetam a exibição do HTML
+ ("características" do navegador), assim você é obrigado à colocar todas
+ as suas tags juntas para obter os resultados esperados. Isso geralmente
+ acaba tornando o template ilegível ou não manipulável.
</para>
<para>
- Tudo dentro de {strip}{/strip} no Smarty tem retirados os espaços em branco
- e carriage returns no inicio e final das linhas
- antes que sejam mostrados. Deste modo você pode manter seu template
- legível, e não se preocupar com o espaço estra causando
+ Tudo entre as tags {strip}{/strip} no Smarty tem seus espaços extras
+ ou caracteres especiais (carriage returns) removidos no início e fim das
+ linhas antes de elas serem exibidas. Deste modo você pode manter seu
+ template legível, e não se preocupar com espaços extras causando
problemas.
</para>
<note>
<title>Nota Técnica</title>
<para>
{strip}{/strip} não afeta o conteúdo das variáveis de template.
- Veja <link linkend="language.modifier.strip">strip modifier
- function</link>.
+ Veja <link linkend="language.modifier.strip">modificador strip</link>.
</para>
</note>
<example>
<title>strip tags</title>
<programlisting>
-{* o seguinte estará tudo junto em uma linha na saída *}
+<![CDATA[
+{* o código abaixo será convertido em uma linha na hora da exibição *}
{strip}
-<table border=0>
- <tr>
- <td>
- <A HREF="{$url}">
- <font color="red">This is a test</font>
- </A>
- </td>
- </tr>
-</table>
+<table border=0>
+ <tr>
+ <td>
+ <A HREF="{$url}">
+ <font color="red">Isto é um teste</font>
+ </A>
+ </td>
+ </tr>
+</table>
{/strip}
-
-
-MOSTRA:
-
-<table border=0><tr><td><A HREF="http://my.domain.com"><font color="red">This is a test</font></A></td></tr></table></programlisting>
+]]>
+</programlisting>
+<para>MOSTRARÁ:</para>
+<programlisting>
+<![CDATA[
+<table border=0><tr><td><A HREF="http://meu.dominio.com"><font color="red">Isto é um teste</font></A></td></tr></table>
+]]>
+</programlisting>
</example>
<para>
- Note que no exemplo acima, todas as linhas começam e terminam
- com tags HTML. Tenha cuidado que todas as linhas ficam juntas.
- Se você tiver texto simples no inicio ou no final de uma linha,
- ele estará junto, e pode não ser o resultado desejado.
+ Observe que no exemplo acima, todas as linhas começam e terminam com tags HTML.
+ Esteja ciente para que todas as linhas fiquem juntas.
+ Se você tiver texto simples no início ou final de uma linha,
+ ele será juntado na hora da conversão e pode causar resultados
+ não desejados.
</para>
</sect1>
<!-- Keep this comment at the end of the file