Added <![CDATA[ tags, Sync translations infos, added missing param in count-characters

This commit is contained in:
gerald
2004-07-03 09:11:30 +00:00
parent b83cc891e4
commit 5624abeae8
6 changed files with 167 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.capitalize">
<title>capitalize</title>
<para>
@@ -8,22 +8,32 @@
</para>
<example>
<title>capitalize</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('titreArticle', 'La police commence une campagne de sensibilisation contre la violence routi<74>re.');
$smarty-&gt;display('index.tpl');
index.tpl:
{$titreArticle}
{$titreArticle|capitalize}
SORTIE:
$smarty->assign('articleTitle', 'Police begin campaign to rundown jaywalkers.');
$smarty->display('index.tpl');
?>
]]>
</programlisting>
<para>
Where index.tpl is:
</para>
<programlisting>
<![CDATA[
{$articleTitle}
{$articleTitle|capitalize}
]]>
</programlisting>
<screen>
<![CDATA[
La police commence une campagne de sensibilisation contre la violence routi<74>re.
La Police Commence Une Campagne De Sensibilisation Contre La Violence Routi<74>re.</programlisting>
La Police Commence Une Campagne De Sensibilisation Contre La Violence Routi<74>re.
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.cat">
<title>cat</title>
<informaltable frame="all">
@@ -35,20 +35,31 @@
</para>
<example>
<title>cat</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('TitreArticle', 'Les devins ont pr<70>vus que le monde existera toujours ');
$smarty-&gt;display('index.tpl');
index.tpl:
{$TitreArticle|cat:" demain."}
SORTIE:
Les devins ont pr<70>vus que le monde existera toujours demain.</programlisting>
$smarty->assign('articleTitle', "'Les devins ont pr<70>vus que le monde existera toujours");
$smarty->display('index.tpl');
?>
]]>
</programlisting>
<para>
Ou index.tpl est:
</para>
<programlisting>
<![CDATA[
{$articleTitle|cat:" demain."}
]]>
</programlisting>
<para>
Donne <20> l'<27>cran:
</para>
<screen>
<![CDATA[
Les devins ont pr<70>vus que le monde existera toujours demain.
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -1,30 +1,71 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.count.characters">
<title>count_characters</title>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
<colspec colname="type" align="center" />
<colspec colname="required" align="center" />
<colspec colname="default" align="center" />
<colspec colname="desc" />
<thead>
<row>
<entry>Position du param<61>tre</entry>
<entry>Type</entry>
<entry>Requis</entry>
<entry>Defaut</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>1</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>false</entry>
<entry>Si l'on doit inclure les espaces dans le compte.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
Compte le nombre de caract<63>res dans une variable.
</para>
<example>
<title>count_characters</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('titreArticle', 'Vagues de froid li<6C>es <20> la temp<6D>rature.');
$smarty-&gt;display('index.tpl');
index.tpl:
$smarty->assign('titreArticle', 'Vagues de froid li<6C>es <20> la temp<6D>rature.');
$smarty->display('index.tpl');
?>
]]>
</programlisting>
<para>
Ou index.tpl est:
</para>
<programlisting>
<![CDATA[
{$titreArticle}
{$titreArticle|count_characters}
SORTIE:
Vagues de froid li<6C>es <20> la temp<6D>rature.
39
{$titreArticle|count_characters:true}
]]>
</programlisting>
<para>
Ce qui donne en sortie :
</para>
<screen>
<![CDATA[
Vagues de froid li<6C>es <20> la temp<6D>rature.
33
39
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.count.paragraphs">
<title>count_paragraphs</title>
<para>
@@ -8,22 +8,30 @@
</para>
<example>
<title>count_paragraphs</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('TitreArticle', 'La guerre apporte la paix, au prix de la vie de certains innocents.');
$smarty-&gt;display('index.tpl');
index.tpl:
?>
]]>
</programlisting>
<para>
Ou index.tpl est:
</para>
<programlisting>
<![CDATA[
{$TitreArticle}
{$TitreArticle|count_paragraphs}
SORTIE:
]]>
</programlisting>
<screen>
<![CDATA[
La guerre apporte la paix, au prix de la vie des innocents.
1</programlisting>
1
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.count.sentences">
<title>count_sentences</title>
<para>
@@ -8,26 +8,38 @@
</para>
<example>
<title>count_sentences</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('TitreArticle', 'Deux navires rentrent en
$smarty->assign('TitreArticle', 'Deux navires rentrent en
collision - Un des deux coule. Des vaches enrag<61>es blessent un fermier <20>
coups de haches.');
$smarty-&gt;display('index.tpl');
index.tpl:
$smarty->display('index.tpl');
?>
]]>
</programlisting>
<para>
Where index.tpl is:
</para>
<programlisting>
<![CDATA[
{$TitreArticle}
{$TitreArticle|count_sentences}
SORTIE:
]]>
</programlisting>
<para>
Donne <20> l'<27>cran:
</para>
<screen>
<![CDATA[
Deux navires rentrent en collision
- Un des deux coule. Des vaches enrag<61>es blessent un fermier
<EFBFBD> coups de haches.
2</programlisting>
2
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.modifier.count.words">
<title>count_words</title>
<para>
@@ -8,22 +8,35 @@
</para>
<example>
<title>count_words</title>
<programlisting>
index.php:
<programlisting role="php">
<![CDATA[
<?php
$smarty = new Smarty;
$smarty-&gt;assign('TitreArticle', 'Un anneau pour les gouverner tous.');
$smarty-&gt;display('index.tpl');
index.tpl:
$smarty->assign('TitreArticle', 'Un anneau pour les gouverner tous.');
$smarty->display('index.tpl');
?>
]]>
</programlisting>
<para>
Ou index.tpl est:
</para>
<programlisting>
<![CDATA[
{$titreArticle}
{$titreArticle|count_words}
SORTIE:
]]>
</programlisting>
<para>
Donne <20> l'<27>cran:
</para>
<screen>
<![CDATA[
Un anneau pour les gouverner tous.
6</programlisting>
6
]]>
</screen>
</example>
</sect1>
<!-- Keep this comment at the end of the file