1. David Jean Louis
  2. polib
  3. Issues
Issue #49 resolved

PO parser uses strings as msgstr_plural keys

Jakub Wilk
created an issue

The PO parser uses strings as msgstr_plural keys:

>>> msgid = '%(size)d byte'
>>> file = polib.pofile('tests/test_utf8.po')
>>> file.find(msgid).msgstr_plural.keys()
[u'1', u'0']

This is surprising, and unlike what MO parser does:

>>> file = polib.mofile('tests/test_utf8.mo')
>>> file.find(msgid).msgstr_plural.keys()
[0, 1]