source: tests/scripts/checkpo.sh

Last change on this file was 61fd242, checked in by zzz <zzz@…>, 4 years ago

Build: Translated man pages for es and zh,
and a script to build them.
es complete, zh partial, just for testing.
No ant targets or deb packaging yet.

  • Property mode set to 100755
File size: 912 bytes
Line 
1#!/bin/sh
2#
3# Run 'msgfmt -c' on all .po files
4# Returns nonzero on failure
5#
6# zzz 2011-02
7# public domain
8#
9
10cd `dirname $0`/../..
11
12DIRS="\
13  apps/routerconsole/locale \
14  apps/routerconsole/locale-news \
15  apps/routerconsole/locale-countries \
16  apps/i2ptunnel/locale \
17  apps/i2ptunnel/locale-proxy \
18  apps/i2psnark/locale \
19  apps/ministreaming/locale \
20  apps/susidns/locale \
21  apps/susimail/locale \
22  apps/desktopgui/locale \
23  installer/resources/locale/po \
24  installer/resources/locale-man \
25  debian/po"
26
27FILES="installer/resources/locale-man/man.pot"
28
29for i in `find $DIRS -maxdepth 1 -type f -name \*.po` $FILES
30do
31        echo "Checking $i ..."
32        msgfmt -c $i -o /dev/null
33        if [ $? -ne 0 ]
34        then
35                echo "********* FAILED CHECK FOR $i *************"
36                FAIL=1
37        fi
38done
39
40if [ "$FAIL" != "" ]
41then
42        echo "******** At least one file failed check *********"
43else
44        echo "All files passed"
45fi
46exit $FAIL
Note: See TracBrowser for help on using the repository browser.