Feature #10034: Translation web platform
Consider forcing wrapping of po files at 79 chars per line
Whenever one opens a po file in poedit, lines may get rewrapped without any real change within the file. We should consider unifying at how many characters this should happen to avoid senseless commits.
https://github.com/translate/translate/commit/5a484fffd26b83aa1bab299583cd17cf8576687a Translate-toolkit, as used by Weblate now supports telling it a width to wrap lines. We will need to do that whenever Weblate permits it to wrap to 79 chars in Weblate.
At the same time, we will want to verify this with check_po and allow translators who use Git to rewrap their files before committing them.
Furthermore, I believe we will need to patch Ikiwiki's Pot file generation to do that too, or make it happen within our own infrastructure. --> actually we will probably not need this.
- Status changed from Confirmed to In Progress
This needs to go into check_po.sh
#!/bin/sh # Check that po files only have 79 chars per line for FILENAME in FILELIST; do msgcat -w 79 $FILENAME -o "$FILENAME.new" if ! diff -q $FILENAME "$FILENAME.new"; then echo "$FILENAME needs to be rewrapped to 79 chars." exit 1 fi rm "$FILENAME.new" done