Re: trans-stat
- From: Pavol Klačanský <pavol klacansky com>
- To: Slovak GNOME Translation Team / Slovenský prekladateľský tím GNOME <gnome-sk-list gnome org>
- Subject: Re: trans-stat
- Date: Sun, 11 Sep 2011 10:48:38 +0200
to je stary, nevim odkal to stahujes, ak to stahujes do rovnakeho
folderu, moze nastat problem ze firefox ten dalsi pomenuje napr.
trans-stat(1)
On 11.09.2011 10:27, roman matyus wrote:
presne ten čo si mi poslal v maile
--
S pozdravom Roman Mátyus
_______________________________________________
gnome-sk-list mailing list
gnome-sk-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-sk-list
|
#!/bin/bash
LL=sk
DOS2UNIX=
case `uname -s` in
Linux)
DOS2UNIX="dos2unix"
;;
SunOS)
DOS2UNIX="dos2unix -ascii"
;;
*)
echo "`uname -s` is not supported operating system" >&2
exit 1
;;
esac
TMPDIR=/tmp/gnome
mkdir -p $TMPDIR
TL="+------------------------------------------+-------+-------+-------+-------+\n"
wget -q "http://live.gnome.org/SlovakTranslation?action=raw" --user-agent="" -O - | $DOS2UNIX > $TMPDIR/wiki
wget -q "http://live.gnome.org/SlovakTranslation/Modules?action=raw" --user-agent="" -O - | $DOS2UNIX > $TMPDIR/modules
cat $TMPDIR/wiki |egrep "^\[\[http://mail\.gnome\.org/archives/gnome-sk-list/" | tr -d '[],' | tr '|' ' ' | while read -r regmail name ; do
lynx $regmail -dump -nonumbers > $TMPDIR/regmail
DL=`cat $TMPDIR/regmail | grep "Damned Lies: " | cut -d' ' -f 3-`
printf "$TL"
/usr/bin/printf "| %-40s | Stat | Trans | Fuzzy | Untr |\n" "$name"
printf "$TL"
T_TRANS=0
T_FUZZY=0
T_UNTRANS=0
cat $TMPDIR/modules |\
egrep "^\|\| \[\[http://l10n\.gnome\.org/module/[^/]*/\|.*\]\] \|\| \[\[$DL\|$name\]\] \|\|$" |\
cut -d' ' -f 2 |\
sed -e 's,^\[\[http://l10n\.gnome\.org/module/\([^/]*\)/|\(.*\)\]\]$,\1 \2,' |\
( while read -r module submodule ; do
case "$submodule" in
*/*)
MODULE=`echo $submodule | cut -d/ -f 1`
SUB=-`echo $submodule | cut -d/ -f 2`
;;
*)
MODULE=$submodule
SUB=
;;
esac
lynx "http://l10n.gnome.org/vertimus/$MODULE/master/po$SUB/$LL" -dump -width=200 > $TMPDIR/vertimus
BUFFER=`cat $TMPDIR/vertimus | egrep -m 1 "^[[:space:]]*[0-9]+%[[:space:]]*[0-9]+[[:space:]]*[0-9]+[[:space:]]*[0-9]+.*$"`
if [ "$BUFFER" != "" ]; then
PERCENT=`echo $BUFFER | sed -e 's/^[[:space:]]*\([0-9]*\)%.*$/\1/'`
TRANS=`echo $BUFFER | sed -e 's/^[[:space:]]*[0-9]*%[[:space:]]*\([0-9]*\).*$/\1/'`
FUZZY=`echo $BUFFER | sed -e 's/^[[:space:]]*[0-9]*%[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\).*$/\1/'`
UNTRANS=`echo $BUFFER | sed -e 's/^[[:space:]]*[0-9]*%[[:space:]]*[0-9]*[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\).*$/\1/'`
printf "| %-40s | %3d %% | %5s | %5s | %5s |\n" $submodule $PERCENT $TRANS $FUZZY $UNTRANS
T_TRANS=$(($T_TRANS+$TRANS))
T_FUZZY=$(($T_FUZZY+$FUZZY))
T_UNTRANS=$(($T_UNTRANS+$UNTRANS))
fi
done
TOTAL=$(($T_TRANS+$T_FUZZY+$T_UNTRANS))
T_PERC=0
test $TOTAL -ne 0 && T_PERC=$(((100*$T_TRANS)/($TOTAL)))
printf "$TL"
printf "| %-40s | %3d %% | %5s | %5s | %5s |\n" "Total" $T_PERC $T_TRANS $T_FUZZY $T_UNTRANS
printf "$TL"
printf "\n"
)
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]