GNOME Bugzilla – Bug 723138
Add pre-commit check for po files to ensure translation of keywords ends with semicolon
Last modified: 2014-07-28 20:06:55 UTC
Problem comes up from time to time: https://mail.gnome.org/archives/gnome-i18n/2013-January/msg00030.html https://mail.gnome.org/archives/gnome-i18n/2013-March/msg00206.html Somewhere around https://git.gnome.org/browse/sysadmin-bin/tree/git/pre-receive-check-po#n22 we could parse the po content and pass it to something like grep -A1 '^msgid\s".\+;.\+;"$' | tail -n 1 | grep '^msgstr\s".\+;.\+[^;]"$' to refuse translations that end without a semicolon. Feel free to improve the regex; I am not a hacker(TM).
Also filed as https://rt.gnome.org/Ticket/Display.html?id=14101 I just realize.
*** This bug has been marked as a duplicate of bug 696489 ***
$ sed -rn '/^#: .*\.desktop/{:start /\nmsgstr/!{N;b start};/msgid [^\n]+;"/{/msgstr [^\n]+;"/!p}}' sl.po #: ../data/nautilus.desktop.in.in.h:3 msgid "folder;manager;explore;disk;filesystem;" msgstr "mapa;upravljalnik;datoteke;raziskovalec;datotečni sistem;disk"
Check added in: https://git.gnome.org/browse/sysadmin-bin/commit/?id=1bcb0f3383c298b7e3be718ded7964aafbd7e5ab Fix for an existing bug where PO files weren't checked (ever): https://git.gnome.org/browse/sysadmin-bin/commit/?id=4c2ea5c10dc2bce4a6547dc9460668085bc3f4e8
Thank you! The cheese in the fridge is all yours!