Browse Source

Add an option to generate statistics for core domains only.

master
Andrius Štikonas 10 months ago
parent
commit
0374438141
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      statistics

+ 13
- 1
statistics View File

@@ -23,6 +23,13 @@ ODD_CHARS='�'
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";

Loading…
Cancel
Save