[poedit-users] Plural detection fail

MASSUCHETTI Jonathan <[email protected]> Sat, 29 May 2010 19:55:54 +0000
Newsgroups gmane.editors.poedit.user
Message-ID <[email protected]>
--===============0641572884062260718==
Content-Type: multipart/alternative; boundary=0015174c3eacff49a50487c10202

--0015174c3eacff49a50487c10202
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I'm using the Zend Framwork (v1.10) , and I want to use Zend_Translate with
Gettext adapter.
My Zend code looks like :


echo $translate->_("This is a line") . "\n";
> echo $translate->plural("There is one product in your cart","There are
> %1\$d products in your cart",$number) . "\n";


Using PoEdit , this is the .po file I obtain :

msgid ""
> msgstr ""
> "Project-Id-Version: test\n"
> "Report-Msgid-Bugs-To: \n"
> "POT-Creation-Date: 2010-05-29 19:53-0000\n"
> "PO-Revision-Date: 2010-05-29 19:54-0000\n"
> "Last-Translator: MASSUCHETTI Jonathan <[email protected]>\n"
> "Language-Team: Feng\n"
> "Language: \n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=UTF-8\n"
> "Content-Transfer-Encoding: 8bit\n"
> "X-Poedit-KeywordsList: _;gettext;gettext_noop;plural\n"
> "X-Poedit-Basepath: /home/feng/projets/1ersite\n"
> "Plural-Forms: nplurals=2; plural=(n>1);\n"
> "X-Poedit-Language: French\n"
> "X-Poedit-Country: FRANCE\n"
> "X-Poedit-SourceCharset: utf-8\n"
> "X-Poedit-SearchPath-0: application\n"
>
> #: application/test.php:10
> msgid "This is a line"
> msgstr "Ceci est une ligne"
>
> #: application/test.php:11
> msgid "There is one product in your cart"
> msgstr "Il y a un produit dans votre panier"
>
>
As you see, my plural is ignored. Why and how to fix ?

Regards

--0015174c3eacff49a50487c10202
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<br><br>I&#39;m using the Zend Framwork (v1.10) , and I want to use Zend=
_Translate with Gettext adapter.<br>My Zend code looks like :<br><br><br><b=
lockquote style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(20=
4, 204, 204); padding-left: 1ex;" class=3D"gmail_quote">
echo $translate-&gt;_(&quot;This is a line&quot;) . &quot;\n&quot;;<br>echo=
 $translate-&gt;plural(&quot;There is one product in your cart&quot;,&quot;=
There are %1\$d products in your cart&quot;,$number) . &quot;\n&quot;;</blo=
ckquote>
<div><br>Using PoEdit , this is the .po file I obtain :<br><br><blockquote =
style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 20=
4); padding-left: 1ex;" class=3D"gmail_quote">msgid &quot;&quot;<br>msgstr =
&quot;&quot;<br>
&quot;Project-Id-Version: test\n&quot;<br>&quot;Report-Msgid-Bugs-To: \n&qu=
ot;<br>&quot;POT-Creation-Date: 2010-05-29 19:53-0000\n&quot;<br>&quot;PO-R=
evision-Date: 2010-05-29 19:54-0000\n&quot;<br>&quot;Last-Translator: MASSU=
CHETTI Jonathan &lt;<a href=3D"mailto:[email protected]">iletaitunfo=
[email protected]</a>&gt;\n&quot;<br>
&quot;Language-Team: Feng\n&quot;<br>&quot;Language: \n&quot;<br>&quot;MIME=
-Version: 1.0\n&quot;<br>&quot;Content-Type: text/plain; charset=3DUTF-8\n&=
quot;<br>&quot;Content-Transfer-Encoding: 8bit\n&quot;<br>&quot;X-Poedit-Ke=
ywordsList: _;gettext;gettext_noop;plural\n&quot;<br>
&quot;X-Poedit-Basepath: /home/feng/projets/1ersite\n&quot;<br>&quot;Plural=
-Forms: nplurals=3D2; plural=3D(n&gt;1);\n&quot;<br>&quot;X-Poedit-Language=
: French\n&quot;<br>&quot;X-Poedit-Country: FRANCE\n&quot;<br>&quot;X-Poedi=
t-SourceCharset: utf-8\n&quot;<br>
&quot;X-Poedit-SearchPath-0: application\n&quot;<br><br>#: application/test=
.php:10<br>msgid &quot;This is a line&quot;<br>msgstr &quot;Ceci est une li=
gne&quot;<br><br>#: application/test.php:11<br>msgid &quot;There is one pro=
duct in your cart&quot;<br>
msgstr &quot;Il y a un produit dans votre panier&quot;<br><br></blockquote>=
<div><br>As you see, my plural is ignored. Why and how to fix ?<br><br>Rega=
rds<br>=A0</div></div>

--0015174c3eacff49a50487c10202--


--===============0641572884062260718==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------


--===============0641572884062260718==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users

--===============0641572884062260718==--