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. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4529 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
8c4a8ff6d0
commit
b0510e97f7
@ -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>
|
||||
|
@ -20,8 +20,8 @@ text editor (like Geany ;-)) or you can also use a graphical
|
||||
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:
|
||||
|
||||
|
11
configure.ac
11
configure.ac
@ -240,7 +240,16 @@ GETTEXT_PACKAGE=geany
|
||||
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)
|
||||
|
@ -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
|
20
wscript
20
wscript
@ -51,6 +51,7 @@ import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from distutils import version
|
||||
from TaskGen import taskgen, feature
|
||||
|
||||
|
||||
APPNAME = 'geany'
|
||||
@ -195,6 +196,8 @@ def configure(conf):
|
||||
# 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 @@ def build(bld):
|
||||
bld.install_files('${DATADIR}/icons/hicolor/scalable/apps', 'icons/scalable/*.svg')
|
||||
|
||||
|
||||
@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 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user