diff options
Diffstat (limited to 'tools/langstatus')
-rwxr-xr-x | tools/langstatus | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/tools/langstatus b/tools/langstatus index 3c5fd74c63..cde5f3e875 100755 --- a/tools/langstatus +++ b/tools/langstatus | |||
@@ -2,16 +2,16 @@ | |||
2 | 2 | ||
3 | if [ "wiki" = "$1" ]; then | 3 | if [ "wiki" = "$1" ]; then |
4 | echo "As of `LC_ALL=C date +'%d %b %Y'`, the current status of the translations is the following:" | 4 | echo "As of `LC_ALL=C date +'%d %b %Y'`, the current status of the translations is the following:" |
5 | echo "| *Language* | *Missing strings* | *Changed desc* | *Changed source* |" | 5 | echo "| *Language* | *Missing strings* | *Changed desc* | *Changed source* | *Missing translation* | *Missing voice* |" |
6 | FORMAT="|%s| %d| %d| %d|\n" | 6 | FORMAT="|%s| %d| %d| %d|\n" |
7 | else | 7 | else |
8 | echo ".----------------------.-----------------.---------------.---------------." | 8 | echo ".----------------------.-----------------.--------------.----------------.---------------.---------------." |
9 | echo "| Language | Missing strings | Changed desc | Changed source |" | 9 | echo "| Language | Missing strings | Changed desc | Changed source | Missing trans | Missing voice |" |
10 | echo "|----------------------|-----------------|--------------|----------------|" | 10 | echo "|----------------------|-----------------|--------------|----------------|---------------|---------------|" |
11 | FORMAT="| %-20s | %15d | %12d | %14d |\n" | 11 | FORMAT="| %-20s | %15d | %12d | %14d | %13d | %13d |\n" |
12 | fi | 12 | fi |
13 | 13 | ||
14 | GENLANG=`dirname $0`/genlang | 14 | UPDLANG=`dirname $0`/updatelang |
15 | LANGDIR=`dirname $0`/../apps/lang | 15 | LANGDIR=`dirname $0`/../apps/lang |
16 | ENGLISH="$LANGDIR"/english.lang | 16 | ENGLISH="$LANGDIR"/english.lang |
17 | 17 | ||
@@ -19,31 +19,40 @@ ENGLISH="$LANGDIR"/english.lang | |||
19 | LANGUAGE=`basename $LANGFILE .lang |sed -e "s/^\(.\)/\U\1/"` | 19 | LANGUAGE=`basename $LANGFILE .lang |sed -e "s/^\(.\)/\U\1/"` |
20 | 20 | ||
21 | 21 | ||
22 | $GENLANG -u -e=$ENGLISH $LANGFILE |grep "^###" |( | 22 | $UPDLANG $ENGLISH $LANGFILE - |grep "^###" |( |
23 | MISSING=0 | 23 | MISSING=0 |
24 | CHANGE_DESC=0 | 24 | CHANGE_DESC=0 |
25 | CHANGE_SRC=0 | 25 | CHANGE_SRC=0 |
26 | MISS_DEST=0 | ||
27 | MISS_VOICE=0 | ||
26 | 28 | ||
27 | while read LINE; do | 29 | while read LINE; do |
28 | case $LINE in | 30 | case $LINE in |
29 | "### This phrase below was not present in the translated file") | 31 | "### This phrase is missing entirely"*) |
30 | MISSING=`expr $MISSING + 1` | 32 | MISSING=`expr $MISSING + 1` |
31 | ;; | 33 | ;; |
32 | "### The 'desc' field differs from the english!") | 34 | "### The 'desc' field for"*|"### The 'user' field for"*) |
33 | CHANGE_DESC=`expr $CHANGE_DESC + 1` | 35 | CHANGE_DESC=`expr $CHANGE_DESC + 1` |
34 | ;; | 36 | ;; |
35 | "### The <source> section differs from the english!") | 37 | "### The <source> section for"*) |
36 | CHANGE_SRC=`expr $CHANGE_SRC + 1` | 38 | CHANGE_SRC=`expr $CHANGE_SRC + 1` |
37 | ;; | 39 | ;; |
40 | "### The <dest> section for"*) | ||
41 | MISS_DEST=`expr $MISS_DEST + 1` | ||
42 | ;; | ||
43 | "### The <voice> section for"*) | ||
44 | MISS_VOICE=`expr $MISS_VOICE + 1` | ||
45 | ;; | ||
46 | |||
38 | *) | 47 | *) |
39 | #echo $LINE | 48 | #echo $LINE |
40 | ;; | 49 | ;; |
41 | esac | 50 | esac |
42 | done | 51 | done |
43 | printf "$FORMAT" "$LANGUAGE" "$MISSING" "$CHANGE_DESC" "$CHANGE_SRC" | 52 | printf "$FORMAT" "$LANGUAGE" "$MISSING" "$CHANGE_DESC" "$CHANGE_SRC" "$MISS_DEST" "$MISS_VOICE" |
44 | ) | 53 | ) |
45 | done) 2>/dev/null | 54 | done) 2>/dev/null |
46 | 55 | ||
47 | if [ "wiki" != "$1" ]; then | 56 | if [ "wiki" != "$1" ]; then |
48 | echo "'----------------------'-----------------'--------------'----------------'" | 57 | echo "'----------------------'-----------------'--------------'----------------'---------------'----------------'" |
49 | fi | 58 | fi |