# Gettext .po msgid\_plural failed

**URL:** <https://www.ruby-forum.com/t/gettext-po-msgid-plural-failed/159598>\
**Category:** Rails\
**Created:** [February 6, 2009, 4:54am UTC](https://www.ruby-forum.com/t/gettext-po-msgid-plural-failed/159598 "2009-02-06T04:54:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [February 6, 2009, 4:54am UTC](https://www.ruby-forum.com/t/gettext-po-msgid-plural-failed/159598/1 "2009-02-06T04:54:23Z")

</div>

Hi All,

I am using gettext and .po files for my translation, however, I found it  
very difficult to apply plural form translation, is there anything goes  
wrong?

in controller:

\<%=h \_(“You received %{no\_friend} friend invitation”) %{:no\_friend =\>  
pending\_friends\_for\_user.length } %\>

in en/myapp.po

msgid “”  
msgstr “”  
“MIME-Version: 1.0\n”  
“Content-Type: text/plain; charset=utf-8\n”  
“Content-Transfer-Encoding: 8bit\n”  
“Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n”  
“X-Poedit-Country: UNITED STATES\n”

#: app/views/friends/\_pending\_friends\_for\_user.rhtml:-  
msgid “You received %{no\_friend} friend invitation”  
msgid\_plural “You received %{no\_friend} friend invitations”  
msgstr[0] “You received %{no\_friend} friend invitation”  
msgstr[1] “You received %{no\_friend} friend invitations”

Is there anything goes wrong?

Any help is appreicated, I hope not making obvious mistake here.

Thanks again!  
Arthur
