* various: intltoolize and gettextize properly.

svn: r6144
This commit is contained in:
Alex Roitman 2006-03-15 23:58:23 +00:00
parent edb238694b
commit c1a949cae5
77 changed files with 164347 additions and 202511 deletions

View File

@ -1,3 +1,6 @@
2006-03-15 Alex Roitman <shura@gramps-project.org>
* various: intltoolize and gettextize properly.
2006-03-14 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (update_empty,update_real): Add
functions for updating the display;

View File

@ -1,56 +1,236 @@
$Id$
Installation Instructions
*************************
This file contains some useful details on the installation from source code
for GRAMPS. It does not cover installation of a pre-built binary package.
For that use your package manager, the rest is done by the packager.
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
configure vs autogen scripts
----------------------------
If you are building from released tarball, you should be able to just
run "./configure && make". However, if you're building from the CVS,
the configure is not present. You should auto-generate it by
running ./autogen.sh and then "make" and, finally, "make install".
Basic Installation
==================
These are generic installation instructions.
Regular vs local installation
-----------------------------
This version of gramps requires, among others, the two things to be done:
gconf schemas and mime types for gramps MUST be properly installed.
The usual ./configure, make, and make install as a root should do the trick.
But be careful if you're using the non-default options or would like
to install without being root.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
The latter is possible, but you should supply additional arguments to
autogen or configure:
--with-gconf-source=xml::$HOME/.gconf
--with-gconf-schema-file-dir=$HOME
--with-mime-dir=$HOME/.local/share/mime
Most likely, such local install will also need some prefix with write
permissions for you:
--prefix=$HOME/my_gramps_path
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
Whether you're doing local install or regular install,
YOU MUST INSTALL GCONF SCHEMAS AND MIME TYPES.
YOU HAVE BEEN WARNED!
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
Packager's issues
------------------
The above mentioned gconf schemas and mime types must be installed.
However, the update-mime-database and the gconftool-2 calls to process
the newly installed types and schemas must be done in POST-INSTALLATION.
In packager's world, the install happens on packager's machine
into something like /tmp/gramps-tmp. However, the postinstall
should happen on the user's machine.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
To assist with that, there's an argument available in configure
(or autogen, which will pass it to configure) which disables
the gconf schema and mime type processing:
--enable-packager-mode
This argument should disable postinstall calls made during
make install, and print a nasty warning during configure.
IT IS PACKAGER'S RESPONSIBILITY to follow the advice given
by the configure output and to copy the appropriate code
from the src/data/Makefile.am into the pos-tinstall (and post-uninstall)
of the particular packaging system.

View File

@ -1,6 +1,6 @@
SUBDIRS = src doc example
SUBDIRS = po src doc example
EXTRA_DIST = autogen.sh gramps.spec.in gramps.spec COPYING-DOCS FAQ COPYING
EXTRA_DIST = config.rpath autogen.sh gramps.spec.in gramps.spec COPYING-DOCS FAQ COPYING intltool-extract.in intltool-merge.in intltool-update.in
bin_SCRIPTS = gramps
@ -8,6 +8,7 @@ dist_pkgdata_DATA = COPYING
distuninstallcheck_listfiles = find . -type -f -print | grep -E -v '/(globs|magic|XMLnamespaces)'
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
gramps: gramps.sh
cp gramps.sh gramps
@ -23,3 +24,5 @@ distuninstallcheck:
@:
CLEANFILES = gramps
ACLOCAL_AMFLAGS = -I m4

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# shamelessly borrowed and hacked from the Galeon source distribution
# shamelessly borrowed from the Galeon source distribution
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
@ -14,83 +14,8 @@ PKG_NAME="gramps"
exit 1
}
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
dr=$srcdir
echo processing $dr
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude || {
echo
echo "**Error**: aclocal failed. This may mean that you have not"
echo "installed all of the packages you need, or you may need to"
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
echo "for the prefix where you installed the packages whose"
echo "macros were not found"
exit 1
}
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
) || exit 1
echo "Setting py-compile script executable ..."
chmod 755 py-compile
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
else
echo Skipping configure process.
fi
REQUIRED_AUTOMAKE_VERSION=1.6 USE_GNOME2_MACROS=1 . gnome-autogen.sh

1495
gramps2/config.guess vendored Normal file

File diff suppressed because it is too large Load Diff

571
gramps2/config.rpath Executable file
View File

@ -0,0 +1,571 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2005 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
kfreebsd*-gnu)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
;;
knetbsd*-gnu)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx*)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

1609
gramps2/config.sub vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,8 @@ dnl Process this file with autoconf to produce a configure script.
dnl May need to run automake && aclocal first
AC_PREREQ(2.57)
AC_INIT(gramps, 2.1.0, gramps-bugs@lists.sourceforge.net)
AC_CONFIG_SRCDIR(src/gramps.py)
AC_INIT(gramps, 2.1.0, [gramps-bugs@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE(1.6.3)
RELEASE=0.SVN$(svnversion -n .)
@ -17,6 +17,11 @@ then
VERSIONSTRING="$VERSION-$RELEASE"
fi
dnl put the ACLOCAL flags in the Makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_PROG_INTLTOOL
dnl Checking for gconftool-2
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test "x$GCONFTOOL" = xno; then
@ -42,18 +47,25 @@ if test x$ICONV = xno; then
AC_MSG_ERROR(Couldn't find iconv program.)
fi
LANGUAGES="hu zh_CN cs da de es fr it nb nl no pl pt_BR ro ru sv eo fi lt"
AC_SUBST(LANGUAGES)
dnl Add the languages which your application supports here.
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl no pl pt_BR ro ru sv eo fi lt"
GETTEXT_PACKAGE=gramps
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
AM_GLIB_GNU_GETTEXT
DISTLANGS=
POFILES=
MOFILES=
for lang in $LANGUAGES; do
POFILES="$POFILES $lang.po"
MOFILES="$MOFILES $lang.mo"
done
AC_SUBST(POFILES)
AC_SUBST(MOFILES)
dnl LANGUAGES="hu zh_CN cs da de es fr it nb nl no pl pt_BR ro ru sv eo fi lt"
dnl AC_SUBST(LANGUAGES)
dnl
dnl DISTLANGS=
dnl POFILES=
dnl MOFILES=
dnl for lang in $LANGUAGES; do
dnl POFILES="$POFILES $lang.po"
dnl MOFILES="$MOFILES $lang.mo"
dnl done
dnl AC_SUBST(POFILES)
dnl AC_SUBST(MOFILES)
dnl Checks for programs.
dnl We first only check for python >= 2.3
@ -226,10 +238,9 @@ AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)
AC_SUBST(GNOMEHELP)
AC_SUBST(GPREFIX)
AC_CONFIG_FILES([
AC_CONFIG_FILES([ po/Makefile.in
Makefile
src/Makefile
src/const.py
src/RelLib/Makefile
src/Config/Makefile
src/Mime/Makefile
@ -248,7 +259,6 @@ src/data/Makefile
src/glade/Makefile
src/images/Makefile
src/data/templates/Makefile
src/po/Makefile
doc/Makefile
doc/man/Makefile
doc/man/fr/Makefile
@ -257,6 +267,10 @@ doc/gramps-manual/C/Makefile
doc/gramps-manual/fr/Makefile
example/Makefile
example/gramps/Makefile
])
AC_OUTPUT([
src/const.py
gramps.spec
gramps.sh])
AC_OUTPUT
gramps.sh
])

841
gramps2/intltool-extract.in Normal file
View File

@ -0,0 +1,841 @@
#!@INTLTOOL_PERL@ -w
# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
#
# The Intltool Message Extractor
#
# Copyright (C) 2000-2001, 2003 Free Software Foundation.
#
# Intltool is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Intltool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# Authors: Kenneth Christiansen <kenneth@gnu.org>
# Darin Adler <darin@bentspoon.com>
#
## Release information
my $PROGRAM = "intltool-extract";
my $PACKAGE = "intltool";
my $VERSION = "0.34.2";
## Loaded modules
use strict;
use File::Basename;
use Getopt::Long;
## Scalars used by the option stuff
my $TYPE_ARG = "0";
my $LOCAL_ARG = "0";
my $HELP_ARG = "0";
my $VERSION_ARG = "0";
my $UPDATE_ARG = "0";
my $QUIET_ARG = "0";
my $SRCDIR_ARG = ".";
my $FILE;
my $OUTFILE;
my $gettext_type = "";
my $input;
my %messages = ();
my %loc = ();
my %count = ();
my %comments = ();
my $strcount = 0;
my $XMLCOMMENT = "";
## Use this instead of \w for XML files to handle more possible characters.
my $w = "[-A-Za-z0-9._:]";
## Always print first
$| = 1;
## Handle options
GetOptions (
"type=s" => \$TYPE_ARG,
"local|l" => \$LOCAL_ARG,
"help|h" => \$HELP_ARG,
"version|v" => \$VERSION_ARG,
"update" => \$UPDATE_ARG,
"quiet|q" => \$QUIET_ARG,
"srcdir=s" => \$SRCDIR_ARG,
) or &error;
&split_on_argument;
## Check for options.
## This section will check for the different options.
sub split_on_argument {
if ($VERSION_ARG) {
&version;
} elsif ($HELP_ARG) {
&help;
} elsif ($LOCAL_ARG) {
&place_local;
&extract;
} elsif ($UPDATE_ARG) {
&place_normal;
&extract;
} elsif (@ARGV > 0) {
&place_normal;
&message;
&extract;
} else {
&help;
}
}
sub place_normal {
$FILE = $ARGV[0];
$OUTFILE = "$FILE.h";
}
sub place_local {
$FILE = $ARGV[0];
$OUTFILE = fileparse($FILE, ());
if (!-e "tmp/") {
system("mkdir tmp/");
}
$OUTFILE = "./tmp/$OUTFILE.h"
}
sub determine_type {
if ($TYPE_ARG =~ /^gettext\/(.*)/) {
$gettext_type=$1
}
}
## Sub for printing release information
sub version{
print <<_EOF_;
${PROGRAM} (${PACKAGE}) $VERSION
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Written by Kenneth Christiansen, 2000.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
_EOF_
exit;
}
## Sub for printing usage information
sub help {
print <<_EOF_;
Usage: ${PROGRAM} [OPTION]... [FILENAME]
Generates a header file from an XML source file.
It grabs all strings between <_translatable_node> and its end tag in
XML files. Read manpage (man ${PROGRAM}) for more info.
--type=TYPE Specify the file type of FILENAME. Currently supports:
"gettext/glade", "gettext/ini", "gettext/keys"
"gettext/rfc822deb", "gettext/schemas",
"gettext/scheme", "gettext/xml"
-l, --local Writes output into current working directory
(conflicts with --update)
--update Writes output into the same directory the source file
reside (conflicts with --local)
--srcdir Root of the source tree
-v, --version Output version information and exit
-h, --help Display this help and exit
-q, --quiet Quiet mode
Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
or send email to <xml-i18n-tools\@gnome.org>.
_EOF_
exit;
}
## Sub for printing error messages
sub error{
print STDERR "Try `${PROGRAM} --help' for more information.\n";
exit;
}
sub message {
print "Generating C format header file for translation.\n" unless $QUIET_ARG;
}
sub extract {
&determine_type;
&convert;
open OUT, ">$OUTFILE";
binmode (OUT) if $^O eq 'MSWin32';
&msg_write;
close OUT;
print "Wrote $OUTFILE\n" unless $QUIET_ARG;
}
sub convert {
## Reading the file
{
local (*IN);
local $/; #slurp mode
open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
$input = <IN>;
}
&type_ini if $gettext_type eq "ini";
&type_keys if $gettext_type eq "keys";
&type_xml if $gettext_type eq "xml";
&type_glade if $gettext_type eq "glade";
&type_scheme if $gettext_type eq "scheme";
&type_schemas if $gettext_type eq "schemas";
&type_rfc822deb if $gettext_type eq "rfc822deb";
}
sub entity_decode_minimal
{
local ($_) = @_;
s/&apos;/'/g; # '
s/&quot;/"/g; # "
s/&amp;/&/g;
return $_;
}
sub entity_decode
{
local ($_) = @_;
s/&apos;/'/g; # '
s/&quot;/"/g; # "
s/&amp;/&/g;
s/&lt;/</g;
s/&gt;/>/g;
return $_;
}
sub escape_char
{
return '\"' if $_ eq '"';
return '\n' if $_ eq "\n";
return '\\' if $_ eq '\\';
return $_;
}
sub escape
{
my ($string) = @_;
return join "", map &escape_char, split //, $string;
}
sub type_ini {
### For generic translatable desktop files ###
while ($input =~ /^_.*=(.*)$/mg) {
$messages{$1} = [];
}
}
sub type_keys {
### For generic translatable mime/keys files ###
while ($input =~ /^\s*_\w+=(.*)$/mg) {
$messages{$1} = [];
}
}
sub type_xml {
### For generic translatable XML files ###
my $tree = readXml($input);
parseTree(0, $tree);
}
sub print_var {
my $var = shift;
my $vartype = ref $var;
if ($vartype =~ /ARRAY/) {
my @arr = @{$var};
print "[ ";
foreach my $el (@arr) {
print_var($el);
print ", ";
}
print "] ";
} elsif ($vartype =~ /HASH/) {
my %hash = %{$var};
print "{ ";
foreach my $key (keys %hash) {
print "$key => ";
print_var($hash{$key});
print ", ";
}
print "} ";
} else {
print $var;
}
}
# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
sub getAttributeString
{
my $sub = shift;
my $do_translate = shift || 1;
my $language = shift || "";
my $translate = shift;
my $result = "";
foreach my $e (reverse(sort(keys %{ $sub }))) {
my $key = $e;
my $string = $sub->{$e};
my $quote = '"';
$string =~ s/^[\s]+//;
$string =~ s/[\s]+$//;
if ($string =~ /^'.*'$/)
{
$quote = "'";
}
$string =~ s/^['"]//g;
$string =~ s/['"]$//g;
## differences from intltool-merge.in.in
if ($key =~ /^_/) {
$comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
$messages{entity_decode($string)} = [];
$$translate = 2;
}
## differences end here from intltool-merge.in.in
$result .= " $key=$quote$string$quote";
}
return $result;
}
# Verbatim copy from intltool-merge.in.in
sub getXMLstring
{
my $ref = shift;
my $spacepreserve = shift || 0;
my @list = @{ $ref };
my $result = "";
my $count = scalar(@list);
my $attrs = $list[0];
my $index = 1;
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
$spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
while ($index < $count) {
my $type = $list[$index];
my $content = $list[$index+1];
if (! $type ) {
# We've got CDATA
if ($content) {
# lets strip the whitespace here, and *ONLY* here
$content =~ s/\s+/ /gs if (!$spacepreserve);
$result .= $content;
}
} elsif ( "$type" ne "1" ) {
# We've got another element
$result .= "<$type";
$result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
if ($content) {
my $subresult = getXMLstring($content, $spacepreserve);
if ($subresult) {
$result .= ">".$subresult . "</$type>";
} else {
$result .= "/>";
}
} else {
$result .= "/>";
}
}
$index += 2;
}
return $result;
}
# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
# Translate list of nodes if necessary
sub translate_subnodes
{
my $fh = shift;
my $content = shift;
my $language = shift || "";
my $singlelang = shift || 0;
my $spacepreserve = shift || 0;
my @nodes = @{ $content };
my $count = scalar(@nodes);
my $index = 0;
while ($index < $count) {
my $type = $nodes[$index];
my $rest = $nodes[$index+1];
traverse($fh, $type, $rest, $language, $spacepreserve);
$index += 2;
}
}
# Based on traverse() in intltool-merge.in.in
sub traverse
{
my $fh = shift; # unused, to allow us to sync code between -merge and -extract
my $nodename = shift;
my $content = shift;
my $language = shift || "";
my $spacepreserve = shift || 0;
if ($nodename && "$nodename" eq "1") {
$XMLCOMMENT = $content;
} elsif ($nodename) {
# element
my @all = @{ $content };
my $attrs = shift @all;
my $translate = 0;
my $outattr = getAttributeString($attrs, 1, $language, \$translate);
if ($nodename =~ /^_/) {
$translate = 1;
$nodename =~ s/^_//;
}
my $lookup = '';
$spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
if ($translate) {
$lookup = getXMLstring($content, $spacepreserve);
if (!$spacepreserve) {
$lookup =~ s/^\s+//s;
$lookup =~ s/\s+$//s;
}
if ($lookup && $translate != 2) {
$comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
$messages{$lookup} = [];
} elsif ($translate == 2) {
translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
}
} else {
$XMLCOMMENT = "";
my $count = scalar(@all);
if ($count > 0) {
my $index = 0;
while ($index < $count) {
my $type = $all[$index];
my $rest = $all[$index+1];
traverse($fh, $type, $rest, $language, $spacepreserve);
$index += 2;
}
}
}
$XMLCOMMENT = "";
}
}
# Verbatim copy from intltool-merge.in.in, $fh for compatibility
sub parseTree
{
my $fh = shift;
my $ref = shift;
my $language = shift || "";
my $name = shift @{ $ref };
my $cont = shift @{ $ref };
while (!$name || "$name" eq "1") {
$name = shift @{ $ref };
$cont = shift @{ $ref };
}
my $spacepreserve = 0;
my $attrs = @{$cont}[0];
$spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
traverse($fh, $name, $cont, $language, $spacepreserve);
}
# Verbatim copy from intltool-merge.in.in
sub intltool_tree_comment
{
my $expat = shift;
my $data = $expat->original_string();
my $clist = $expat->{Curlist};
my $pos = $#$clist;
$data =~ s/^<!--//s;
$data =~ s/-->$//s;
push @$clist, 1 => $data;
}
# Verbatim copy from intltool-merge.in.in
sub intltool_tree_cdatastart
{
my $expat = shift;
my $clist = $expat->{Curlist};
my $pos = $#$clist;
push @$clist, 0 => $expat->original_string();
}
# Verbatim copy from intltool-merge.in.in
sub intltool_tree_cdataend
{
my $expat = shift;
my $clist = $expat->{Curlist};
my $pos = $#$clist;
$clist->[$pos] .= $expat->original_string();
}
# Verbatim copy from intltool-merge.in.in
sub intltool_tree_char
{
my $expat = shift;
my $text = shift;
my $clist = $expat->{Curlist};
my $pos = $#$clist;
# Use original_string so that we retain escaped entities
# in CDATA sections.
#
if ($pos > 0 and $clist->[$pos - 1] eq '0') {
$clist->[$pos] .= $expat->original_string();
} else {
push @$clist, 0 => $expat->original_string();
}
}
# Verbatim copy from intltool-merge.in.in
sub intltool_tree_start
{
my $expat = shift;
my $tag = shift;
my @origlist = ();
# Use original_string so that we retain escaped entities
# in attribute values. We must convert the string to an
# @origlist array to conform to the structure of the Tree
# Style.
#
my @original_array = split /\x/, $expat->original_string();
my $source = $expat->original_string();
# Remove leading tag.
#
$source =~ s|^\s*<\s*(\S+)||s;
# Grab attribute key/value pairs and push onto @origlist array.
#
while ($source)
{
if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
{
$source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
push @origlist, $1;
push @origlist, '"' . $2 . '"';
}
elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
{
$source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
push @origlist, $1;
push @origlist, "'" . $2 . "'";
}
else
{
last;
}
}
my $ol = [ { @origlist } ];
push @{ $expat->{Lists} }, $expat->{Curlist};
push @{ $expat->{Curlist} }, $tag => $ol;
$expat->{Curlist} = $ol;
}
# Copied from intltool-merge.in.in and added comment handler.
sub readXml
{
my $xmldoc = shift || return;
my $ret = eval 'require XML::Parser';
if(!$ret) {
die "You must have XML::Parser installed to run $0\n\n";
}
my $xp = new XML::Parser(Style => 'Tree');
$xp->setHandlers(Char => \&intltool_tree_char);
$xp->setHandlers(Start => \&intltool_tree_start);
$xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
$xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
## differences from intltool-merge.in.in
$xp->setHandlers(Comment => \&intltool_tree_comment);
## differences end here from intltool-merge.in.in
my $tree = $xp->parse($xmldoc);
#print_var($tree);
# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
# would be:
# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
return $tree;
}
sub type_schemas {
### For schemas XML files ###
# FIXME: We should handle escaped < (less than)
while ($input =~ /
<locale\ name="C">\s*
(<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
(<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
(<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
<\/locale>
/sgx) {
my @totranslate = ($3,$6,$9);
my @eachcomment = ($2,$5,$8);
foreach (@totranslate) {
my $currentcomment = shift @eachcomment;
next if !$_;
s/\s+/ /g;
$messages{entity_decode_minimal($_)} = [];
$comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
}
}
}
sub type_rfc822deb {
### For rfc822-style Debian configuration files ###
my $lineno = 1;
my $type = '';
while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
{
my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
while ($pre =~ m/\n/g)
{
$lineno ++;
}
$lineno += length($newline);
my @str_list = rfc822deb_split(length($underscore), $text);
for my $str (@str_list)
{
$strcount++;
$messages{$str} = [];
$loc{$str} = $lineno;
$count{$str} = $strcount;
my $usercomment = '';
while($pre =~ s/(^|\n)#([^\n]*)$//s)
{
$usercomment = "\n" . $2 . $usercomment;
}
$comments{$str} = $tag . $usercomment;
}
$lineno += ($text =~ s/\n//g);
}
}
sub rfc822deb_split {
# Debian defines a special way to deal with rfc822-style files:
# when a value contain newlines, it consists of
# 1. a short form (first line)
# 2. a long description, all lines begin with a space,
# and paragraphs are separated by a single dot on a line
# This routine returns an array of all paragraphs, and reformat
# them.
# When first argument is 2, the string is a comma separated list of
# values.
my $type = shift;
my $text = shift;
$text =~ s/^[ \t]//mg;
return (split(/, */, $text, 0)) if $type ne 1;
return ($text) if $text !~ /\n/;
$text =~ s/([^\n]*)\n//;
my @list = ($1);
my $str = '';
for my $line (split (/\n/, $text))
{
chomp $line;
if ($line =~ /^\.\s*$/)
{
# New paragraph
$str =~ s/\s*$//;
push(@list, $str);
$str = '';
}
elsif ($line =~ /^\s/)
{
# Line which must not be reformatted
$str .= "\n" if length ($str) && $str !~ /\n$/;
$line =~ s/\s+$//;
$str .= $line."\n";
}
else
{
# Continuation line, remove newline
$str .= " " if length ($str) && $str !~ /\n$/;
$str .= $line;
}
}
$str =~ s/\s*$//;
push(@list, $str) if length ($str);
return @list;
}
sub type_glade {
### For translatable Glade XML files ###
my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
# Glade sometimes uses tags that normally mark translatable things for
# little bits of non-translatable content. We work around this by not
# translating strings that only includes something like label4 or window1.
$messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
}
while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
for my $item (split (/\n/, $1)) {
$messages{entity_decode($item)} = [];
}
}
## handle new glade files
while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
$messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
$comments{entity_decode($3)} = entity_decode($2) ;
}
}
while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
$messages{entity_decode_minimal($2)} = [];
}
}
sub type_scheme {
my ($line, $i, $state, $str, $trcomment, $char);
for $line (split(/\n/, $input)) {
$i = 0;
$state = 0; # 0 - nothing, 1 - string, 2 - translatable string
while ($i < length($line)) {
if (substr($line,$i,1) eq "\"") {
if ($state == 2) {
$comments{$str} = $trcomment if ($trcomment);
$messages{$str} = [];
$str = '';
$state = 0; $trcomment = "";
} elsif ($state == 1) {
$str = '';
$state = 0; $trcomment = "";
} else {
$state = 1;
$str = '';
if ($i>0 && substr($line,$i-1,1) eq '_') {
$state = 2;
}
}
} elsif (!$state) {
if (substr($line,$i,1) eq ";") {
$trcomment = substr($line,$i+1);
$trcomment =~ s/^;*\s*//;
$i = length($line);
} elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
$trcomment = "";
}
} else {
if (substr($line,$i,1) eq "\\") {
$char = substr($line,$i+1,1);
if ($char ne "\"" && $char ne "\\") {
$str = $str . "\\";
}
$i++;
}
$str = $str . substr($line,$i,1);
}
$i++;
}
}
}
sub msg_write {
my @msgids;
if (%count)
{
@msgids = sort { $count{$a} <=> $count{$b} } keys %count;
}
else
{
@msgids = sort keys %messages;
}
for my $message (@msgids)
{
my $offsetlines = 1;
$offsetlines++ if $message =~ /%/;
if (defined ($comments{$message}))
{
while ($comments{$message} =~ m/\n/g)
{
$offsetlines++;
}
}
print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
if defined $loc{$message};
print OUT "/* ".$comments{$message}." */\n"
if defined $comments{$message};
print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
my @lines = split (/\n/, $message, -1);
for (my $n = 0; $n < @lines; $n++)
{
if ($n == 0)
{
print OUT "char *s = N_(\"";
}
else
{
print OUT " \"";
}
print OUT escape($lines[$n]);
if ($n < @lines - 1)
{
print OUT "\\n\"\n";
}
else
{
print OUT "\");\n";
}
}
}
}

1356
gramps2/intltool-merge.in Normal file

File diff suppressed because it is too large Load Diff

1065
gramps2/intltool-update.in Normal file

File diff suppressed because it is too large Load Diff

21
gramps2/m4/codeset.m4 Normal file
View File

@ -0,0 +1,21 @@
# codeset.m4 serial AM1 (gettext-0.10.40)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET);],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
])
if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi
])

549
gramps2/m4/gettext.m4 Normal file
View File

@ -0,0 +1,549 @@
# gettext.m4 serial 37 (gettext-0.14.4)
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
dnl Macro to add for using GNU gettext.
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
dnl default (if it is not specified or empty) is 'no-libtool'.
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
dnl depending on --{enable,disable}-{shared,static} and on the presence of
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
dnl $(top_builddir)/intl/libintl.a will be created.
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
dnl implementations (in libc or libintl) without the ngettext() function
dnl will be ignored. If NEEDSYMBOL is specified and is
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
dnl INTLDIR is used to find the intl libraries. If empty,
dnl the value `$(top_builddir)/intl/' is used.
dnl
dnl The result of the configuration is one of three cases:
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
dnl and used.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 2) GNU gettext has been found in the system's C library.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 3) No internationalization, always use English msgid.
dnl Catalog format: none
dnl Catalog extension: none
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
dnl The use of .gmo is historical (it was needed to avoid overwriting the
dnl GNU format catalogs when building on a platform with an X/Open gettext),
dnl but we keep it in order not to force irrelevant filename changes on the
dnl maintainers.
dnl
AC_DEFUN([AM_GNU_GETTEXT],
[
dnl Argument checking.
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
])])])])])
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
AC_REQUIRE([AM_PO_SUBDIRS])dnl
ifelse(gt_included_intl, yes, [
AC_REQUIRE([AM_INTL_SUBDIR])dnl
])
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
dnl Sometimes libintl requires libiconv, so first search for libiconv.
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
dnl documented, we avoid it.
ifelse(gt_included_intl, yes, , [
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
dnl Set USE_NLS.
AM_NLS
ifelse(gt_included_intl, yes, [
BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no
])
LIBINTL=
LTLIBINTL=
POSUB=
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
ifelse(gt_included_intl, yes, [
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
])
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If GNU gettext is available we use this. Else we have
dnl to fall back to GNU NLS library.
dnl Add a version number to the cache macros.
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
[AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;],
[bindtextdomain ("", "");
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
gt_cv_func_gnugettext_libc=yes,
gt_cv_func_gnugettext_libc=no)])
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
dnl Sometimes libintl requires libiconv, so first search for libiconv.
ifelse(gt_included_intl, yes, , [
AM_ICONV_LINK
])
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
dnl even if libiconv doesn't exist.
AC_LIB_LINKFLAGS_BODY([intl])
AC_CACHE_CHECK([for GNU gettext in libintl],
gt_cv_func_gnugettext_libintl,
[gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
dnl Now see whether libintl exists and does not depend on libiconv.
AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
gt_cv_func_gnugettext_libintl=yes,
gt_cv_func_gnugettext_libintl=no)
dnl Now see whether libintl exists and depends on libiconv.
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
[LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
gt_cv_func_gnugettext_libintl=yes
])
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
fi
dnl If an already present or preinstalled GNU gettext() is found,
dnl use it. But if this macro is used in GNU gettext, and GNU
dnl gettext is already preinstalled in libintl, we update this
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
&& test "$PACKAGE" != gettext-runtime \
&& test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
else
dnl Reset the values set by searching for libintl.
LIBINTL=
LTLIBINTL=
INCINTL=
fi
ifelse(gt_included_intl, yes, [
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
dnl GNU gettext is not found in the C library.
dnl Fall back on included GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi
CATOBJEXT=
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions to use GNU gettext tools.
CATOBJEXT=.gmo
fi
])
if test -n "$INTL_MACOSX_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Some extra flags are needed during linking.
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
fi
fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1,
[Define to 1 if translation of program messages to the user's native language
is requested.])
else
USE_NLS=no
fi
fi
AC_MSG_CHECKING([whether to use NLS])
AC_MSG_RESULT([$USE_NLS])
if test "$USE_NLS" = "yes"; then
AC_MSG_CHECKING([where the gettext function comes from])
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
gt_source="external libintl"
else
gt_source="libc"
fi
else
gt_source="included intl directory"
fi
AC_MSG_RESULT([$gt_source])
fi
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
AC_MSG_CHECKING([how to link with libintl])
AC_MSG_RESULT([$LIBINTL])
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
fi
dnl For backward compatibility. Some packages may be using this.
AC_DEFINE(HAVE_GETTEXT, 1,
[Define if the GNU gettext() function is already present or preinstalled.])
AC_DEFINE(HAVE_DCGETTEXT, 1,
[Define if the GNU dcgettext() function is already present or preinstalled.])
fi
dnl We need to process the po/ directory.
POSUB=po
fi
ifelse(gt_included_intl, yes, [
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
dnl to 'yes' because some of the testsuite requires it.
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
BUILD_INCLUDED_LIBINTL=yes
fi
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo
AC_SUBST(INSTOBJEXT)
dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat
AC_SUBST(GENCAT)
dnl For backward compatibility. Some Makefiles may be using this.
INTLOBJS=
if test "$USE_INCLUDED_LIBINTL" = yes; then
INTLOBJS="\$(GETTOBJS)"
fi
AC_SUBST(INTLOBJS)
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
])
dnl For backward compatibility. Some Makefiles may be using this.
INTLLIBS="$LIBINTL"
AC_SUBST(INTLLIBS)
dnl Make all documented variables known to autoconf.
AC_SUBST(LIBINTL)
AC_SUBST(LTLIBINTL)
AC_SUBST(POSUB)
])
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
AC_DEFUN([AM_INTL_SUBDIR],
[
AC_REQUIRE([AC_PROG_INSTALL])dnl
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([gt_GLIBC2])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([bh_C_SIGNED])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
AC_REQUIRE([gt_TYPE_WINT_T])dnl
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
AC_REQUIRE([gt_TYPE_INTMAX_T])
AC_REQUIRE([gt_PRINTF_POSIX])
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([gl_GLIBC21])dnl
AC_REQUIRE([gt_INTDIV0])dnl
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
AC_REQUIRE([gt_INTTYPES_PRI])dnl
AC_REQUIRE([gl_XSIZE])dnl
AC_REQUIRE([gt_INTL_MACOSX])dnl
AC_CHECK_TYPE([ptrdiff_t], ,
[AC_DEFINE([ptrdiff_t], [long],
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
])
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
__fsetlocking])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
dnl Use the *_unlocked functions only if they are declared.
dnl (because some of them were defined without being declared in Solaris
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
dnl on Solaris 2.5.1 to run on Solaris 2.6).
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
case $gt_cv_func_printf_posix in
*yes) HAVE_POSIX_PRINTF=1 ;;
*) HAVE_POSIX_PRINTF=0 ;;
esac
AC_SUBST([HAVE_POSIX_PRINTF])
if test "$ac_cv_func_asprintf" = yes; then
HAVE_ASPRINTF=1
else
HAVE_ASPRINTF=0
fi
AC_SUBST([HAVE_ASPRINTF])
if test "$ac_cv_func_snprintf" = yes; then
HAVE_SNPRINTF=1
else
HAVE_SNPRINTF=0
fi
AC_SUBST([HAVE_SNPRINTF])
if test "$ac_cv_func_wprintf" = yes; then
HAVE_WPRINTF=1
else
HAVE_WPRINTF=0
fi
AC_SUBST([HAVE_WPRINTF])
AM_ICONV
AM_LANGINFO_CODESET
if test $ac_cv_header_locale_h = yes; then
gt_LC_MESSAGES
fi
if test -n "$INTL_MACOSX_LIBS"; then
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
fi
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
dnl because plural.y uses bison specific features. It requires at least
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
dnl compile.
dnl bison is only needed for the maintainer (who touches plural.y). But in
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
dnl the rule in general Makefile. Now, some people carelessly touch the
dnl files or have a broken "make" program, hence the plural.c rule will
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
dnl present or too old.
AC_CHECK_PROGS([INTLBISON], [bison])
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
dnl Found it, now check the version.
AC_MSG_CHECKING([version of bison])
changequote(<<,>>)dnl
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
changequote([,])dnl
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
AC_MSG_RESULT([$ac_prog_version])
fi
if test $ac_verc_fail = yes; then
INTLBISON=:
fi
])
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
[gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
gt_save_LIBS="$LIBS"
LIBS="$LIBS -framework CoreFoundation"
AC_TRY_LINK([#include <CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
[gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
gt_save_LIBS="$LIBS"
LIBS="$LIBS -framework CoreFoundation"
AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])
dnl gt_CHECK_DECL(FUNC, INCLUDES)
dnl Check whether a function is declared.
AC_DEFUN([gt_CHECK_DECL],
[
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
[AC_TRY_COMPILE([$2], [
#ifndef $1
char *p = (char *) $1;
#endif
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
if test $ac_cv_have_decl_$1 = yes; then
gt_value=1
else
gt_value=0
fi
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
])
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])

30
gramps2/m4/glibc21.m4 Normal file
View File

@ -0,0 +1,30 @@
# glibc21.m4 serial 3
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.
AC_DEFUN([gl_GLIBC21],
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
ac_cv_gnu_library_2_1,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2_1=yes,
ac_cv_gnu_library_2_1=no)
]
)
AC_SUBST(GLIBC21)
GLIBC21="$ac_cv_gnu_library_2_1"
]
)

101
gramps2/m4/iconv.m4 Normal file
View File

@ -0,0 +1,101 @@
# iconv.m4 serial AM4 (gettext-0.11.3)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
[
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
AC_LIB_LINKFLAGS_BODY([iconv])
])
AC_DEFUN([AM_ICONV_LINK],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([$LIBICONV])
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
AC_SUBST(LIBICONV)
AC_SUBST(LTLIBICONV)
])
AC_DEFUN([AM_ICONV],
[
AM_ICONV_LINK
if test "$am_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]am_cv_proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
])

24
gramps2/m4/isc-posix.m4 Normal file
View File

@ -0,0 +1,24 @@
# isc-posix.m4 serial 2 (gettext-0.11.2)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN([AC_ISC_POSIX],
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)

30
gramps2/m4/lcmessage.m4 Normal file
View File

@ -0,0 +1,30 @@
# lcmessage.m4 serial 4 (gettext-0.14.2)
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
# Check whether LC_MESSAGES is available in <locale.h>.
AC_DEFUN([gt_LC_MESSAGES],
[
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
if test $gt_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
])

92
gramps2/m4/progtest.m4 Normal file
View File

@ -0,0 +1,92 @@
# progtest.m4 serial 4 (gettext-0.14.2)
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
AC_PREREQ(2.50)
# Search path for a program which passes the given test.
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
[
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
[[\\/]]* | ?:[[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in ifelse([$5], , $PATH, [$5]); do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])

158
gramps2/mkinstalldirs Executable file
View File

@ -0,0 +1,158 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

4
gramps2/po/ChangeLog Normal file
View File

@ -0,0 +1,4 @@
2006-03-15 Alex Roitman <shura@gramps-project.org>
* *.po: Moved po files from old po directory.

244
gramps2/po/Makefile.in.in Normal file
View File

@ -0,0 +1,244 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
localedir = $(libdir)/locale
gnulocaledir = $(datadir)/locale
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
$(POFILES) $(SOURCES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
$(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "glib"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
fi
check: all $(GETTEXT_PACKAGE).pot
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -fr *.o
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in ../config.status POTFILES.in
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

306
gramps2/po/POTFILES.in Normal file
View File

@ -0,0 +1,306 @@
# List of source files which contain translatable strings.
[encoding: UTF-8]
src/AddMedia.py
src/ansel_utf8.py
src/ArgHandler.py
src/Assistant.py
src/AutoComp.py
src/BaseDoc.py
src/Bookmarks.py
src/ColumnOrder.py
src/const.py
src/DateEdit.py
src/Date.py
src/DdTargets.py
src/DisplayModels.py
src/DisplayState.py
src/DisplayTabs.py
src/Errors.py
src/Exporter.py
src/FontScale.py
src/GenericFilter.py
src/GrampsCfg.py
src/GrampsDisplay.py
src/GrampsLocale.py
src/gramps_main.py
src/gramps.py
src/GrampsWidgets.py
src/ImgManip.py
src/ListModel.py
src/MergeData.py
src/MergePeople.py
src/NameDisplay.py
src/Navigation.py
src/PageView.py
src/PeopleModel.py
src/QuestionDialog.py
src/RecentFiles.py
src/Relationship.py
src/RelImage.py
src/ScratchPad.py
src/SelectEvent.py
src/SelectObject.py
src/SelectPerson.py
src/Sort.py
src/soundex.py
src/Spell.py
src/StartupDialog.py
src/SubstKeywords.py
src/TipOfDay.py
src/ToolTips.py
src/TransUtils.py
src/TreeTips.py
src/Utils.py
src/ViewManager.py
src/Config/_GrampsGconfKeys.py
src/Config/_GrampsIniKeys.py
src/Config/__init__.py
src/DataViews/_EventView.py
src/DataViews/_FamilyList.py
src/DataViews/_FamilyView.py
src/DataViews/__init__.py
src/DataViews/_MapView.py
src/DataViews/_MediaView.py
src/DataViews/_PedigreeView.py
src/DataViews/_PersonView.py
src/DataViews/_PlaceView.py
src/DataViews/_RepositoryView.py
src/DataViews/_SourceView.py
src/DateHandler/_Date_de.py
src/DateHandler/_DateDisplay.py
src/DateHandler/_Date_es.py
src/DateHandler/_Date_fi.py
src/DateHandler/_Date_fr.py
src/DateHandler/_DateHandler.py
src/DateHandler/_Date_lt.py
src/DateHandler/_Date_nl.py
src/DateHandler/_DateParser.py
src/DateHandler/_Date_ru.py
src/DateHandler/_Date_sv.py
src/DateHandler/__init__.py
src/docgen/AbiWord2Doc.py
src/docgen/AsciiDoc.py
src/docgen/HtmlDoc.py
src/docgen/KwordDoc.py
src/docgen/LaTeXDoc.py
src/docgen/LPRDoc.py
src/docgen/ODFDoc.py
src/docgen/OpenOfficeDoc.py
src/docgen/OpenSpreadSheet.py
src/docgen/PdfDoc.py
src/docgen/PSDrawDoc.py
src/docgen/RTFDoc.py
src/docgen/SpreadSheetDoc.py
src/docgen/SvgDrawDoc.py
src/Editors/_EditAddress.py
src/Editors/_EditAttribute.py
src/Editors/_EditEvent.py
src/Editors/_EditEventRef.py
src/Editors/_EditFamily.py
src/Editors/_EditLocation.py
src/Editors/_EditMedia.py
src/Editors/_EditMediaRef.py
src/Editors/_EditName.py
src/Editors/_EditPerson.py
src/Editors/_EditPlace.py
src/Editors/_EditPrimary.py
src/Editors/_EditReference.py
src/Editors/_EditRepository.py
src/Editors/_EditSecondary.py
src/Editors/_EditSource.py
src/Editors/_EditSourceRef.py
src/Editors/_EditUrl.py
src/Editors/__init__.py
src/GrampsDb/_ConstXML.py
src/GrampsDb/_GedcomInfo.py
src/GrampsDb/_GedTokens.py
src/GrampsDb/_GrampsBSDDB.py
src/GrampsDb/_GrampsDbBase.py
src/GrampsDb/_GrampsDBCallback.py
src/GrampsDb/_GrampsDbExceptions.py
src/GrampsDb/_GrampsDbFactories.py
src/GrampsDb/_GrampsGEDDB.py
src/GrampsDb/_GrampsInMemDB.py
src/GrampsDb/_GrampsXMLDB.py
src/GrampsDb/__init__.py
src/GrampsDb/_ReadGedcom.py
src/GrampsDb/_ReadGrdb.py
src/GrampsDb/_ReadXML.py
src/GrampsDb/_WriteGedcom.py
src/GrampsDb/_WriteGrdb.py
src/GrampsDb/_WriteXML.py
src/GrampsLogger/_ErrorReportAssistant.py
src/GrampsLogger/_ErrorView.py
src/GrampsLogger/_GtkHandler.py
src/GrampsLogger/__init__.py
src/GrampsLogger/_RotateHandler.py
src/Mime/_GnomeMime.py
src/Mime/__init__.py
src/Mime/_PythonMime.py
src/Models/_FastFilterModel.py
src/Models/_FastModel.py
src/Models/__init__.py
src/Models/_ListCursor.py
src/Models/_PathCursor.py
src/Models/_PersonFilterModel.py
src/Models/_PersonListModel.py
src/Models/_PersonTreeModel.py
src/ObjectSelector/_Constants.py
src/ObjectSelector/_Factories.py
src/ObjectSelector/_FamilyFilterFrame.py
src/ObjectSelector/_FamilyFrame.py
src/ObjectSelector/_FamilyPreviewFrame.py
src/ObjectSelector/_FamilyTreeFrame.py
src/ObjectSelector/_FilterFrameBase.py
src/ObjectSelector/_FilterSpecBase.py
src/ObjectSelector/__init__.py
src/ObjectSelector/_ObjectFrameBase.py
src/ObjectSelector/_ObjectSelectorWindow.py
src/ObjectSelector/_PersonFilterFrame.py
src/ObjectSelector/_PersonFilterSpec.py
src/ObjectSelector/_PersonFrame.py
src/ObjectSelector/_PersonPreviewFrame.py
src/ObjectSelector/_PersonTreeFrame.py
src/ObjectSelector/_PreviewFrameBase.py
src/ObjectSelector/_TreeFrameBase.py
src/plugins/AncestorChart2.py
src/plugins/AncestorChart.py
src/plugins/AncestorReport.py
src/plugins/Ancestors.py
src/plugins/BookReport.py
src/plugins/Calendar.py
src/plugins/ChangeNames.py
src/plugins/ChangeTypes.py
src/plugins/Checkpoint.py
src/plugins/Check.py
src/plugins/CountAncestors.py
src/plugins/CustomBookText.py
src/plugins/Desbrowser.py
src/plugins/DescendChart.py
src/plugins/DescendReport.py
src/plugins/DesGraph.py
src/plugins/DetAncestralReport.py
src/plugins/DetDescendantReport.py
src/plugins/Eval.py
src/plugins/EventCmp.py
src/plugins/ExportVCalendar.py
src/plugins/ExportVCard.py
src/plugins/FamilyGroup.py
src/plugins/FanChart.py
src/plugins/FilterEditor.py
src/plugins/FtmStyleAncestors.py
src/plugins/FtmStyleDescendants.py
src/plugins/GraphViz.py
src/plugins/ImportGeneWeb.py
src/plugins/ImportvCard.py
src/plugins/IndivComplete.py
src/plugins/IndivSummary.py
src/plugins/Leak.py
src/plugins/Merge.py
src/plugins/NavWebPage.py
src/plugins/PatchNames.py
src/plugins/ReadPkg.py
src/plugins/Rebuild.py
src/plugins/RelCalc.py
src/plugins/rel_da.py
src/plugins/rel_de.py
src/plugins/rel_es.py
src/plugins/rel_fi.py
src/plugins/rel_fr.py
src/plugins/rel_hu.py
src/plugins/rel_it.py
src/plugins/rel_no.py
src/plugins/rel_ru.py
src/plugins/rel_sv.py
src/plugins/ReorderIds.py
src/plugins/SimpleBookTitle.py
src/plugins/SoundGen.py
src/plugins/StatisticsChart.py
src/plugins/Summary.py
src/plugins/TimeLine.py
src/plugins/Verify.py
src/plugins/WriteCD.py
src/plugins/WriteFtree.py
src/plugins/WriteGeneWeb.py
src/plugins/WritePkg.py
src/PluginUtils/__init__.py
src/PluginUtils/_Options.py
src/PluginUtils/_PaperMenu.py
src/PluginUtils/_PluginMgr.py
src/PluginUtils/_Plugins.py
src/PluginUtils/_ReportOptions.py
src/PluginUtils/_Report.py
src/PluginUtils/_ReportUtils.py
src/PluginUtils/_StyleEditor.py
src/PluginUtils/_Tool.py
src/RelLib/_AddressBase.py
src/RelLib/_Address.py
src/RelLib/_AttributeBase.py
src/RelLib/_Attribute.py
src/RelLib/_BaseObject.py
src/RelLib/_CalSdn.py
src/RelLib/_DateBase.py
src/RelLib/_Date.py
src/RelLib/_Event.py
src/RelLib/_EventRef.py
src/RelLib/_Family.py
src/RelLib/_GenderStats.py
src/RelLib/__init__.py
src/RelLib/_LdsOrd.py
src/RelLib/_LocationBase.py
src/RelLib/_Location.py
src/RelLib/_MediaBase.py
src/RelLib/_MediaObject.py
src/RelLib/_MediaRef.py
src/RelLib/_Name.py
src/RelLib/_NoteBase.py
src/RelLib/_Note.py
src/RelLib/_Person.py
src/RelLib/_PlaceBase.py
src/RelLib/_Place.py
src/RelLib/_PrimaryObject.py
src/RelLib/_PrivacyBase.py
src/RelLib/_PrivateSourceNote.py
src/RelLib/_RepoRef.py
src/RelLib/_Repository.py
src/RelLib/_Researcher.py
src/RelLib/_SourceNote.py
src/RelLib/_Source.py
src/RelLib/_SourceRef.py
src/RelLib/_UrlBase.py
src/RelLib/_Url.py
src/RelLib/_Witness.py
src/TreeViews/__init__.py
src/TreeViews/_PersonTreeView.py
src/glade/edit_person.glade
src/glade/gramps.glade
src/glade/mergedata.glade
src/glade/plugins.glade
src/glade/rule.glade
src/glade/scratchpad.glade
src/plugins/book.glade
src/plugins/cdexport.glade
src/plugins/changenames.glade
src/plugins/changetype.glade
src/plugins/checkpoint.glade
src/plugins/desbrowse.glade
src/plugins/eval.glade
src/plugins/eventcmp.glade
src/plugins/genewebexport.glade
src/plugins/leak.glade
src/plugins/merge.glade
src/plugins/patchnames.glade
src/plugins/relcalc.glade
src/plugins/soundex.glade
src/plugins/summary.glade
src/plugins/vcalendarexport.glade
src/plugins/vcardexport.glade
src/plugins/verify.glade
src/plugins/writeftree.glade
src/data/tips.xml
# files added by intltool-prepare
src/data/gramps.desktop.in
src/data/gramps.keys.in
src/data/gramps.xml.in
src/data/gramps.schemas.in
src/data/tips.xml.in

8587
gramps2/po/cs.po Normal file

File diff suppressed because it is too large Load Diff

9936
gramps2/po/da.po Normal file

File diff suppressed because it is too large Load Diff

10501
gramps2/po/de.po Normal file

File diff suppressed because it is too large Load Diff

6427
gramps2/po/eo.po Normal file

File diff suppressed because it is too large Load Diff

7973
gramps2/po/es.po Normal file

File diff suppressed because it is too large Load Diff

9830
gramps2/po/fi.po Normal file

File diff suppressed because it is too large Load Diff

9981
gramps2/po/fr.po Normal file

File diff suppressed because it is too large Load Diff

6331
gramps2/po/hu.po Normal file

File diff suppressed because it is too large Load Diff

6332
gramps2/po/it.po Normal file

File diff suppressed because it is too large Load Diff

10332
gramps2/po/lt.po Normal file

File diff suppressed because it is too large Load Diff

10149
gramps2/po/nb.po Normal file

File diff suppressed because it is too large Load Diff

10769
gramps2/po/nl.po Normal file

File diff suppressed because it is too large Load Diff

10149
gramps2/po/no.po Normal file

File diff suppressed because it is too large Load Diff

1770
gramps2/po/pl.po Normal file

File diff suppressed because it is too large Load Diff

9968
gramps2/po/pt_BR.po Normal file

File diff suppressed because it is too large Load Diff

4028
gramps2/po/ro.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9694
gramps2/po/sv.po Normal file

File diff suppressed because it is too large Load Diff

1213
gramps2/po/zh_CN.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
#!/bin/sh
# py-compile - Compile a Python program
# Copyright 2000, 2001 Free Software Foundation, Inc.
scriptversion=2005-05-14.22
# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -15,70 +17,130 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# called as "py-compile [--basedir DIR] PY_FILES ...
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# GRAMPS-SPECIFIC COMMENTS:
# This is a modified version of the py-compile script distributed with
# GNU automake 1.6. The only difference is that this file has had the
# normal byte-compiling section removed since Gramps only uses optimized
# versions of byte-compiled code.
if [ -z "$PYTHON" ]; then
PYTHON=python
fi
basedir=
case "$1" in
destdir=
files=
while test $# -ne 0; do
case "$1" in
--basedir)
basedir=$2
shift 2
;;
--help)
echo "Usage: py-compile [--basedir DIR] PY_FILES ..."
echo "Byte compile some python scripts. This should be performed"
echo "after they have been moved to the final installation location"
exit 0
;;
--version)
echo "py-compile version 0.0"
exit 0
;;
esac
basedir=$2
if test -z "$basedir"; then
echo "$0: Missing argument to --basedir." 1>&2
exit 1
fi
shift
;;
--destdir)
destdir=$2
if test -z "$destdir"; then
echo "$0: Missing argument to --destdir." 1>&2
exit 1
fi
shift
;;
-h|--h*)
cat <<\EOF
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
if [ $# = 0 ]; then
echo "No files given to $0" 1>&2
Byte compile some python scripts FILES. Use --destdir to specify any
leading directory path to the FILES that you don't want to include in the
byte compiled file. Specify --basedir for any additional path information you
do want to be shown in the byte compiled file.
Example:
py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v|--v*)
echo "py-compile $scriptversion"
exit $?
;;
*)
files="$files $1"
;;
esac
shift
done
if test -z "$files"; then
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
exit 1
fi
# if basedir was given, then it should be prepended to filenames before
# byte compilation.
if [ -z "$basedir" ]; then
trans="path = file"
pathtrans="path = file"
else
trans="path = os.path.join('$basedir', file)"
pathtrans="path = os.path.join('$basedir', file)"
fi
# if destdir was given, then it needs to be prepended to the filename to
# byte compile but not go into the compiled file.
if [ -z "$destdir" ]; then
filetrans="filepath = path"
else
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
fi
$PYTHON -c "
import sys, os, string, py_compile
files = '''$files'''
print 'Byte-compiling python modules...'
for file in string.split(files):
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
print file,
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
print" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
import sys, os, string, py_compile
files = '''$*'''
print 'Byte-compiling python modules (optimised versions) ...'
files = '''$files'''
print 'Byte-compiling python modules (optimized versions) ...'
for file in string.split(files):
$trans
if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
print file,
sys.stdout.flush()
py_compile.compile(path)
py_compile.compile(filepath, filepath + 'o', path)
print" 2>/dev/null || :
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -266,7 +266,7 @@ class GrampsBSDDB(GrampsDbBase):
callback(12)
self.env = db.DBEnv()
self.env.set_cachesize(0,0x2000000) # 2MB
self.env.set_cachesize(0,0x2000000) # 16MB
self.env.set_lk_max_locks(25000)
self.env.set_lk_max_objects(25000)
self.env.set_flags(db.DB_LOG_AUTOREMOVE,1) # clean up unused logs
@ -1140,7 +1140,7 @@ class GrampsBSDDB(GrampsDbBase):
"Sponsored", "Foster", "Unknown", "Other", ]
version = self.metadata.get('version',_MINVERSION)
t = time.time()
if version < 6:
self.gramps_upgrade_6()
if version < 7:
@ -1151,6 +1151,7 @@ class GrampsBSDDB(GrampsDbBase):
self.gramps_upgrade_9()
# self.metadata.put('version',_DBVERSION)
# self.metadata.sync()
print "Upgrade time:", int(time.time()-t), "seconds"
def gramps_upgrade_6(self):
print "Upgrading to DB version 6"

View File

@ -18,8 +18,7 @@ SUBDIRS = \
glade \
docgen \
images \
plugins \
po
plugins
# For intl. support, how do we compile?
MOSTLYCLEANFILES =
@ -73,7 +72,6 @@ gdir_PYTHON = \
NameDisplay.py\
Navigation.py\
PageView.py\
PaperMenu.py\
PeopleModel.py\
QuestionDialog.py\
RecentFiles.py\
@ -86,9 +84,7 @@ gdir_PYTHON = \
Sort.py\
soundex.py\
Spell.py\
SpreadSheetDoc.py\
StartupDialog.py\
StyleEditor.py\
SubstKeywords.py\
TipOfDay.py\
ToolTips.py\
@ -97,19 +93,6 @@ gdir_PYTHON = \
Utils.py\
ViewManager.py
# Could use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all files individually
# The latter is more portable and POSIX-friendly :)
# In principle the following rule slightly violates the automake/autoconf
# spirit of keeping each subdirectory as a separate entity unto itself.
# But, since the template depends on everything from here, we allow this
# one exception.
# Build po/template.po.
.PHONY: trans
trans:
./build_po
pycheck:
for d in $(SUBDIRS) ; do \
(cd $$d; make pycheck); \

View File

@ -12,7 +12,9 @@ pkgdata_PYTHON = \
_Report.py\
_ReportUtils.py\
_Tool.py\
_StyleEditor.py\
_PluginMgr.py\
_PaperMenu.py\
_Plugins.py
pkgpyexecdir = @pkgpyexecdir@/PluginUtils

View File

@ -1,8 +0,0 @@
#! /bin/sh
if [ -f po/template.po ]
then
mv po/template.po po/template.po.bak
fi
./get_strings -o po/template.po *.py */*.py *.glade */*.glade data/tips.xml

View File

@ -18,20 +18,6 @@ dist_pkgdata_DATA = \
main6.css\
document.png
EXTRA_DIST = \
gramps.desktop \
gnome-mime-application-x-gramps.png \
gnome-mime-application-x-gedcom.png \
gnome-mime-application-x-gramps-package.png \
gnome-mime-application-x-gramps-xml.png \
gnome-mime-application-x-geneweb.png \
gramps.svg \
gramps.xml \
gramps.applications \
gramps.keys \
gramps.mime \
gramps.schemas
# Conditionally enable/disable gconf schemas or mime types,
# or disable both in a packager mode
GCONF_SCHEMAS_INSTALLATION =
@ -58,30 +44,68 @@ SHARED_MIME_UNINSTALLATION += \
endif
endif
install-data-local:
$(INSTALL) -d $(DESTDIR)$(prefix)/share/applications
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.desktop $(DESTDIR)$(prefix)/share/applications
$(INSTALL) -d $(DESTDIR)$(prefix)/share/icons/gnome/48x48/mimetypes/
$(INSTALL_DATA) $(top_srcdir)/src/data/gnome-mime-application-x-*.png $(DESTDIR)$(prefix)/share/icons/gnome/48x48/mimetypes/
$(INSTALL) -d $(DESTDIR)$(prefix)/share/application-registry
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.applications $(DESTDIR)$(prefix)/share/application-registry
$(INSTALL) -d $(DESTDIR)$(prefix)/share/mime-info
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.keys $(DESTDIR)$(prefix)/share/mime-info
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.mime $(DESTDIR)$(prefix)/share/mime-info
$(INSTALL) -d $(DESTDIR)$(SHARED_MIME_DIR)/packages
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.xml $(DESTDIR)$(SHARED_MIME_DIR)/packages
$(INSTALL) -d $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR)
$(INSTALL_DATA) $(top_srcdir)/src/data/gramps.schemas $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR)
# Rules for files with translatable strings
# These are taken care of by the intltool
desktopdir = $(datadir)/applications
desktop_in_files = gramps.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
keys_in_files = gramps.keys.in
keys_files = $(keys_in_files:.keys.in=.keys)
@INTLTOOL_KEYS_RULE@
xml_in_files = gramps.xml.in tips.xml.in
xml_files = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_files = gramps.schemas.in
schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
applicationsdir = $(datadir)/application-registry
applications_DATA = gramps.applications
mimedir = $(datadir)/mime-info
mime_DATA = $(keys_files) gramps.mime
xmldir = $(SHARED_MIME_DIR)/packages
xml_DATA = $(xml_files)
pngdir = $(datadir)/icons/gnome/48x48/mimetypes
png_DATA = \
gnome-mime-application-x-gramps.png \
gnome-mime-application-x-gedcom.png \
gnome-mime-application-x-gramps-package.png \
gnome-mime-application-x-gramps-xml.png \
gnome-mime-application-x-geneweb.png
EXTRA_DIST = \
$(png_DATA) \
gramps.svg \
$(applications_DATA) \
$(keys_in_files) \
$(desktop_in_files) \
$(schemas_in_files) \
$(mime_DATA) \
$(xml_DATA) \
$(desktop_DATA) \
$(schemas_DATA) \
$(xml_in_files)
CLEANFILES = \
$(desktop_DATA) \
$(keys_files) \
$(xml_files) \
$(schemas_DATA)
install-data-hook:
$(SHARED_MIME_INSTALLATION)
$(GCONF_SCHEMAS_INSTALLATION)
uninstall-local:
-rm $(DESTDIR)$(prefix)/share/applications/gramps.desktop
-rm $(DESTDIR)$(prefix)/share/icons/gnome/48x48/mimetypes/gnome-mime-application-x-*.png
-rm $(DESTDIR)$(prefix)/share/mime-info/gramps.keys
-rm $(DESTDIR)$(prefix)/share/mime-info/gramps.mime
-rm $(DESTDIR)$(prefix)/share/application-registry/gramps.applications
$(GCONF_SCHEMAS_UNINSTALLATION)
-rm $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR)/gramps.schemas
-rm $(DESTDIR)$(SHARED_MIME_DIR)/packages/gramps.xml
uninstall-hook:
$(SHARED_MIME_UNINSTALLATION)

View File

@ -1,30 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=GRAMPS Genealogy System
Name[sv]=GRAMPS
Name[no]=GRAMPS
Name[nb]=GRAMPS
Name[ru]=Генеалогические исследования в GRAMPS
Name[de]=GRAMPS
Name[hu]=GRAMPS
Name[nl]=GRAMPS genealogie
Name[fi]=GRAMPS sukututkimusohjelma
Name[fr]=GRAMPS
Comment=Manage genealogical information, perform genealogical research and analysis
Comment[nl]=Een programma voor genealogie infomatie beheer en genealogisch onderzoek en analyse
Comment[sv]=Ett släktforskningsprogram
Comment[no]=Et slektsforskningsprogram
Comment[nb]=Et slektsforskningsprogram
Comment[ru]=Система исследования и анализа генеалогической информации
Comment[de]=Ein Programm zur Ahnenforschung
Comment[hu]=Örökléskutató és elemző program
Comment[fi]=Hallinnoi, tutki ja analysoi sukutietoa
Comment[fr]=Gestion des informations genealogiques, optimisation de la recherche et de l'analyse
Icon=gramps.png
Terminal=false
Type=Application
StartupNotify=true
Categories=Application;Genealogy;Office;
X-GNOME-DocPath=gramps/gramps-manual.xml
MimeType=application/x-gramps
Exec=gramps %F

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
_Name=GRAMPS Genealogy System
_Comment=Manage genealogical information, perform genealogical research and analysis
Icon=gramps.png
Terminal=false
Type=Application
StartupNotify=true
Categories=Application;Genealogy;Office;
X-GNOME-DocPath=gramps/gramps-manual.xml
MimeType=application/x-gramps
Exec=gramps %F

View File

@ -1,5 +1,5 @@
application/x-gramps:
description=GRAMPS database
_description=GRAMPS database
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
@ -10,7 +10,7 @@ application/x-gramps:
open=gramps %f
application/x-gramps-package:
description=GRAMPS package
_description=GRAMPS package
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
@ -21,7 +21,7 @@ application/x-gramps-package:
open=gramps %f
application/x-gramps-xml:
description=GRAMPS XML database
_description=GRAMPS XML database
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
@ -32,7 +32,7 @@ application/x-gramps-xml:
open=gramps %f
application/x-gedcom:
description=GEDCOM
_description=GEDCOM
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps
@ -43,7 +43,7 @@ application/x-gedcom:
open=gramps %f
application/x-geneweb:
description=GeneWeb
_description=GeneWeb
default_action_type=application
short_list_application_ids=gramps
short_list_application_ids_for_novice_user_level=gramps

View File

@ -4,11 +4,11 @@
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-gramps">
<comment xml:lang="en">GRAMPS database</comment>
<_comment>GRAMPS database</_comment>
<glob pattern="*.grdb"/>
</mime-type>
<mime-type type="application/x-gedcom">
<comment xml:lang="en">GEDCOM</comment>
<_comment>GEDCOM</_comment>
<glob pattern="*.ged"/>
<glob pattern="*.gedcom"/>
<glob pattern="*.GED"/>
@ -18,11 +18,11 @@
</magic>
</mime-type>
<mime-type type="application/x-gramps-package">
<comment xml:lang="en">GRAMPS package</comment>
<_comment>GRAMPS package</_comment>
<glob pattern="*.gpkg"/>
</mime-type>
<mime-type type="application/x-gramps-xml">
<comment xml:lang="en">GRAMPS XML database</comment>
<_comment>GRAMPS XML database</_comment>
<glob pattern="*.gramps"/>
<magic priority="80">
<match type="string" value="&lt;!DOCTYPE database" offset="0:256"/>
@ -30,7 +30,7 @@
</magic>
</mime-type>
<mime-type type="application/x-geneweb">
<comment xml:lang="en">GeneWeb source file</comment>
<_comment>GeneWeb source file</_comment>
<glob pattern="*.gw"/>
<glob pattern="*.GW"/>
<magic priority="80">

View File

@ -4,26 +4,26 @@
<tips>
<tip>A range of dates can be given by using the format
<_tip number="1">A range of dates can be given by using the format
&quot;between January 4, 2000 and March 20, 2003&quot;
</tip>
</_tip>
<tip>
<_tip number="2">
In most cases double clicking on a name, source, place or media entry
will bring up a window to allow you to edit the object. Note that the
result can be dependent on context. For example, in the Family View
clicking on a parent or child will bring up the relationship editor.
</tip>
</_tip>
<tip>An image can be added to any gallery or the Media View by dragging and
<_tip number="3">An image can be added to any gallery or the Media View by dragging and
dropping it from a file manager or a web browser.
</tip>
</_tip>
<tip>Birth order of children in a family can be set, even if they do not
<_tip number="4">Birth order of children in a family can be set, even if they do not
have birth dates, by using drag and drop.
</tip>
</_tip>
<tip>
<_tip number="5">
<b>Talk to Relatives Before It Is Too Late</b>:
Your oldest relatives can be your most important source of information.
They usually know things about the family that haven't been written down.
@ -31,17 +31,17 @@ They might tell you nuggets about
people that may one day lead to a new avenue of research.
At the very least, you will get to hear some great stories.
Don't forget to record the conversations!
</tip>
</_tip>
<tip>
<_tip number="6">
<b>Example of a Family Tree</b>: To see an example of what a family
looks like in GRAMPS, check <b>Help &gt; Open example database</b>.
You will then be viewing the elaborate Smith family database, which
includes 42 individuals and 15 families, with fairly complete
data about many of the individuals.
</tip>
</_tip>
<tip>
<_tip number="7">
<b>Filtering People</b>: In the People View, you can 'filter' individuals
based on many criteria. Go to the Filter (just to the right of the People
icon) and choose one of the dozen different presets. For example, all
@ -49,27 +49,27 @@ adopted people in the family tree can be located. People without a birth
date mentioned can also be filtered. To get the results click Apply.
If the filter controls are not visible, enable them by choosing
<b>View &gt; Filter</b>.
</tip>
</_tip>
<tip>
<_tip number="8">
<b>Inverted Filtering</b>:
Filters can easily be reversed by using the 'invert' option.
For instance, by inverting the 'People with children' filter you can
select all people without children.
</tip>
</_tip>
<tip>
<_tip number="9">
<b>Locating People</b>: By default, each surname in the People View is
listed only once. By clicking on the arrow to the left of a name, the list
will expand to show all individuals with that last name.
</tip>
</_tip>
<tip>
<_tip number="10">
<b>The Family View</b>: The Family View is used to display a typical
family unit---the parents, spouses and children of an individual.
</tip>
</_tip>
<tip>
<_tip number="11">
<b>Shifting a Family View</b>: Changing the Active Person in
the Family View is easy. A spouse can be made the Active Person by
clicking the button just to the right of the Active Person. A father
@ -77,31 +77,31 @@ can be made the Active Person by clicking on the arrow to the right of
their name. A child can be made the Active Person by selecting them
from the Children list and then clicking the arrow button to the right
of the Children.
</tip>
</_tip>
<tip>
<_tip number="12">
<b>Who Was Born When</b>: The 'Compare individual events' tool allows you to
compare data of all (or some of) the individuals in your database. This is
useful, say, if you wish to list the birth dates of everyone in your
database.
</tip>
</_tip>
<tip>
<_tip number="13">
GRAMPS comes with a rich set of tools. These allows you to undertake
operations such as checking database for errors and consistency, as well as
research and analysis tools such as event comparison, finding duplicate
people, interactive descendant browser, and others.
All tools can be accessed through the <b>Tools</b> menu.
</tip>
</_tip>
<tip>
<_tip number="14">
<b>Calculating Relationships</b>: This tool, under <b>Tools &gt;
Utilities &gt; Relationship calculator</b> allows you to check if someone
else in the family is related (by blood, not marriage) to you. Precise
relationships as well as the common ancestors are reported.
</tip>
</_tip>
<tip>
<_tip number="15">
<b>SoundEx can help with family research</b>:
SoundEx solves a long standing problem in genealogy---how to handle
spelling variations. The SoundEx utility takes a surname and generates
@ -110,80 +110,80 @@ Knowing the SoundEx Code for a surname is very
helpful for researching Census Data files (microfiche) at a library
or other research facility. To get the SoundEx codes for surnames in
your database, go to <b>Tools &gt; Utilities &gt; Generate SoundEx codes</b>.
</tip>
</_tip>
<tip>
<_tip number="16">
<b>Setting Your Preferences</b>: Not happy with some default behavior of GRAMPS?
<b>Edit &gt; Preferences</b> lets you to modify a
number of settings, allowing you to tailor GRAMPS to your needs.
</tip>
</_tip>
<tip>
<_tip number="17">
<b>GRAMPS Reports</b>: GRAMPS offers a wide variety of reports.
The Text Reports are particularly useful if you want to send
the results of your family tree to members of the family via email.
</tip>
</_tip>
<tip>
<_tip number="18">
<b>Starting a New Family Tree</b>: A good way to start a new family tree is
to enter all the members of the family into the database (use <b>Edit
&gt; Add</b> or click on the Add button under the People menu). Then go to
the Family View and create relationships between people.
Then go about tracing the relationships among them all under the Family menu.
</tip>
</_tip>
<tip>
<_tip number="19">
Unsure what a button does? Simply hold the mouse over a button and a tooltip
will appear.
</tip>
</_tip>
<tip>
<_tip number="20">
<b>Unsure of a Date?</b> If you're unsure about the date an event occurred
(for example birth or death), GRAMPS allows you to enter a wide
range of date formats based on a guess or an estimate. For instance,
&quot;about 1908&quot; is a valid entry for a birth date in GRAMPS.
See section 3.7.2.2 of the GRAMPS manual for a complete description of
date entry options.
</tip>
</_tip>
<tip>
<_tip number="21">
<b>Duplicate Entries</b>: <b>Tools &gt; Database Processing &gt; Find
possible duplicate</b> people allows you to located (and merge) entries
of the same person entered more than once in the database.
</tip>
</_tip>
<tip>
<_tip number="22">
The 'merge' function allows you to combine separately listed people into
one. This is very useful for combining two databases with overlapping
people, or combining erroneously entered differing names for one individual.
</tip>
</_tip>
<tip>
<_tip number="23">
To easily merge two people, select them both (a second person can be selected
by holding the Control key while clicking) and clicking on <b>Edit &gt; Fast
Merge</b>.
</tip>
</_tip>
<tip>
<_tip number="24">
GRAMPS maintains a list of previous Active People. You can move forward and
backward through the list using <b>Go &gt; Forward</b> and <b>Go &gt;
Back</b>.
</tip>
</_tip>
<tip>
<_tip number="25">
Tired of having to take your hand off the keyboard to use the mouse?
Many functions in GRAMPS have keyboard shortcuts. If one exists for a
function it is displayed on the right side of the menu.
</tip>
</_tip>
<tip>
<_tip number="26">
Don't forget to read the GRAMPS manual, <b>Help &gt; User Manual</b>.
The developers have worked hard to make most operations intuitive
but the manual is full of information that will make your time spent
on genealogy more productive.
</tip>
</_tip>
<tip>
<_tip number="27">
<b>Adding Children</b>: To add children in GRAMPS make either of the parents
the Active Person then switch to the Family View.
If the child is already in the database, click on the third button down to the
@ -191,51 +191,51 @@ right of the Children list.
If the person is not already in the database, click on the second button down
to the right of the Children list. After the child's information is entered
they will automatically be listed as a child of the Active Person.
</tip>
</_tip>
<tip>
<_tip number="28">
<b>Editing The Relationship of a Child</b>: Not all children are the related by
birth to their parents. You can edit the relationship of a
child to each parent by selecting the child, right-clicking, and choosing
&quot;Edit the child parent relationship&quot;.
Relationships can be any of Birth, Adopted, Stepchild, Sponsored, Foster, or
Unknown.
</tip>
</_tip>
<tip>
<_tip number="29">
<b>Show All Checkbutton</b>: When adding a spouse or child, the
list of people shown is filtered to display only people who could
realistically fit the role (based on dates in the database). In case
GRAMPS is wrong in making this choice, you can override that
filter by checking the &quot;Show All&quot; checkbutton.
</tip>
</_tip>
<tip>
<_tip number="30">
<b>GRAMPS Manual</b>: The GRAMPS manual is quite elaborate and well written.
It includes details on keybindings and includes some useful tips that will
help you in your genealogy work.
Check it out.
</tip>
</_tip>
<tip>
<_tip number="31">
<b>Improving GRAMPS</b>: Users are encouraged to request enhancements to
GRAMPS.
Requesting an enhancement can be done either through the gramps-users or
gramps-devel mailing lists, or by creating a Request for Enhancement (RFE) at
http://sourceforge.net/tracker/?group_id=25770&amp;atid=385140
Filing an RFE is preferred.
</tip>
</_tip>
<tip>
<_tip number="32">
<b>GRAMPS Mailing Lists</b>: Want answers to your queries about GRAMPS?
Check out the gramps-users list.
Many people are on the list, so you're likely to get an answer quickly.
If you have questions related to the development of GRAMPS,
try gramps-devel. Information on both mailing lists can be found at
lists.sf.net.
</tip>
</_tip>
<tip>
<_tip number="33">
<b>Contributing to GRAMPS</b>:
Want to help with GRAMPS but can't program? Not a problem. A project
as large as GRAMPS requires people with a wide variety of skills.
@ -244,41 +244,41 @@ versions to helping with the web site.
Start by subscribing to the gramps developers mailing list, gramps-devel
and introducing yourself.
Subscription information can be found at lists.sf.net.
</tip>
</_tip>
<tip>
<_tip number="34">
GRAMPS is the Genealogical Research and Analysis Management Program System.
It is a full-featured genealogy program letting you store, edit, and
research genealogical data. Gramps database back end is so robust that
some users are managing genealogies containing hundreds of thousands of
people.
</tip>
</_tip>
<tip>
<_tip number="35">
<b>Different Views</b>: There are six different views for navigating your
family:
People, Family, Pedigree, Sources, Places, Media. Each helps you to achieve
one or more specific tasks.
</tip>
</_tip>
<tip>
<_tip number="36">
<b>Bookmarking Individuals</b>:
The Bookmark menu at the top of the window is a convenient place to store
the names of frequently used individuals. Clicking on a bookmarked
individual will make that person the Active Person.
To create a bookmark for a person, make them the Active Person, right click on
their name and click on 'add bookmark'.
</tip>
</_tip>
<tip>
<_tip number="37">
<b>Incorrect Dates</b>: Everyone occasionally enters dates with a nonvalid
format.
Incorrect date formats will show up with the red button next to the
date. Green means okay, and amber signifies acceptable.
The Date Selection dialog can be invoked by clicking on the colored button.
</tip>
</_tip>
<tip>
<_tip number="38">
<b>Listing Events</b>: Events in the life of any individual may be
added to the database via the <b>Person &gt; Edit Person &gt;
Events</b> option. This space can be used to include a wide range
@ -286,9 +286,9 @@ of options ranging from adoptions, to baptisms (and other religious
ceremonies), burials, causes of death, Census listings, degrees
earned, elections, emigration, military service, nobility titles,
occupations, ordination, property, religion, retirement, wills, etc.
</tip>
</_tip>
<tip>
<_tip number="39">
<b>Changing The Preferred Name</b>:
It is easy to manage people with several names in GRAMPS.
Make the person the Active Person,
@ -296,229 +296,230 @@ doubleclick on the record, and select the Names tab. Different
types of names can be added. For example, Married Name, Birth Name, etc.
Selecting a preferred name is just a matter of right-clicking on the name and
choosing the only item in the menu.
</tip>
</_tip>
<tip>
<_tip number="40">
The Pedigree View displays a traditional pedigree chart.
Hold the mouse over an individual to see more information about them or
right click on an individual to view a menu to quickly access their spouses,
siblings, children, or parents.
</tip>
</_tip>
<tip>
<_tip number="41">
The Sources View shows a list of all sources in a single window.
Double-click on each to edit, add notes, and to see which individuals
reference the source.
</tip>
</_tip>
<tip>
<_tip number="42">
The Places View shows a list of all places in the database.
The list can be sorted by a number of different criteria, such as City,
County or State.
</tip>
</_tip>
<tip>
<_tip number="43">
The Media View shows a list of all media entered in the database. These
can be graphic images, videos, sound clips, spreadsheets, documents, and
more.
</tip>
</_tip>
<tip>
<_tip number="44">
Filters allow you to limit the people seen in the People View. In addition
to the many preset filters, Custom Filters
can be created that allow you to create filters limited only by your
imagination.
Custom filters can be created from <b>Tools &gt; Utilities &gt; Custom
Filter Editor</b>.
</tip>
</_tip>
<tip>
<_tip number="45">
GRAMPS allows you to import from, and export to, GEDCOM format. There is
extensive support for the industry standard GEDCOM version 5.5, so you can
exchange GRAMPS information to and from users of most other genealogy
programs.
</tip>
</_tip>
<tip>
<_tip number="46">
You can convert your data into a GRAMPS package, which is a
compressed file containing your family tree data and includes all
other files used by the database, such as images. This file is
completely portable so is useful for backups or sharing with other
GRAMPS users. This format has advantages over GEDCOM in that no
information is ever lost in exporting and importing.
</tip>
</_tip>
<tip>
<_tip number="47">
Make your data portable --- your family tree data and media can be exported
directly to the GNOME file manager (Nautilus), for burning onto a CD.
</tip>
</_tip>
<tip>
<_tip number="48">
GRAMPS can export data to the Web Family Tree (WFT) format. This format
allows a family tree to be displayed online using a single file, instead
of many html files.
</tip>
</_tip>
<tip>
<_tip number="49">
You can easily export your family tree to a web page. Select the entire
database, family lines or selected individuals to a collection of web pages
ready for upload to the World Wide Web.
</tip>
</_tip>
<tip>
<_tip number="50">
The best way to report a bug in GRAMPS is to use the GRAMPS Bug Tracker
at Sourceforge, http://sourceforge.net/tracker/?group_id=25770&amp;atid=385137
</tip>
</_tip>
<tip>
<_tip number="51">
The GRAMPS homepage is at http://gramps-project.org/
</tip>
</_tip>
<tip>
<_tip number="52">
GRAMPS has some unique features, including the ability to input any
piece of information directly into GRAMPS.
All data in the data base can be rearranged/manipulated to assist the
user in doing research, analysis and correlation with the potential of
filling relationship gaps.
</tip>
</_tip>
<tip>
<_tip number="53">
GRAMPS helps you to keep personal information secure by allowing you to
mark information as private. Data marked as private can be excluded from
reports and data exports.
</tip>
</_tip>
<tip>
<_tip number="54">
Be accurate when recording genealogical information. Don't make assumptions
while recording primary information; write it exactly as you see it. Use
bracketed comments to indicate your additions, deletions or comments. Use of
the Latin 'sic' is recommended to confirm the accurate transcription of what
appears to be an error in a source.
</tip>
</_tip>
<tip>
<_tip number="55">
You can link any electronic media (including non-text information) and
other file types to your GRAMPS family tree.
</tip>
</_tip>
<tip>
<_tip number="56">
GRAMPS allows you to generate a number of reports (both text and graphical)
based on your genealogical information. There is great flexibility in
selecting what people are included in the reports as well as the output
format (html, pdf, OpenOffice, RTF, AbiWord, KWord, LaTeX and plain text).
Experiment with the reports under the <b>Reports</b> menu to get an idea
of how powerful GRAMPS is.
</tip>
</_tip>
<tip>
<_tip number="57">
Custom reports can be created by advanced users under the "plugin" system.
More information on custom reports can be found at
http://developers.gramps-project.org
</tip>
</_tip>
<tip>
<_tip number="58">
The Book report, <b>Reports &gt; Books &gt; Book Report</b>, allows users
to collect a variety of reports into a single document. This single report
is easier to distribute than multiple reports, especially when printed.
</tip>
</_tip>
<tip>
<_tip number="59">
Interested in getting notified when a new version of GRAMPS is released?
Join the gramps-announce mailing list at
http://lists.sourceforge.net/lists/listinfo/gramps-announce
</tip>
</_tip>
<tip>
<_tip number="60">
<b>Good genealogy tip</b>: Information collected about your family is only as
good as the source it came from.
Take time and trouble to record all the
details of where the information came from. Whenever possible get a copy of
original documents.
</tip>
</_tip>
<tip>
<_tip number="61">
Go from what you know to what you do not. Always record everything that is
known before making conjecture. Often the facts at hand suggest plenty of
direction for more research. Don't waste time looking through thousands of
records hoping for a trail when you have other unexplored leads.
</tip>
</_tip>
<tip>
<_tip number="62">
Genealogy isn't only about dates and names. It is about people. Be
descriptive. Include the <b>why</b> of how things happened, and how descendants
might have been shaped by the events they went through. Narratives go a long
way in making your family history come alive.
</tip>
</_tip>
<tip>
<_tip number="63">
GRAMPS has been translated to 15 languages. If GRAMPS supports your
language and it is not being displayed, set the default language on
your machine and restart GRAMPS.
</tip>
</_tip>
<tip>
<_tip number="64">
GRAMPS has been designed so that new translations can easily be added with
little development effort. If you are interested in participating please
email gramps-devel@lists.sf.net
</tip>
</_tip>
<tip>
<_tip number="65">
Relationship calculators in GRAMPS are available in ten languages.
</tip>
</_tip>
<tip>
<_tip number="66">
GRAMPS offers full Unicode support. Characters for all languages are
properly displayed.
</tip>
</_tip>
<tip>
<_tip number="67">
Anyone can be chosen as the 'home person' in GRAMPS. Use <b>Edit -> Set Home
Person</b>. The home person is the person who is selected when the database is
opened or when the home button is pressed.
</tip>
</_tip>
<tip>
<_tip number="68">
Multiple names can be specified for individuals. Examples are birth name,
marriage name or aliases.
</tip>
</_tip>
<tip>An alternate name can be selected as a person's preferred name by
<_tip number="69">
An alternate name can be selected as a person's preferred name by
selecting the desired name in the person's name list, bringing up the context
menu by clicking the right mouse button, and selecting from the menu.
</tip>
</_tip>
<tip>
<_tip number="70">
GRAMPS is written in a computer language called Python using the GTK and GNOME
libraries for the graphical interface.
GRAMPS is supported on any computer system where these programs have been
ported.
</tip>
</_tip>
<tip>
<_tip number="71">
The Free/Libre and Open Source Software (FLOSS) development model means
GRAMPS can be extended by any programmer since all of the source code is
freely available under its license.
</tip>
</_tip>
<tip>
<_tip number="72">
GRAMPS is freely distributable under the General Public License, see
http://www.gnu.org/licenses/licenses.html#GPL
</tip>
</_tip>
<tip>
<_tip number="73">
GRAMPS works even when using KDE, as long as the required GNOME libraries are
installed.
</tip>
</_tip>
<tip>
<_tip number="74">
To run GRAMPS, you need to have GNOME installed. But you do not need to be
running the GNOME desktop.
</tip>
</_tip>
<tip>
<_tip number="75">
GRAMPS makes every effort to maintain compatibility with GEDCOM, the general
standard of recording genealogical information. Filters exist that make
importing and exporting GEDCOM files trivial.
</tip>
</_tip>
</tips>

View File

@ -13,6 +13,7 @@ docgen_PYTHON = \
ODFDoc.py\
OpenOfficeDoc.py\
OpenSpreadSheet.py\
SpreadSheetDoc.py\
PdfDoc.py\
PSDrawDoc.py\
RTFDoc.py\

View File

@ -1,632 +0,0 @@
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
#
# Originally written by Barry Warsaw <barry@zope.com>
#
# Minimally patched to make it even more xgettext compatible
# by Peter Funk <pf@artcom-gmbh.de>
#
# Completely butchered to add glade support for the GRAMPS
# project by Don Allingham (dallingham@users.sourceforge.net)
#
# Further bastardized by Alex Roitman to support tips.xml file
# $Id$
"""pygettext -- Python equivalent of xgettext(1)
Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the
internationalization of C programs. Most of these tools are independent of
the programming language and can be used from within Python programs. Martin
von Loewis' work[1] helps considerably in this regard.
There's one problem though; xgettext is the program that scans source code
looking for message strings, but it groks only C (or C++). Python introduces
a few wrinkles, such as dual quoting characters, triple quoted strings, and
raw strings. xgettext understands none of this.
Enter pygettext, which uses Python's standard tokenize module to scan Python
source code, generating .pot files identical to what GNU xgettext[2] generates
for C and C++ code. From there, the standard GNU tools can be used.
A word about marking Python strings as candidates for translation. GNU
xgettext recognizes the following keywords: gettext, dgettext, dcgettext, and
gettext_noop. But those can be a lot of text to include all over your code.
C and C++ have a trick: they use the C preprocessor. Most internationalized C
source includes a #define for gettext() to _() so that what has to be written
in the source is much less. Thus these are both translatable strings:
gettext("Translatable String")
_("Translatable String")
Python of course has no preprocessor so this doesn't work so well. Thus,
pygettext searches only for _() by default, but see the -k/--keyword flag
below for how to augment this.
[1] http://www.python.org/workshops/1997-10/proceedings/loewis.html
[2] http://www.gnu.org/software/gettext/gettext.html
NOTE: pygettext attempts to be option and feature compatible with GNU xgettext
where ever possible. However some options are still missing or are not fully
implemented. Also, xgettext's use of command line switches with option
arguments is broken, and in these cases, pygettext just defines additional
switches.
Usage: pygettext [options] inputfile ...
Options:
-a
--extract-all
Extract all strings.
-d name
--default-domain=name
Rename the default output file from messages.pot to name.pot.
-E
--escape
Replace non-ASCII characters with octal escape sequences.
-h
--help
Print this help message and exit.
-k word
--keyword=word
Keywords to look for in addition to the default set, which are:
%(DEFAULTKEYWORDS)s
You can have multiple -k flags on the command line.
-K
--no-default-keywords
Disable the default set of keywords (see above). Any keywords
explicitly added with the -k/--keyword option are still recognized.
-o filename
--output=filename
Rename the default output file from messages.pot to filename. If
filename is `-' then the output is sent to standard out.
-p dir
--output-dir=dir
Output files will be placed in directory dir.
-v
--verbose
Print the names of the files being processed.
-V
--version
Print the version of pygettext and exit.
-w columns
--width=columns
Set width of output to columns.
-x filename
--exclude-file=filename
Specify a file that contains a list of strings that are not be
extracted from the input files. Each string to be excluded must
appear on a line by itself in the file.
If `inputfile' is -, standard input is read.
"""
import os
import sys
import time
import getopt
import tokenize
import operator
import re
import os
from xml.sax import make_parser,handler,SAXParseException
intRe = re.compile("^\d+$")
_ignore = {
':' : 0,
}
# for selftesting
try:
import fintl
_ = fintl.gettext
except ImportError:
def _(s): return s
__version__ = '1.4'
default_keywords = ['_','__']
EMPTYSTRING = ''
_int_re = re.compile("^\d+$")
_ignore = { ':' : 0, '*' : 0, }
class GladeExtractor:
def __init__(self,msgs):
self.strings = msgs
def add_string(self, str, lineno):
if str.strip() == "":
return
if _ignore.has_key(str):
return
entry = (self.file, lineno)
if self.strings.has_key(str):
self.strings[str][entry] = 0
else:
self.strings[str] = {entry: 0}
def parse(self,file):
self.p = make_parser()
self.p.setContentHandler(GladeParser(self,file))
filename = "file://" + os.path.abspath(file)
self.file = file
self.p.parse(filename)
class GladeParser(handler.ContentHandler):
"""
SAX parsing class for the StyleSheetList XML file.
"""
def __init__(self,parent,filename):
"""
Creates a SheetParser class that populates the passed StyleSheetList
class.
sheetlist - StyleSheetList instance to be loaded from the file.
"""
handler.ContentHandler.__init__(self)
self.parent = parent
self.translate = 0
self.text = ""
self.filename = filename
self.lineno = 0
def startElement(self,tag,attrs):
"""
Overridden class that handles the start of a XML element
"""
if tag == "property":
if attrs.has_key('translatable'):
self.text = ""
if attrs['translatable'] == 'yes':
self.translate = 1
else:
self.translate = 0
def endElement(self,tag):
"Overridden class that handles the start of a XML element"
if self.translate:
if not _int_re.match(self.text):
self.parent.add_string(self.text, self.locator.getLineNumber())
self.translate = 0
def setDocumentLocator(self,locator):
self.locator = locator
def characters(self, data):
self.text = self.text + data
class TipExtractor:
def __init__(self,msgs):
self.strings = msgs
def add_string(self, str, lineno):
if str.strip() == "":
return
if _ignore.has_key(str):
return
entry = (self.file, lineno)
if self.strings.has_key(str):
self.strings[str][entry] = 0
else:
self.strings[str] = {entry: 0}
def parse(self,file):
self.p = make_parser()
self.p.setContentHandler(TipParser(self,file))
filename = "file://" + os.path.abspath(file)
self.file = file
self.p.parse(filename)
class TipParser(handler.ContentHandler):
"""
SAX parsing class for the Tips XML file.
This parser needs to extract strings in *exactly* the same way
as the TipOfDay.TipParser does. Otherwise, msgid's won't be correctly
matched.
"""
def __init__(self,parent,filename):
"""
Creates a SheetParser class that populates the passed StyleSheetList
class.
sheetlist - StyleSheetList instance to be loaded from the file.
"""
handler.ContentHandler.__init__(self)
self.parent = parent
self.translate = 0
self.text = ""
self.filename = filename
self.lineno = 0
def startElement(self,tag,attrs):
"""
Overridden class that handles the start of a XML element
"""
if tag == "tip":
self.text = ""
elif tag != "tips":
# let all the other tags through, except for the "tips" tag
self.text = self.text + "<%s>" % tag
def endElement(self,tag):
"Overridden class that handles the start of a XML element"
if tag == "tip":
if not _int_re.match(self.text):
text = self.escape(self.text)
self.parent.add_string(' '.join(text.split()),
self.locator.getLineNumber())
elif tag != "tips":
# let all the other tags through, except for the "tips" tag
self.text = self.text + "</%s>" % tag
def setDocumentLocator(self,locator):
self.locator = locator
def characters(self, data):
self.text = self.text + data
def escape(self,text):
"""
The tip's text will be interpreted as a markup, so we need to escape
some special chars.
"""
text = text.replace('&','&amp;'); # Must be first
return text
# The normal pot-file header. msgmerge and Emacs's po-mode work better if it's
# there.
pot_header = _('''\
# GRAMPS
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: GRAMPS VERSION\\n"
"POT-Creation-Date: %(time)s\\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"
"Language-Team: LANGUAGE <LL@li.org>\\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=iso-8859-1\\n"
"Content-Transfer-Encoding: 8bit\\n"
"Generated-By: pygettext.py %(version)s\\n"
''')
def usage(code, msg=''):
sys.stderr.write(_(__doc__) % globals())
if msg:
sys.stderr.write(msg)
sys.stderr.write('\n')
sys.exit(code)
escapes = []
def make_escapes(pass_iso8859):
global escapes
if pass_iso8859:
# Allow iso-8859 characters to pass through so that e.g. 'msgid
# "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we
# escape any character outside the 32..126 range.
mod = 128
else:
mod = 256
for i in range(256):
if 32 <= (i % mod) <= 126:
escapes.append(chr(i))
else:
escapes.append("\\%03o" % i)
escapes[ord('\\')] = '\\\\'
escapes[ord('\t')] = '\\t'
escapes[ord('\r')] = '\\r'
escapes[ord('\n')] = '\\n'
escapes[ord('\"')] = '\\"'
def escape(s):
global escapes
s = list(s)
for i in range(len(s)):
s[i] = escapes[ord(s[i])]
return ''.join(s)
def safe_eval(s):
# unwrap quotes, safely
return eval(s, {'__builtins__':{}}, {})
def normalize(s):
# This converts the various Python string types into a format that is
# appropriate for .po files, namely much closer to C style.
lines = s.split('\n')
if len(lines) == 1:
s = '"' + escape(s) + '"'
else:
if not lines[-1]:
del lines[-1]
lines[-1] = lines[-1] + '\n'
for i in range(len(lines)):
lines[i] = escape(lines[i])
lineterm = '\\n"\n"'
s = '""\n"' + lineterm.join(lines) + '"'
return s
class TokenEater:
def __init__(self, options):
self.__options = options
self.__messages = {}
self.__state = self.__waiting
self.__data = []
self.__lineno = -1
self.__freshmodule = 1
self.__curfile = None
def __call__(self, ttype, tstring, stup, etup, line):
self.__state(ttype, tstring, stup[0])
def __waiting(self, ttype, tstring, lineno):
opts = self.__options
if ttype == tokenize.NAME and tstring in opts.keywords:
self.__state = self.__keywordseen
def __suiteseen(self, ttype, tstring, lineno):
# ignore anything until we see the colon
if ttype == tokenize.OP and tstring == ':':
self.__state = self.__suitedocstring
def __suitedocstring(self, ttype, tstring, lineno):
# ignore any intervening noise
if ttype == tokenize.STRING:
self.__addentry(safe_eval(tstring), lineno, isdocstring=1)
self.__state = self.__waiting
elif ttype not in (tokenize.NEWLINE, tokenize.INDENT,
tokenize.COMMENT):
# there was no class docstring
self.__state = self.__waiting
def __keywordseen(self, ttype, tstring, lineno):
if ttype == tokenize.OP and tstring == '(':
self.__data = []
self.__lineno = lineno
self.__state = self.__openseen
else:
self.__state = self.__waiting
def __openseen(self, ttype, tstring, lineno):
if ttype == tokenize.OP and tstring == ')':
# We've seen the last of the translatable strings. Record the
# line number of the first line of the strings and update the list
# of messages seen. Reset state for the next batch. If there
# were no strings inside _(), then just ignore this entry.
if self.__data:
self.__addentry(''.join(self.__data))
self.__state = self.__waiting
elif ttype == tokenize.STRING:
self.__data.append(safe_eval(tstring))
# TBD: should we warn if we seen anything else?
def __addentry(self, msg, lineno=None, isdocstring=0):
if lineno is None:
lineno = self.__lineno
if not msg in self.__options.toexclude:
entry = (self.__curfile, lineno)
if self.__messages.has_key(msg):
self.__messages[msg][entry] = isdocstring
else:
self.__messages[msg] = {entry:isdocstring}
def set_filename(self, filename):
self.__curfile = filename
self.__freshmodule = 1
def get_messages(self):
return self.__messages
def write(self, fp):
options = self.__options
timestamp = time.ctime(time.time())
# The time stamp in the header doesn't have the same format as that
# generated by xgettext...
fp.write(pot_header % {'time': timestamp, 'version': __version__})
fp.write('\n')
# Sort the entries. First sort each particular entry's keys, then
# sort all the entries by their first item.
reverse = {}
for k, v in self.__messages.items():
keys = v.keys()
keys.sort()
if reverse.has_key(tuple(keys)):
reverse[tuple(keys)].append((k,v))
else:
reverse[tuple(keys)] = [(k,v)]
# reverse.setdefault(tuple(keys), []).append((k, v))
rkeys = reverse.keys()
rkeys.sort()
for rkey in rkeys:
rentries = reverse[rkey]
rentries.sort()
for k, v in rentries:
isdocstring = 0
# If the entry was gleaned out of a docstring, then add a
# comment stating so. This is to aid translators who may wish
# to skip translating some unimportant docstrings.
if reduce(operator.__add__, v.values()):
isdocstring = 1
# k is the message string, v is a dictionary-set of (filename,
# lineno) tuples. We want to sort the entries in v first by
# file name and then by line number.
v = v.keys()
v.sort()
locline = '#:'
for filename, lineno in v:
d = {'filename': filename, 'lineno': lineno}
s = _(' %(filename)s:%(lineno)d') % d
if len(locline) + len(s) <= options.width:
locline = locline + s
else:
fp.write(locline + "\n");
locline = "#:" + s
if len(locline) > 2:
fp.write(locline + "\n")
fp.write('msgid ' + normalize(k) + "\n")
fp.write('msgstr ""\n' + "\n")
def main():
global default_keywords
try:
opts, args = getopt.getopt(
sys.argv[1:],
'ad:DEhk:Kno:p:S:Vvw:x:X:',
['extract-all', 'default-domain=', 'escape', 'help',
'keyword=', 'no-default-keywords',
'output=', 'output-dir=',
'style=', 'verbose', 'version', 'width=', 'exclude-file=',
'docstrings', 'no-docstrings',
])
except getopt.error, msg:
usage(1, msg)
# for holding option values
class Options:
# constants
# defaults
extractall = 0 # FIXME: currently this option has no effect at all.
escape = 0
keywords = []
outpath = ''
outfile = 'messages.pot'
verbose = 0
width = 78
excludefilename = ''
docstrings = 0
nodocstrings = {}
options = Options()
# parse options
for opt, arg in opts:
if opt in ('-h', '--help'):
usage(0)
elif opt in ('-a', '--extract-all'):
options.extractall = 1
elif opt in ('-d', '--default-domain'):
options.outfile = arg + '.pot'
elif opt in ('-E', '--escape'):
options.escape = 1
elif opt in ('-k', '--keyword'):
options.keywords.append(arg)
elif opt in ('-K', '--no-default-keywords'):
default_keywords = []
elif opt in ('-o', '--output'):
options.outfile = arg
elif opt in ('-p', '--output-dir'):
options.outpath = arg
elif opt in ('-v', '--verbose'):
options.verbose = 1
elif opt in ('-V', '--version'):
print _('pygettext.py (xgettext for Python) %s') % __version__
sys.exit(0)
elif opt in ('-w', '--width'):
try:
options.width = int(arg)
except ValueError:
usage(1, _('--width argument must be an integer: %s') % arg)
elif opt in ('-x', '--exclude-file'):
options.excludefilename = arg
# calculate escapes
make_escapes(options.escape)
# calculate all keywords
options.keywords.extend(default_keywords)
# initialize list of strings to exclude
if options.excludefilename:
try:
fp = open(options.excludefilename)
options.toexclude = fp.readlines()
fp.close()
except IOError:
sys.stderr.write(_("Can't read --exclude-file: %s") % options.excludefilename)
sys.exit(1)
else:
options.toexclude = []
# slurp through all the files
eater = TokenEater(options)
p = GladeExtractor(eater.get_messages())
tp = TipExtractor(eater.get_messages())
for filename in args:
if filename[-5:] == 'glade':
print 'Working on %s' % filename
p.parse(filename)
elif filename[-8:] == 'tips.xml':
# Using our own custom Tips parser for tips.xml
print 'Working on %s' % filename
tp.parse(filename)
elif filename[-3:] == 'xml':
# THIS IS NOT WORKING -- something has changed in SAX/Expat
try:
parser = make_parser()
pxml = XMLParser(filename,eater.get_messages())
parser.setContentHandler(pxml)
parser.parse(filename)
except (IOError,OSError,SAXParseException):
print 'failed on %s' % filename
else:
print 'Working on %s' % filename
fp = open(filename)
closep = 1
try:
eater.set_filename(filename)
try:
tokenize.tokenize(fp.readline, eater)
except tokenize.TokenError, e:
sys.stderr.write('%s: %s, line %d, column %d' % (e[0], filename, e[1][0], e[1][1]))
finally:
if closep:
fp.close()
# write the output
if options.outfile == '-':
fp = sys.stdout
closep = 0
else:
if options.outpath:
options.outfile = os.path.join(options.outpath, options.outfile)
fp = open(options.outfile, 'w')
closep = 1
try:
eater.write(fp)
finally:
if closep:
fp.close()
if __name__ == '__main__':
main()

View File

@ -1,23 +0,0 @@
# This is the src/po level Makefile configuration
EXTRA_DIST = $(POFILES) template.po
CLEANFILES = $(MOFILES)
all-local: $(MOFILES)
install-data-local:
for lang in $(LANGUAGES); do \
$(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$lang; \
$(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
$(INSTALL_DATA) $$lang.mo $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
uninstall-local:
for lang in $(LANGUAGES); do \
rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/gramps.mo; \
done
SUFFIXES = .po .mo
.po.mo:
$(MSGCONV) --to-code=UTF-8 $< | $(MSGFMT) - -o $@

View File

@ -1,6 +0,0 @@
# List of source files containing translatable strings.
src/main.c
src/interface.c
src/callbacks.c
src/support.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff