Ver código fonte

Add an option to generate statistics for core domains only.

master
Andrius Štikonas 9 meses atrás
pai
commit
0374438141
1 arquivos alterados com 13 adições e 1 exclusões
  1. 13
    1
      statistics

+ 13
- 1
statistics Ver arquivo

@@ -23,6 +23,13 @@ ODD_CHARS='�'
23 23
 CL=0 # counter for css style
24 24
 STATUS="OK" # Total status of translations
25 25
 
26
+while getopts ":c" opt; do
27
+    case $opt in
28
+        c)
29
+            CORE_TEXTDOMAINS="wesnoth lib editor help ai units multiplayer anl tutorial" ;;
30
+    esac
31
+done
32
+
26 33
 for BRANCH in $BRANCHES; do
27 34
 	echo -e "Repository: $BLUE$BRANCH"$ENDCOLOR
28 35
 	STATSFILE="statistics-$BRANCH.html"
@@ -83,7 +90,12 @@ $(LC_TIME="en_US.UTF-8" date)
83 90
 	<th class=\"graph\" scope=\"col\">Graph</th></tr></thead>
84 91
 	<tbody><tr>" >> $STATSFILE
85 92
 
86
-	for files in $BRANCH/*.po; do
93
+	if [ -n "$CORE_TEXTDOMAINS" ]; then
94
+		POFILES=$BRANCH/$(echo $CORE_TEXTDOMAINS | awk '$NF=$NF "*.po"' OFS="*.po $BRANCH/")
95
+	else
96
+		POFILES="$BRANCH/*.po"
97
+	fi
98
+	for files in $POFILES; do
87 99
 		file=$(basename $files)
88 100
 		filename=$(basename $file .po)
89 101
 		npo=$(($npo + 1)); has_errors="no"; has_warnings="no";

Carregando…
Cancelar
Salvar