Author: cazfi
Date: Wed Jan  6 00:36:20 2016
New Revision: 31373

URL: http://svn.gna.org/viewcvs/freeciv?rev=31373&view=rev
Log:
Generate langstats about every translation domain.

See patch #6779

Modified:
    trunk/bootstrap/Makefile.am
    trunk/bootstrap/generate_langstat.sh
    trunk/win32/installer/Makefile
    trunk/win32/installer/create-freeciv-gtk-qt-nsi.sh
    trunk/win32/installer/create-freeciv-sdl-nsi.sh

Modified: trunk/bootstrap/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/Makefile.am?rev=31373&r1=31372&r2=31373&view=diff
==============================================================================
--- trunk/bootstrap/Makefile.am (original)
+++ trunk/bootstrap/Makefile.am Wed Jan  6 00:36:20 2016
@@ -12,8 +12,10 @@
                generate_svnrev.sh      \
                fc_gitrev_gen.h.tmpl    \
                generate_gitrev.sh      \
-               generate_langstat.sh  \
-               langstat.txt            \
+               generate_langstat.sh    \
+               langstat_freeciv.txt    \
+               langstat_nations.txt    \
+               langstat_ruledit.txt    \
                freeciv.desktop.in      \
                freeciv-gtk2.desktop.in \
                freeciv-sdl2.desktop.in \
@@ -37,9 +39,15 @@
                Makerules.mk            \
                langnames.txt
 
-langstat.txt:
-       "$(top_srcdir)/bootstrap/generate_langstat.sh" "$(top_srcdir)" 
"$(top_builddir)"
+langstat_freeciv.txt:
+       "$(top_srcdir)/bootstrap/generate_langstat.sh" freeciv "$(top_srcdir)" 
"$(top_builddir)"
 
-.PHONY: langstat.txt
+langstat_nations.txt:
+       "$(top_srcdir)/bootstrap/generate_langstat.sh" nations "$(top_srcdir)" 
"$(top_builddir)"
 
-MAINTAINERCLEANFILES = langstat.txt
+langstat_ruledit.txt:
+       "$(top_srcdir)/bootstrap/generate_langstat.sh" ruledit "$(top_srcdir)" 
"$(top_builddir)"
+
+.PHONY: langstat_freeciv.txt langstat_nations.txt langstat_ruledit.txt
+
+MAINTAINERCLEANFILES = langstat_freeciv.txt langstat_nations.txt 
langstat_ruledit.txt

Modified: trunk/bootstrap/generate_langstat.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/generate_langstat.sh?rev=31373&r1=31372&r2=31373&view=diff
==============================================================================
--- trunk/bootstrap/generate_langstat.sh        (original)
+++ trunk/bootstrap/generate_langstat.sh        Wed Jan  6 00:36:20 2016
@@ -1,14 +1,32 @@
 #!/bin/bash
+#/**********************************************************************
+# Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2, or (at your option)
+#   any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#***********************************************************************/
 
-"$1/translations/stats.sh" freeciv | (
+if test "x$1" = "x-h" || test "x$1" = "x--help" || test "x$1" = "x" ; then
+   echo "Usage: $(basename $0) <translation domain> <freeciv source root> 
<freeciv build root>"
+   exit
+fi
+
+"$2/translations/stats.sh" $1 | (
     while read CODE PRCT ; do
-        NLANG=$(grep "^$CODE " "$1/bootstrap/langnames.txt" 2>/dev/null | sed 
"s/$CODE //")
+        NLANG=$(grep "^$CODE " "$2/bootstrap/langnames.txt" 2>/dev/null | sed 
"s/$CODE //")
         echo "$CODE $PRCT $NLANG"
-    done ) > "$2/bootstrap/langstat.txt.tmp"
+    done ) > "$3/bootstrap/langstat_${1}.txt.tmp"
 
-if ! test -f "$1/bootstrap/langstat.txt" ||
-   ! cmp "$1/bootstrap/langstat.txt" "$2/bootstrap/langstat.txt.tmp" ; then
-    mv "$2/bootstrap/langstat.txt.tmp" "$1/bootstrap/langstat.txt"
+if ! test -f "$2/bootstrap/langstat_${1}.txt" ||
+   ! cmp "$2/bootstrap/langstat_${1}.txt" "$3/bootstrap/langstat_${1}.txt.tmp" 
; then
+    mv "$3/bootstrap/langstat_${1}.txt.tmp" "$2/bootstrap/langstat_${1}.txt"
 else
-    rm -f "$2/bootstrap/langstat.txt.tmp"
+    rm -f "$3/bootstrap/langstat_${1}.txt.tmp"
 fi

Modified: trunk/win32/installer/Makefile
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/win32/installer/Makefile?rev=31373&r1=31372&r2=31373&view=diff
==============================================================================
--- trunk/win32/installer/Makefile      (original)
+++ trunk/win32/installer/Makefile      Wed Jan  6 00:36:20 2016
@@ -58,7 +58,7 @@
        # make
        make -C build-$(GUI)
        make -C build-$(GUI)/translations/freeciv update-po
-       make -C build-$(GUI)/bootstrap langstat.txt
+       make -C build-$(GUI)/bootstrap langstat_freeciv.txt
 
 build-freeciv-ruledit:
        # create build directory

Modified: trunk/win32/installer/create-freeciv-gtk-qt-nsi.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/win32/installer/create-freeciv-gtk-qt-nsi.sh?rev=31373&r1=31372&r2=31373&view=diff
==============================================================================
--- trunk/win32/installer/create-freeciv-gtk-qt-nsi.sh  (original)
+++ trunk/win32/installer/create-freeciv-gtk-qt-nsi.sh  Wed Jan  6 00:36:20 2016
@@ -167,7 +167,7 @@
 
 EOF
 
-cat ../../bootstrap/langstat.txt |
+cat ../../bootstrap/langstat_freeciv.txt |
 sort -k 2 |
 while read -r code prct name
 do
@@ -227,7 +227,7 @@
   \${NSD_CB_AddString} \$DefaultLanguageDropList "US English (en_US)"
 EOF
 
-  cat ../../bootstrap/langstat.txt |
+  cat ../../bootstrap/langstat_freeciv.txt |
   sort -k 2 |
   while read -r code prct name
   do
@@ -251,7 +251,7 @@
   echo "    StrCpy \$DefaultLanguageCode \"en_US\""
   echo "  \${EndIf}"
 
-  cat ../../bootstrap/langstat.txt |
+  cat ../../bootstrap/langstat_freeciv.txt |
   while read -r code prct name
   do
     echo "  \${If} \$LangName == \"$name ($code) $prct\""

Modified: trunk/win32/installer/create-freeciv-sdl-nsi.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/win32/installer/create-freeciv-sdl-nsi.sh?rev=31373&r1=31372&r2=31373&view=diff
==============================================================================
--- trunk/win32/installer/create-freeciv-sdl-nsi.sh     (original)
+++ trunk/win32/installer/create-freeciv-sdl-nsi.sh     Wed Jan  6 00:36:20 2016
@@ -167,7 +167,7 @@
 
 EOF
 
-cat ../../bootstrap/langstat.txt |
+cat ../../bootstrap/langstat_freeciv.txt |
 sort -k 2 |
 while read -r code prct name
 do
@@ -245,7 +245,7 @@
   \${NSD_CB_AddString} \$DefaultLanguageDropList "US English (en_US)"
 EOF
 
-  cat ../../bootstrap/langstat.txt |
+  cat ../../bootstrap/langstat_freeciv.txt |
   sort -k 2 |
   while read -r code prct name
   do
@@ -269,7 +269,7 @@
   echo "    StrCpy \$DefaultLanguageCode \"en_US\""
   echo "  \${EndIf}"
 
-  cat ../../bootstrap/langstat.txt |
+  cat ../../bootstrap/langstat_freeciv.txt |
   while read -r code prct name
   do
     echo "  \${If} \$LangName == \"$name ($code) $prct\""


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to