Malformed PO file: unknown occurrence
If you have this error trying to translate a custom module, it might not be related to the actual po file.
Indeed, the first thing to check is your module name, if it contains a dash (-
), then look no further. Odoo doesn't support dashes well for translations.
Solution
The solution is to rename your module to not include a dash (-
); an underscore (_
) is fine though. This includes renaming every reference to your module and the module folder itself. Updating your git repository is also a good idea, so when you clone it, it already has the right name.
Then you just have to uninstall the old module and install the new one. BEWARE, you will lose your data.
If you have access to the underlying machine, you can remove the module folder before removing the module itself. That way, Odoo will not remove database fields linked to the module.