diff options
| author | Olav Vitters <olav@vitters.nl> | 2014-07-28 19:08:21 (GMT) |
|---|---|---|
| committer | Olav Vitters <olav@vitters.nl> | 2014-07-28 19:08:21 (GMT) |
| commit | 1bcb0f3383c298b7e3be718ded7964aafbd7e5ab (patch) | |
| tree | 7ff95ad585b0217ebd3da0e54ebae46788af5929 | |
| parent | 0543891b316c67dfb1ea63086a72c6690c7f0472 (diff) | |
| download | sysadmin-bin-1bcb0f3383c298b7e3be718ded7964aafbd7e5ab.zip sysadmin-bin-1bcb0f3383c298b7e3be718ded7964aafbd7e5ab.tar.xz | |
add simplistic check to ensure keywords in desktop files are properly translated
| -rwxr-xr-x | git/pre-receive-check-po | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/git/pre-receive-check-po b/git/pre-receive-check-po index 743fa01..2e734c9 100755 --- a/git/pre-receive-check-po +++ b/git/pre-receive-check-po @@ -47,6 +47,30 @@ EOF exit 1 fi + # Do a simplistic check to for keyword not ending with a semicolon + result=`git cat-file blob "$rev:$path" | sed -rn '/^#: .*\.desktop/{:start /\nmsgstr/!{N;b start};/msgid [^\n]+;"/{/msgstr [^\n]+;"/!p}}' 2>&1` + if [ "$result" != ""]; then + cat <<EOF >&2 +--- +The following translation (.po) file should ensure the translated content ends with a semicolon.$branch_message + +$path + +The following part of the file fails to do this. Please correct the translation and try to push again. + +$result + +After making fixes, modify your commit to include them, by doing: + +git add $basename +git commit --amend + +If you have any further problems or questions, please contact the GNOME Translation Project mailing list <gnome-i18n@gnome.org>. Thank you. +--- +EOF + exit 1 + fi + # Check for the absence of an executable flag if expr "$mode" : ".*\([1357]..\|[1357].\|[1357]\)$" > /dev/null 2>& 1; then cat <<EOF >&2 |
