-rwxr-xr-x | i18n/status_individual.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/i18n/status_individual.sh b/i18n/status_individual.sh index 349767d..0cbaae3 100755 --- a/i18n/status_individual.sh +++ b/i18n/status_individual.sh | |||
@@ -15,8 +15,26 @@ if [ "${arg}" = "todo" ]; then | |||
15 | exit | 15 | exit |
16 | fi | 16 | fi |
17 | for i in $2/*.ts; do echo $i - `grep translation "$i" | grep type=\"unfinished\" | wc -l` | grep -v ' 0' ; done | 17 | for i in $2/*.ts; do |
18 | echo $i - `grep translation "$i" | grep type=\"unfinished\" | wc -l` | grep -v ' 0' ; | ||
19 | done | ||
18 | exit | 20 | exit |
19 | fi | 21 | fi |
20 | 22 | ||
23 | if [ "${arg}" = "overview" ]; then | ||
24 | if [ "x$2"x = "xx" ]; then | ||
25 | echo "missing second argument" | ||
26 | exit | ||
27 | fi | ||
28 | |||
29 | strs=`find $2 -path './unmaintained' -prune -o -path './en' -prune -o -path './xx' -prune -o -name "*.ts" -exec grep 'translation' {} \; | wc -l` | ||
30 | unfi=`find $2 -path './unmaintained' -prune -o -path './en' -prune -o -path './xx' -prune -o -name "*.ts" -exec grep 'type=\"unfinished\"' {} \; | wc -l` | ||
31 | obso=`find $2 -path './unmaintained' -prune -o -path './en' -prune -o -path './xx' -prune -o -name "*.ts" -exec grep 'type=\"obsolete\"' {} \; | wc -l` | ||
32 | printf "\n%12s %5s\n" "Total:" ${strs} | ||
33 | printf "%12s %5s %s\n" "Unfinished:" ${unfi} "[`expr \( ${strs} - ${unfi} \) \* 100 / ${strs}`% done]" | ||
34 | printf "%12s %5s %s\n\n" "Obsolete:" ${obso} "[`expr ${obso} \* 100 / ${strs}`%]" | ||
35 | exit | ||
36 | fi | ||
37 | |||
38 | |||
21 | for i in $1/*.ts; do echo $i - `grep translation "$i" | grep type=\"unfinished\" | wc -l` ; done | 39 | for i in $1/*.ts; do echo $i - `grep translation "$i" | grep type=\"unfinished\" | wc -l` ; done |
22 | 40 | ||