When "msgfmt -cv" finds a fatal error in the po file, gtranslator does not allow saving the file
I spent some time translating a PO file, and apparently I made an error somewhere along the way, so when I tried to save it, GTranslator wouldn't let me. Instead it showed me this message: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
. At that point, the search tool stopped working, too, but I'm not sure whether that is related or not.
The problem is that I didn't manage to find and correct the problem, and ended up losing my work. I think GTranslator should warn the user about errors, but allow them to save the file anyways. That way the user can inspect and correct the problem later, possibly using a different program. But preventing them from saving the file only makes it much harder for them to do so, especially since GTranslator does not give any hints on how to locate the problematic line. Would that be viable?
I also attach the problematic file. You can trigger the issue by translating the line ‘Found one candidate’, and omitting the %d
from its plural variant, then trying to save the file.