2011-02-02 04:32:05 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Shows the completion rate of the translation for each language.
|
|
|
|
#
|
2015-01-28 16:54:00 +01:00
|
|
|
wget -O tmp-translations-page.html https://crowdin.net/project/ankidroid --no-check-certificate
|
2011-02-02 04:32:05 +01:00
|
|
|
cat tmp-translations-page.html |
|
2017-12-14 05:54:05 +01:00
|
|
|
egrep 'project-language-name|[approved|translated]: \d+%'|
|
|
|
|
sed -e "s/<strong.*unselectable\">//g"|
|
|
|
|
sed -e "s/<\/strong>//g" |
|
|
|
|
sed -e "s/\w*<\/div>//g" |
|
|
|
|
sed -e "s/[[:space:]]*//g"|
|
|
|
|
tr "\n" " " |
|
|
|
|
tr '%' '\n' |
|
|
|
|
sed -e "s/^ //g" |
|
|
|
|
sed -e "s/\:/\: /g" |
|
|
|
|
grep -v "^\s+$" |
|
|
|
|
sed -e "s/$/%/g" |
|
|
|
|
grep -v " 0" > tmp-list.txt
|
2011-11-16 10:16:55 +01:00
|
|
|
|
|
|
|
echo "By country:"
|
|
|
|
cat tmp-list.txt | sort
|
|
|
|
|
2017-12-14 05:54:05 +01:00
|
|
|
echo "\nBy rate approved (implies 100% translated):"
|
|
|
|
cat tmp-list.txt | grep approved | sed -e "s/\(.*\) \([0-9]*\)%/\2% \1/g" | sort -nr
|
|
|
|
|
|
|
|
echo "\nBy rate translated:"
|
|
|
|
cat tmp-list.txt | grep translated | sed -e "s/\(.*\) \([0-9]*\)%/\2% \1/g" | sort -nr
|
2011-11-16 10:16:55 +01:00
|
|
|
|
2014-10-21 15:23:22 +02:00
|
|
|
rm -f tmp-translations-page.html tmp-list.txt
|