From: Peter Eisentraut Date: Thu, 9 May 2013 02:22:25 +0000 (-0400) Subject: cp-po: Add additional PO file checks X-Git-Url: http://git.postgresql.org/gitweb/backend_dirs.html?a=commitdiff_plain;h=5095873b146fdeb430be7ebdbb576a79b9c3d71d;p=pgtranslation%2Fadmin.git cp-po: Add additional PO file checks --- diff --git a/cp-po b/cp-po index 6f97dc4..ce7a12d 100755 --- a/cp-po +++ b/cp-po @@ -121,6 +121,27 @@ for srcfile in $(find "$srcdir" -name '*.po'); do fi fi + if msgcat $srcfile 2>&1 >/dev/null | grep -q '.'; then + # checks for things like bogus escapes in msgid or msgstr + echo "$me: $srcfile has potential issues" 1>&2 + msgcat $srcfile >/dev/null + if $force; then + echo "$me: copying anyway, as requested" 1>&2 + else + continue + fi + fi + + if grep -E -q '#~\|' $srcfile; then + echo "$me: $srcfile will fail with old gettext versions" 1>&2 + grep -E -Hn '#~\|' $srcfile 1>&2 || : + if $force; then + echo "$me: copying anyway, as requested" 1>&2 + else + continue + fi + fi + for y in $nls_mks; do destcat=$(cat $y | sed -n 's/CATALOG_NAME.*:*= *\([^ ]*\)$/\1/p') if [ -z "$destcat" ]; then