bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Locale stuff under Win


From: Massimiliano . Maini
Subject: [Bug-gnubg] Locale stuff under Win
Date: Wed, 5 Apr 2006 18:11:17 +0200

Hi all,

I'm a bit lost in the Locale/gettext stuff under Win.
I build with a config.h having :

#define ENABLE_NLS 1
#define HAVE_LIBINTL_H 1

If I look at the preprocessor output, the line :

 outputl (_("No game in progress (type `new game' to start one)."));

is translated into :

  outputl (libintl_gettext ("No game in progress (type `new game' to start
one)."));

The resulting executables do not need gettextlib.dll, gettextsrc.dll and
gettextpo.dll (it just needs intl.dll).

I've translated some .po files to .mo (using msgfmt) and I've put them
in the gnubg directory as :

      gnubg/Locale/cs/LC_MESSAGES/gnubg.mo
      gnubg/Locale/fr/LC_MESSAGES/gnubg.mo
      gnubg/Locale/it/LC_MESSAGES/gnubg.mo

But it still doesn't work: I change the language, save the settings, quit
and restart,
but nothing changes (the setting of the new language is correct, but menus
are still
in english).

I'm linking against intl.dll that comes with mingw. Any idea what's going
wrong ?


Also, there's a potentially strange thing. getopt.c declares :

#ifndef _
/* This is for other GNU distributions with internationalized messages.
   When compiling libc, the _ macro is predefined.  */
#ifdef HAVE_LIBINTL_H
# include <libintl.h>
# define _(msgid) gettext (msgid)
#else
# define _(msgid) (msgid)
#endif
#endif

while i18n.h declares :

#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# define _(Text) Text
# define gettext(Text) Text
# define ngettext(Singular, Plural, N) \
    ((N == 1) ? Singular : Plural)
# define textdomain(Domain)
# define bindtextdomain(Package, Directory)
# define bind_textdomain_codeset(d,c)
#endif

Isn't something wrong ?

MaX.










reply via email to

[Prev in Thread] Current Thread [Next in Thread]