[wp-polyglots] Problem with plural form
Nikolay Bachiyski
nb at nikolay.bg
Sun Sep 14 16:50:27 GMT 2008
On Sun, Sep 14, 2008 at 7:34 PM, <avazbek at gmail.com> wrote:
> Hi,
>
> I'm getting such error:
> Broken catalog file: singular form msgstr used together with msgid_plural
>
> The problem is that Uzbek language has a plural form (lar) but it's
> not used in such way as it is used in WordPress.
>
> Thus, both %s post and %s posts use singular form. If in english you
> say 1 post, 2 posts and etc. we say 1 post, 2 post and etc. That's why
> I didn't enter plural form for the WP project in poEdit, and when I
> translate such strings which have plural forms poEdit giving the error
> described above and I can't even reopen the saved file.
>
> Right now I'm leaving such strings and decided to translate them in a
> text editor one by one but I wonder if there's any better solution for
> this problem. Any help would be appreciated.
In order to be able to open the file with poEdit, open it with a
normal text editor and search for msgid_plural.
A sample entry should look like:
msgid "%s comment approved"
msgid_plural "%s comments approved"
msgstr[0] "singular translation"
msgstr[1] ""
If yours look like:
msgid "%s comment approved"
msgid_plural "%s comments approved"
msgstr "singular translation"
just repace this occurence of msgstr with msgstr[0].
After fixing the catalog, go to the catalog settings in poEdit and enter:
nplurals=1; plural=0;
in the Plural forms field.
After that poEdit will only ask you for one plural form and not for two.
If you have more problems, send us the PO file.
Happy translating,
Nikolay.
More information about the wp-polyglots
mailing list