From 0851348931b8e0586fb7b655c70541ba2e0b05d6 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 22 Oct 2003 04:15:27 +0000 Subject: [PATCH] * configure.in: Detect iconv at configuration time. * src/po/Makefile.am: Invoke detected iconv in its simplest form. Minor cleanup. * gramps.sh.in: Correct paths for systems with custom datadir. * src/DisplayTrace.py: Check for LANG before including in the message. svn: r2279 --- configure.in | 1 + gramps.sh.in | 9 ++++++--- src/DisplayTrace.py | 5 ++++- src/po/Makefile.am | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 0cdf4ad1c..1dfc00d96 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,7 @@ AC_SUBST(VERSIONSTRING) AC_PATH_PROG(MSGFMT, msgfmt) AC_PATH_PROG(MSGCONV, msgconv) +AC_PATH_PROG(ICONV, iconv) LANGUAGES="hu zh_CN cs da_DK de es fr it nl pl pt_BR ro ru sv" AC_SUBST(LANGUAGES) diff --git a/gramps.sh.in b/gramps.sh.in index 0cf3e533c..4a8386321 100644 --- a/gramps.sh.in +++ b/gramps.sh.in @@ -22,16 +22,19 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ +PACKAGE=@PACKAGE@ export GRAMPSDIR=@datadir@/@PACKAGE@ +export GRAMPSPYDIR=@pkgpythondir@ +export GRAMPSPLUGINSDIR=$GRAMPSPYDIR/plugins:$GRAMPSPYDIR/docgen:$GRAMPSPYDIR/filters export GRAMPSLIBDIR=@libdir@/@PACKAGE@ export GRAMPSI18N=@prefix@/share/locale if [ "$PYTHONPATH" = "" ] then - export PYTHONPATH=$GRAMPSDIR:$GRAMPSLIBDIR + export PYTHONPATH=$GRAMPSDIR:$GRAMPSPLUGINSDIR:$GRAMPSLIBDIR else - export PYTHONPATH=$GRAMPSDIR:$GRAMPSLIBDIR:$PYTHONPATH + export PYTHONPATH=$GRAMPSDIR:$GRAMPSLIBDIR:$GRAMPSPLUGINSDIR:$PYTHONPATH fi -exec @PYTHON@ $GRAMPSDIR/gramps.py $* +exec @PYTHON@ $GRAMPSPYDIR/gramps.py $* diff --git a/src/DisplayTrace.py b/src/DisplayTrace.py index 31a27210a..cf0ce7074 100644 --- a/src/DisplayTrace.py +++ b/src/DisplayTrace.py @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + #------------------------------------------------------------------------- # # Standard python modules @@ -74,7 +76,8 @@ class DisplayTrace: 'email message to gramps-bugs@lists.sourceforge.net\n\n')) msg.write("GRAMPS : %s\n" % const.version) - msg.write("LANG : %s\n" % os.environ['LANG']) + if os.environ.has_key('LANG'): + msg.write("LANG : %s\n" % os.environ['LANG']) msg.write("Python : %s.%s.%s %s\n" % (ver[0],ver[1],ver[2],ver[3])) msg.write("GTK : %s.%s.%s\n" % gtk.gtk_version) msg.write('PyGTK : %d.%d.%d\n' % gtk.pygtk_version) diff --git a/src/po/Makefile.am b/src/po/Makefile.am index 4db6a118a..2104343e1 100644 --- a/src/po/Makefile.am +++ b/src/po/Makefile.am @@ -20,12 +20,12 @@ uninstall-local: SUFFIXES = .po .mo .po.mo: - @MSGCONV@ --to-code=UTF-8 $< -o temp.po + $(MSGCONV) --to-code=UTF-8 $< -o temp.po $(MSGFMT) -v temp.po -o $@ rm temp.po zh_CN.mo: $(top_srcdir)/src/po/zh_CN.po - iconv --from-code=GB2312 --to-code=UTF-8 $< -o temp.po + $(ICONV) -f GB2312 -t UTF-8 $< > temp.po $(MSGFMT) -v temp.po -o $@ rm temp.po