Generate po/LINGUAS in configure script instead of keeping it in the GIT.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 17 May 2015 13:54:48 +0000 (16:54 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 17 May 2015 13:54:48 +0000 (16:54 +0300)
configure.ac
po/LINGUAS [deleted file]

index 5c5c1f4..57ee700 100644 (file)
@@ -65,6 +65,16 @@ LIBJPEG='-ljpeg'
 AC_SUBST(X11_CFLAGS)
 AC_SUBST(X11_LIBS)
 
+# Generate po/LINGUAS on the fly rather than relying on translators
+# to maintain it manually. This also overcome the problem that Transifex
+# cannot add a language to po/LINGUAS if a new po file is submitted.
+rm -f $srcdir/po/LINGUAS
+for po_file in `ls $srcdir/po/*.po | sort`;
+do
+    lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
+    echo $lang >> $srcdir/po/LINGUAS
+done
+
 GETTEXT_PACKAGE=gpicview
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
diff --git a/po/LINGUAS b/po/LINGUAS
deleted file mode 100644 (file)
index ed6181e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-af
-ar
-bg
-bn
-bn_IN
-ca
-cs
-da
-de
-el
-es
-es_VE
-et
-eu
-fa
-fi
-fr
-frp
-gl
-he
-hr
-hu
-id
-it
-ja
-ko
-lt
-ml
-ms
-nb
-nl
-nn
-pl
-ps
-pt
-pt_BR
-ru
-sk
-sl
-sr
-sv
-th
-tr
-uk
-ur
-ur_PK
-vi
-zh_CN
-zh_TW
-