SF.net SVN: geany:[4529] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jan 17 18:37:34 UTC 2010


Revision: 4529
          http://geany.svn.sourceforge.net/geany/?rev=4529&view=rev
Author:   eht16
Date:     2010-01-17 18:37:34 +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/ChangeLog
    trunk/README.I18N
    trunk/configure.ac
    trunk/wscript

Removed Paths:
-------------
    trunk/po/LINGUAS

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
   - Makefile
Makefile.in
aclocal.m4
config.h
config.h.in
config.log
config.status
configure
libtool
stamp-h
stamp-h1
stamp-h.in
global.tags.old
autom4te.cache
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
codenames
geany.glade.bak
geany.gladep.bak
TODO.*
RUN
make_deb.sh
build-stamp
geany.1
geany.spec
geany.desktop
*.tar.*
debian
intltool
intltool-*
geany.pc
_build_
.lock-wscript
.waf-*

   + Makefile
Makefile.in
aclocal.m4
config.h
config.h.in
config.log
config.status
configure
libtool
stamp-h
stamp-h1
stamp-h.in
global.tags.old
autom4te.cache
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
codenames
geany.glade.bak
geany.gladep.bak
TODO.*
RUN
make_deb.sh
build-stamp
geany.1
geany.spec
geany.desktop
*.tar.*
debian
intltool
intltool-*
geany.pc
_build_
.lock-wscript
.waf-*
po/LINGUAS


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-01-17 15:28:19 UTC (rev 4528)
+++ trunk/ChangeLog	2010-01-17 18:37:34 UTC (rev 4529)
@@ -8,6 +8,11 @@
    src/plugindata.h:
    Add new signal: "geany-startup-complete" which is sent once all
    initialization and startup tasks has been done.
+ * README.I18N, configure.ac, wscript, po/LINGUAS:
+   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.
 
 
 2010-01-16  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/README.I18N
===================================================================
--- trunk/README.I18N	2010-01-17 15:28:19 UTC (rev 4528)
+++ trunk/README.I18N	2010-01-17 18:37:34 UTC (rev 4529)
@@ -20,8 +20,8 @@
 interface. I can suggest PoEdit (http://www.poedit.net/), but
 there are several other GUIs.
 
-Make sure you add your language to the file po/LINGUAS.
-Just open the file with a text editor and add your code.
+You don't need to modify the file po/LINGUAS, it is regenerated
+automatically on the next build.
 
 When you have finished editing the file, check the file with:
 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2010-01-17 15:28:19 UTC (rev 4528)
+++ trunk/configure.ac	2010-01-17 18:37:34 UTC (rev 4529)
@@ -240,7 +240,16 @@
 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
+if test -n "${LINGUAS}"
+then
+	ALL_LINGUAS="${LINGUAS}"
+	echo "special"
+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
 
 AM_GLIB_GNU_GETTEXT
 # workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)

Deleted: trunk/po/LINGUAS
===================================================================
--- trunk/po/LINGUAS	2010-01-17 15:28:19 UTC (rev 4528)
+++ trunk/po/LINGUAS	2010-01-17 18:37:34 UTC (rev 4529)
@@ -1,2 +0,0 @@
-# set of available languages (in alphabetic order)
-be bg ca cs de el en_GB es fi fr gl hu it ja ko lb nl pl pt pt_BR ro ru sl sv tr uk vi zh_CN zh_TW

Modified: trunk/wscript
===================================================================
--- trunk/wscript	2010-01-17 15:28:19 UTC (rev 4528)
+++ trunk/wscript	2010-01-17 18:37:34 UTC (rev 4529)
@@ -51,6 +51,7 @@
 import shutil
 import tempfile
 from distutils import version
+from TaskGen import taskgen, feature
 
 
 APPNAME = 'geany'
@@ -195,6 +196,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
 
@@ -513,6 +516,23 @@
 		bld.install_files('${DATADIR}/icons/hicolor/scalable/apps', 'icons/scalable/*.svg')
 
 
+ at taskgen
+ at 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 shutdown():
 	is_win32 = False if not Build.bld else target_is_win32(Build.bld.env)
 	# the following code was taken from midori's WAF script, thanks


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list