[Xfce4-commits] <gigolo:master> Generate LINGUAS file on the fly as it is not maintained anymore
Enrico Tröger
enrico at xfce.org
Wed Aug 19 20:42:01 CEST 2009
Updating branch refs/heads/master
to 2e6adb27cb88cfde52656706d3ce47949dd57001 (commit)
from 037b10d1fa24b6013ee710516faac2c88ad4789e (commit)
commit 2e6adb27cb88cfde52656706d3ce47949dd57001
Author: Enrico Tröger <enrico at xfce.org>
Date: Wed Aug 19 20:41:52 2009 +0200
Generate LINGUAS file on the fly as it is not maintained anymore
.gitignore | 1 +
autogen.sh | 1 -
configure.ac | 2 +-
po/LINGUAS | 4 ++--
wscript | 14 ++++++++++++++
5 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 53a6cb5..b5dd564 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ _build_
.lock-wscript
.waf-*
RUN
+po/LINGUAS
diff --git a/autogen.sh b/autogen.sh
index 5f81302..ac67005 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -67,7 +67,6 @@ echo "Processing configure.ac"
echo "no" | glib-gettextize --force --copy
intltoolize --copy --force --automake
-#~ libtoolize --copy --force || glibtoolize --copy --force
aclocal
autoheader
automake --add-missing --copy --gnu
diff --git a/configure.ac b/configure.ac
index 271a397..acac32e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ GETTEXT_PACKAGE=gigolo
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package.])
-ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
+ALL_LINGUAS="`ls po/*.po | awk 'BEGIN { FS="[./]"; ORS=" " } { print $2 }'`"
AM_GLIB_GNU_GETTEXT
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
diff --git a/po/LINGUAS b/po/LINGUAS
index 5305409..ea99921 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
-# set of available languages (in alphabetic order)
-ast bg ca cs da de el es eu fr gl id it ja pl pt_BR sv tr ur ur_PK zh_CN
+# autogenerated file, do not edit.
+fr pl id tr ast eu hu bg pt_BR gl el es da sv ja de it ur zh_CN ur_PK cs ca
diff --git a/wscript b/wscript
index 84a7bee..dad3295 100644
--- a/wscript
+++ b/wscript
@@ -22,6 +22,7 @@
+from TaskGen import taskgen, feature
import Build, Configure, Options, Utils, UnitTest
import sys, os, shutil
@@ -81,6 +82,19 @@ def set_options(opt):
help='update the message catalogs for translation', dest='update_po')
+ at taskgen
+ at feature('intltool_po')
+def write_linguas_file(self):
+ linguas = ''
+ files = os.listdir('%s/po' % self.path.abspath())
+ for f in files:
+ if f.endswith('.po'):
+ linguas += '%s ' % f[:-3]
+ f = open("po/LINGUAS", "w")
+ f.write('# This file is autogenerated. Do not edit.\n%s\n' % linguas)
+ f.close()
+
+
def build(bld):
def add_tests(bld):
tests = os.listdir('tests')
More information about the Xfce4-commits
mailing list