Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
[Freeciv-Dev] patch: Internationalization (PR#69)
Home

[Freeciv-Dev] patch: Internationalization (PR#69)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] patch: Internationalization (PR#69)
From: dwp@xxxxxxxxxxxxxx
Date: Sat, 24 Jul 1999 20:44:50 -0700 (PDT)

This is a multi-part message in MIME format.

--_----------=_93287598192840
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

=?ISO-8859-1?Q?David_P=E9rez_Serrada?= <david@xxxxxxx> wrote:
> On Sun, 18 Jul 1999, David Pfitzner wrote:
> 
> > David =3D?iso-8859-1?Q?P=3DE9rez?=3D Serrada wrote:

> > What I would like to see now is a patch which changes=20
> > configure etc, and civserver.c and civclient.c, to provide
> > basic working support. =20
> Ok... here it is=20

Ok, but I think your "diff -Xno.freeciv" excluded too much;
eg, configure.in and POTFILES.in.  And can exclude aclocal.m4,
since it is created by 'aclocal', and may depend on local
automake version etc.

Ah, I notice the example no.freeciv file in
   http://www.freeciv.org/contribute.html
has these problems; that should be fixed :-/

Also, I don't think your patch does enough to ensure that
the right libs all and includes all happen if the user specifies
--with-included_gettext, to use the internal version.

Attached is a modified patch, doing the following:

Makefile.am
  Added 'intl' and 'po' to SUBDIRS; added intl early in list, so included 
libintl.a is built before executables if using included gettext.

other Makefile.am:
  Added -I../intl to INCLUDES (or -I../../intl in gui dirs).  
This is necessary to be able to use included gettext, which then 
provides a libintl.h simlink in intl.  Note this deliberately
uses relative paths, and not, eg, -I$(top_srcdir)/intl, because
if compiling in a dir other than the source dir, gettext puts
the symlink in the build area, pointing to the source area.

server/Makefile.am:
  Added @INTLDEPS@ to civserver_DEPENDENCIES
  Added @INTLLIBS@ to civserver_LDADD;
Following gettext manual, I put freeciv common and ai libraries 
in LDADD twice, once before @INTLLIBS@ and once after... but I'm
not sure about this.

client/Makefile.am: similarly to server/Makefile.am above.

civclient.c, civserver.c:
Added:
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
(The internal libintl.h includes this by my system one doesn't.)
(Or this could instead go in fcintl.h ?)

To enable/disable i18n code, use '#ifdef ENABLE_NLS' instead of
'#ifdef HAVE_GETTEXT'.  The latter is whether the system C library
has a gettext function, but we can do without it (and even if it does
we might turn off NLS in configure).

fcintl.h: similarly use '#ifdef ENABLE_NLS' instead of 
'#ifdef HAVE_GETTEXT'.

configure.in: (compared to earlier patch)
Moved AM_GNU_GETTEXT lower, because my autoconf complained about
order of AC_PROG_CC and AC_PROG_CPP.  Deleted
- AC_CHECK_FUNC(gettext,
-        AC_CHECK_LIB(intl,gettext)
- )
because it don't think its necessary and it may hurt? 
(eg, it doesn't define HAVE_GETTEXT on succes of first check.)

Added to AC_OUTPUT:
+         intl/Makefile
+         po/Makefile.in

Want POTFILES.in, not just POTFILES.

Added po/ChangeLog to satisfy 'make dist'.

With this patch I can now get a server starting up with a Spanish 
or French intro message, depending on env var LANG, using either 
system or included gettext.  :-)

(After applying the patch, need to run eg 
'aclocal; automake; autoconf; autoheader'; then configure)

The next question is which autogen files we should keep in 
CVS or not...

Regards,
-- David

--_----------=_93287598192840
Content-Disposition: inline; filename="i18n2_d3.diff.gz"
Content-Type: application/x-gzip; name="i18n2_d3.diff.gz"
Content-Transfer-Encoding: base64

H4sICH6OmjcCA2kxOG4yX2QzLmRpZmYA7VvrdtpIEv5tnqJCvDsQECAuvuBJ
jgnIDjPcFuTMzIasjiw1oI2QOFLLiTObB9632OrWBSEJx7fZ+TM5OQSqq0vV
VfVVV7U6urFYgOCB4IAgkC+a6elEWDj2GoIfiupRG4QRLBxCNONG0G7c6lD9
RBaGSSrqGhaaoOo3cVJOEIR97AcXjgE/eSaIR1BvtBsn7UYLxNPT01ypVMqQ
dTDzLM5fR7ZGuya2mzWf//wcBPGkfAwl/DyB8/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