Add support for hard links in pack and cleanup statistics.
This commit is contained in:
vecāks
091981a30c
revīzija
6b364b1604
2
pack
2
pack
|
@ -38,7 +38,7 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
echo -e "Branch: $BLUE$BRANCH"$ENDCOLOR
|
||||
DIR="$PREFIX-$BRANCH"
|
||||
mkdir "$LCODE-temp"
|
||||
for file in `find $DIR -name "*.$LCODE.po"`; do
|
||||
for file in `find $DIR -follow -name "*.$LCODE.po"`; do
|
||||
bfile=`basename $file`
|
||||
echo -n "Processing catalog $bfile... ";
|
||||
d=`echo "$bfile" | sed "s/.$LCODE.po//"`
|
||||
|
|
22
statistics
22
statistics
|
@ -93,21 +93,15 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
<td class=\"title\">graph</td>
|
||||
</tr>" >> $STATSFILE
|
||||
|
||||
for dir in `ls $BRANCH/wesnoth* -d`; do
|
||||
file=$DIR"/"`basename $dir`"."$LCODE".po";
|
||||
if [ ! -f $file ]; then
|
||||
file=$BRANCH"/"`basename $dir`"/"$LCODE".po"
|
||||
filename=$BRANCH`basename $dir`"/"$dir"."$LCODE
|
||||
else
|
||||
filename=`echo $file | sed s/.po//`
|
||||
fi
|
||||
for file in `ls "$DIR"`; do
|
||||
filename=`echo $file | sed s/.po//`
|
||||
npo=$(($npo + 1)); has_errors="no"; has_warnings="no";
|
||||
|
||||
# Extract the declared charset, may be we use this in future.
|
||||
charset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' $file`
|
||||
charset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' "$DIR/$file"`
|
||||
|
||||
echo -n "Checking $file for UTF-8 inconsistencies... "
|
||||
if $ISUTF8 <$file >/dev/null 2>&1; then
|
||||
if $ISUTF8 < "$DIR/$file" > /dev/null 2>&1; then
|
||||
if ! echo $charset | grep -qi "UTF-8"; then
|
||||
has_errors="yes"
|
||||
echo -e $RED"FAILED; non UTF-8 charset declaration for UTF-8 content"$ENDCOLOR
|
||||
|
@ -126,7 +120,7 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
fi
|
||||
|
||||
echo -n "Checking $file for odd characters... "
|
||||
if grep -nH $ODD_CHARS $file >> $ERRORS; then
|
||||
if grep -nH $ODD_CHARS "$DIR/$file" >> $ERRORS; then
|
||||
has_warnings="yes"
|
||||
echo -e $RED"FAILED; odd characters found"$ENDCOLOR
|
||||
echo "$file: one or more odd character from the '$ODD_CHARS' set found." >> $ERRORS
|
||||
|
@ -137,7 +131,7 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
# Makes sense only if the file passed the UTF-8 check.
|
||||
if [ "$has_errors" = "no" ]; then
|
||||
echo -n "Checking $file with msgfmt... "
|
||||
if ! LC_MESSAGES=C $MSGFMT --check -o /dev/null $file >> $ERRORS; then
|
||||
if ! LC_MESSAGES=C $MSGFMT --check -o /dev/null "$DIR/$file" >> $ERRORS; then
|
||||
has_errors="yes"
|
||||
echo -e $RED"FAILED"$ENDCOLOR
|
||||
else
|
||||
|
@ -156,7 +150,7 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
STATUS="Error"
|
||||
fi
|
||||
else
|
||||
stat=`LC_MESSAGES=C $MSGFMT --statistics -o /dev/null $file 2>&1`
|
||||
stat=`LC_MESSAGES=C $MSGFMT --statistics -o /dev/null "$DIR/$file" 2>&1`
|
||||
t=`echo "$stat" | sed -ne 's/\([0-9]\+\) translated .*/\1/p'`; t=${t:-0}
|
||||
u=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) untranslated .*/\1/p'`; u=${u:-0}
|
||||
f=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) fuzzy translation.*/\1/p'`; f=${f:-0}
|
||||
|
@ -188,7 +182,7 @@ for BRANCH in $TRUNK $BRANCHES; do
|
|||
|
||||
echo "<tr class=\"row-$CL\">" >> $STATSFILE
|
||||
CL=$(( ($CL+1)%2 ))
|
||||
echo " <td align=\"left\"><strong><a href=\"$filename".po"\">`basename $filename`</a></strong></td>
|
||||
echo " <td align=\"left\"><strong><a href=\""$DIR/$filename.po"\">`basename $filename`</a></strong></td>
|
||||
<td class=\"percentage-$CL\" align=\"center\">$st</td>
|
||||
<td class=\"row-$CL\" align=\"right\">$t</td>" >> $STATSFILE
|
||||
printf '%s%d%s%.2f%s\n' " <td class=\"percentage-" $CL "\" align=\"right\">" $rt "</td>" >> $STATSFILE
|
||||
|
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā