zonemaster-engine
zonemaster-engine copied to clipboard
Ensure line endings are consistent in po-files.t
Today it's possible to merge updates to PO files where a msgstr ends with "\n" but its msgid doesn't (or vice versa). Travis won't complain about it. At least not in Engine. However, when the Backend Travis attempts to install Engine as a dependency, perl Makefile.PL
fails.
This happened in #823, causing zonemaster/zonemaster-backend#660 to fail for no good reason. It seems to be an easy mistake to make and we already have the framework in place to check it automatically.
To prevent this situation the po-files.t unit test should be amended with a check to verify that either both or none of msgid and msgstr end with "\n".
Also see #829 for adding that to a tool for translator.