SF.net SVN: geany-plugins:[1607] trunk/geanylatex

frlan at users.sourceforge.net frlan at xxxxx
Mon Sep 27 07:11:31 UTC 2010


Revision: 1607
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1607&view=rev
Author:   frlan
Date:     2010-09-27 07:11:31 +0000 (Mon, 27 Sep 2010)

Log Message:
-----------
Try to backport automatic generation of LINGUAS files into waf script as a backport from Geany-plugins build script

Modified Paths:
--------------
    trunk/geanylatex/ChangeLog
    trunk/geanylatex/wscript

Modified: trunk/geanylatex/ChangeLog
===================================================================
--- trunk/geanylatex/ChangeLog	2010-09-27 07:11:11 UTC (rev 1606)
+++ trunk/geanylatex/ChangeLog	2010-09-27 07:11:31 UTC (rev 1607)
@@ -1,3 +1,9 @@
+2010-09-26  Frank Lanitz  <frank at frank.uvena.de>
+
+ * Try to backport automatic generation of LINGUAS files into waf script
+   as a backport from Geany-plugins build script. 
+
+
 2010-09-20  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>
 
  * Added a feature that inserts capital letters on first letter of a 

Modified: trunk/geanylatex/wscript
===================================================================
--- trunk/geanylatex/wscript	2010-09-27 07:11:11 UTC (rev 1606)
+++ trunk/geanylatex/wscript	2010-09-27 07:11:31 UTC (rev 1607)
@@ -42,7 +42,9 @@
 import Utils
 import preproc
 
+from TaskGen import taskgen, feature
 
+
 APPNAME = 'geanylatex'
 VERSION = '0.6dev'
 
@@ -158,6 +160,9 @@
 	# 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
 
@@ -255,6 +260,27 @@
 	opt.add_option('--write-installer', action='store_true', default=False,
 		help='create Windows installer (maintainer and Win32 only)', dest='write_installer')
 
+
+ at taskgen
+ at feature('intltool_po')
+def write_linguas_file(self):
+	linguas = ''
+	if 'LINGUAS' in Build.bld.env:
+		files = Build.bld.env['LINGUAS']
+		for po_filename in files.split(' '):
+			if os.path.exists ('po/%s.po' % po_filename):
+				linguas += '%s ' % po_filename
+	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.



More information about the Plugins-Commits mailing list