I’m internationalizing a python program and cant get plural forms into the .pot file. I have marked string that require plural translations with a _pl() eg.
self.write_info(_pl('%(num)d track checked', '%(num)d tracks checked', song_obj.song_count) % {'num' : song_obj.song_count})
Then I’m running: xgettext --language=Python --keyword=_pl --output=output.pot *.py Only the first (singular) string is generated in the pot file.
I haven’t used this with Python, and can’t test at the moment, but try
--keyword=_pl:1,2instead.From the GNU gettext docs: