[Resolved] translation error: missing msgstr section
When creating a Dutch translation for the Twenty Ten theme based on the included POT file, I ran into an error when trying to save the translation:
.../nl_NL.po:127: missing msgstr section msgfmt: found 1 fatal error
After that, Poedit closed but the saved .po and mo files are corrupted and my translation seemed lost. GRRRRRR 🙁
Searching Poedit bugreports and other resources I found how I could ‘fix’ the problem in the .po file:
There was a line in the header missing:
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
And the problematic translation that was:
#: comments.php:35 #, php-format msgid "One Response to %2$s" msgid_plural "%1$s Responses to %2$s"
I completed with:
#: comments.php:35 #, php-format msgid "One Response to %2$s" msgid_plural "%1$s Responses to %2$s" msgstr "" msgstr ""
After that, Poedit could open the .po file and let me finish the translation and create a working .mo translation file from it… Pfffff…
I have no idea if the whole thing was caused by me doing something wrong when I created the new translation from the .pot file or because there is something wrong with the pot file it self… Can anyone tell me what went wrong ?
- The topic ‘[Resolved] translation error: missing msgstr section’ is closed to new replies.