Revision: 1138 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1138&view=re... Author: eht16 Date: 2010-01-17 21:48:36 +0000 (Sun, 17 Jan 2010)
Log Message: ----------- Remove po/LINGUAS from the repository. Generate it automatically if needed by reading available message catalogs from the po directory. Also respect the LINGUAS environment variable properly.
Modified Paths: -------------- trunk/geany-plugins/build/i18n.m4 trunk/geany-plugins/configure.ac trunk/geany-plugins/wscript
Removed Paths: ------------- trunk/geany-plugins/po/LINGUAS
Property Changed: ---------------- trunk/geany-plugins/
Property changes on: trunk/geany-plugins ___________________________________________________________________ Modified: svn:ignore - Makefile _build_ .lock-wscript .waf-*
+ Makefile.in aclocal.m4 config.h config.h.in config.log config.status configure libtool stamp-h stamp-h1 stamp-h.in autom4te.cache config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs RUN build-stamp *.tar.* intltool intltool-* _build_ .lock-wscript .waf-* po/LINGUAS
Modified: trunk/geany-plugins/build/i18n.m4 =================================================================== --- trunk/geany-plugins/build/i18n.m4 2010-01-17 17:16:48 UTC (rev 1137) +++ trunk/geany-plugins/build/i18n.m4 2010-01-17 21:48:36 UTC (rev 1138) @@ -1,5 +1,14 @@ AC_DEFUN([GP_I18N], [ + if test -n "${LINGUAS}" + then + ALL_LINGUAS="${LINGUAS}" + else + if test -z "$conf_dir" ; then + conf_dir="." + fi + ALL_LINGUAS=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $[1] }'` + fi GETTEXT_PACKAGE=geany-plugins AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(
Modified: trunk/geany-plugins/configure.ac =================================================================== --- trunk/geany-plugins/configure.ac 2010-01-17 17:16:48 UTC (rev 1137) +++ trunk/geany-plugins/configure.ac 2010-01-17 21:48:36 UTC (rev 1138) @@ -4,7 +4,7 @@
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-AC_CONFIG_SRCDIR([po/LINGUAS]) +AC_CONFIG_SRCDIR([po/POTFILES.in]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([build/cache])
Deleted: trunk/geany-plugins/po/LINGUAS =================================================================== --- trunk/geany-plugins/po/LINGUAS 2010-01-17 17:16:48 UTC (rev 1137) +++ trunk/geany-plugins/po/LINGUAS 2010-01-17 21:48:36 UTC (rev 1138) @@ -1,2 +0,0 @@ -# set of available languages (in alphabetic order) -be ca da de es fr ja pt_BR pt ru tr zh_CN
Modified: trunk/geany-plugins/wscript =================================================================== --- trunk/geany-plugins/wscript 2010-01-17 17:16:48 UTC (rev 1137) +++ trunk/geany-plugins/wscript 2010-01-17 21:48:36 UTC (rev 1138) @@ -48,6 +48,7 @@ import Options import Utils import preproc +from TaskGen import taskgen, feature
APPNAME = 'geany-plugins' @@ -196,6 +197,8 @@ # we don't require intltool on Windows (it would require Perl) though it works well try: conf.check_tool('intltool') + if 'LINGUAS' in os.environ: + conf.env['LINGUAS'] = os.environ['LINGUAS'] except: pass
@@ -355,6 +358,23 @@ { '1' : plugins[0].name, '2' : plugins[1].name }, dest='skip_plugins')
+@taskgen +@feature('intltool_po') +def write_linguas_file(self): + linguas = '' + if 'LINGUAS' in Build.bld.env: + linguas = Build.bld.env['LINGUAS'] + else: + files = os.listdir('%s/po' % self.path.abspath()) + files.sort() + 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): is_win32 = target_is_win32(bld.env)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org