[Xfce4-commits] <midori:master> Use po directory either in current or parent folder

Christian Dywan noreply at xfce.org
Tue Feb 16 01:04:01 CET 2010


Updating branch refs/heads/master
         to f9a6a8e379232fbec672876ca37e556839e8bddc (commit)
       from 2235a2507c33879ff7d1c0e0521ed64e3efa7efa (commit)

commit f9a6a8e379232fbec672876ca37e556839e8bddc
Author: Peter de Ridder <peter at xfce.org>
Date:   Mon Feb 15 22:34:28 2010 +0100

    Use po directory either in current or parent folder

 wscript |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/wscript b/wscript
index c00c9a2..f0f6881 100644
--- a/wscript
+++ b/wscript
@@ -371,14 +371,19 @@ def set_options (opt):
 # Taken from Geany's wscript, modified to support LINGUAS variable
 def write_linguas_file (self):
     linguas = ''
+    # Depending on Waf version, getcwd() is different
+    if os.path.exists ('./po'):
+        podir = './po'
+    else:
+        podir = '../po'
     if 'LINGUAS' in Build.bld.env:
         linguas = Build.bld.env['LINGUAS']
     else:
-        files = os.listdir ('../po')
+        files = os.listdir (podir)
         for f in files:
             if f.endswith ('.po'):
                 linguas += '%s ' % f[:-3]
-    f = open ('../po/LINGUAS', 'w')
+    f = open (podir + '/LINGUAS', 'w')
     f.write ('# This file is autogenerated. Do not edit.\n%s\n' % linguas)
     f.close ()
 write_linguas_file = feature ('intltool_po')(write_linguas_file)



More information about the Xfce4-commits mailing list