The qm parser can correctly parse plurals but Virtaal does not display them. We might have lost this functionality when we made .mo and friends rely on information in the file rather then the size of the multistring.
Newer .qm files have a NumerusRules section which we parse since r14908. I haven't deduced yet how this is used, I assume it provides a reference to to the numerus data that Qt maintains. We would most likely need to use these lists as we would need to in .ts files.
My simple hacking shows that we need to do the following:
Remove assumptions that unit.source is a multistring if we are a plural. See unitview.py and pogrep.py. I simply added isinstance(unit.source, multistring)
The qm parser can correctly parse plurals but Virtaal does not display them. We might have lost this functionality when we made .mo and friends rely on information in the file rather then the size of the multistring.
Newer .qm files have a NumerusRules section which we parse since r14908. I haven't deduced yet how this is used, I assume it provides a reference to to the numerus data that Qt maintains. We would most likely need to use these lists as we would need to in .ts files.
My simple hacking shows that we need to do the following:
Add hasplural to qm.py - easy
def hasplural(self): return len(self._target.strings) > 1