Add an option to generate statistics for core domains only.

This commit is contained in:
Andrius Štikonas 2018-12-29 11:46:51 +00:00
rodič de5181ca3d
revize 0374438141
1 změnil soubory, kde provedl 13 přidání a 1 odebrání

Zobrazit soubor

@ -23,6 +23,13 @@ ODD_CHARS='<27>'
CL=0 # counter for css style
STATUS="OK" # Total status of translations
while getopts ":c" opt; do
case $opt in
c)
CORE_TEXTDOMAINS="wesnoth lib editor help ai units multiplayer anl tutorial" ;;
esac
done
for BRANCH in $BRANCHES; do
echo -e "Repository: $BLUE$BRANCH"$ENDCOLOR
STATSFILE="statistics-$BRANCH.html"
@ -83,7 +90,12 @@ $(LC_TIME="en_US.UTF-8" date)
<th class=\"graph\" scope=\"col\">Graph</th></tr></thead>
<tbody><tr>" >> $STATSFILE
for files in $BRANCH/*.po; do
if [ -n "$CORE_TEXTDOMAINS" ]; then
POFILES=$BRANCH/$(echo $CORE_TEXTDOMAINS | awk '$NF=$NF "*.po"' OFS="*.po $BRANCH/")
else
POFILES="$BRANCH/*.po"
fi
for files in $POFILES; do
file=$(basename $files)
filename=$(basename $file .po)
npo=$(($npo + 1)); has_errors="no"; has_warnings="no";