simasch/gted — Issue #5: Plural Forms with Python
Author: AniX
Created: 2012-02-24 01:11:45+00:00
State: open

I'm using gted with Python 2.5.6. Except of the different directory layout for MO files, both work well together.

However, when using plural forms, I'm getting only the msgid strings, not the translated msgstr strings. The plural-forms rule seems to be correct though.

example.py:
```python
gettext.ngettext('Found %s match', 'Found %s matches', 2) % 2
```
in the source of the de.po file I have:
```po
"Plural-Forms: nplurals=2; plural=n != 1;\n"
```
(settings copied from original GNU gettext documentation for German)

The entry below is:
```po
#: example.py:69
#, python-format
msgid "Found %s match"
msgid_plural "Found %s matches"
msgstr[0] "Übersetzung [0]"
msgstr[1] "UEbersetzung [1]"
```

When running example.py with a value of 0, 2, 3 etc. I'm getting the plural form:
`"Found %s matches"` where I expected the translation string `"Übersetzung [1]"`

When running with a value of 1 I'm getting the singular form `"Found %s match"` where I expected the translation string:
`"Übersetzung [1]"`

So, it seems the correct decision is made, whether singular or plural, but for some reason I only get the `msgid` string instead of the `msgstr`. In the same set of files there are other strings using _('blah blah'), and they do work as expected.

Maybe I miss something.