mirror of git://git.gnupg.org/gnupg.git
Revamped the W32 gettext implementation.
This commit is contained in:
parent
4019792423
commit
75c0534820
|
@ -1,5 +1,10 @@
|
||||||
2008-10-20 Werner Koch <wk@g10code.com>
|
2008-11-04 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Adjust for changed
|
||||||
|
w32-gettext.c.
|
||||||
|
* homedir.c (gnupg_localedir): New.
|
||||||
|
|
||||||
|
2008-10-20 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
|
* http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
|
||||||
unused arg.
|
unused arg.
|
||||||
|
|
|
@ -322,6 +322,27 @@ gnupg_datadir (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char *
|
||||||
|
gnupg_localedir (void)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
static char *name;
|
||||||
|
|
||||||
|
if (!name)
|
||||||
|
{
|
||||||
|
const char *s1, *s2;
|
||||||
|
s1 = w32_rootdir ();
|
||||||
|
s2 = DIRSEP_S "share" DIRSEP_S "locale";
|
||||||
|
name = xmalloc (strlen (s1) + strlen (s2) + 1);
|
||||||
|
strcpy (stpcpy (name, s1), s2);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
#else /*!HAVE_W32_SYSTEM*/
|
||||||
|
return LOCALEDIR;
|
||||||
|
#endif /*!HAVE_W32_SYSTEM*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return the default socket name used by DirMngr. */
|
/* Return the default socket name used by DirMngr. */
|
||||||
const char *
|
const char *
|
||||||
dirmngr_socket_name (void)
|
dirmngr_socket_name (void)
|
||||||
|
|
|
@ -33,7 +33,7 @@ void
|
||||||
i18n_init (void)
|
i18n_init (void)
|
||||||
{
|
{
|
||||||
#ifdef USE_SIMPLE_GETTEXT
|
#ifdef USE_SIMPLE_GETTEXT
|
||||||
set_gettext_file (PACKAGE_GT, "Software\\GNU\\GnuPG");
|
bindtextdomain (PACKAGE_GT, gnupg_localedir ());
|
||||||
#else
|
#else
|
||||||
# ifdef ENABLE_NLS
|
# ifdef ENABLE_NLS
|
||||||
setlocale (LC_ALL, "" );
|
setlocale (LC_ALL, "" );
|
||||||
|
|
|
@ -208,6 +208,7 @@ const char *gnupg_bindir (void);
|
||||||
const char *gnupg_libexecdir (void);
|
const char *gnupg_libexecdir (void);
|
||||||
const char *gnupg_libdir (void);
|
const char *gnupg_libdir (void);
|
||||||
const char *gnupg_datadir (void);
|
const char *gnupg_datadir (void);
|
||||||
|
const char *gnupg_localedir (void);
|
||||||
const char *dirmngr_socket_name (void);
|
const char *dirmngr_socket_name (void);
|
||||||
|
|
||||||
/* All module names. We also include gpg and gpgsm for the sake for
|
/* All module names. We also include gpg and gpgsm for the sake for
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-04 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* w32-gettext.c: Merged with code from libgpg-error and rewrote
|
||||||
|
most parts.
|
||||||
|
|
||||||
|
* Makefile.am (AM_CFLAGS): Add -DJNLIB_IN_JNLIB.
|
||||||
|
|
||||||
2008-10-29 Werner Koch <wk@g10code.com>
|
2008-10-29 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* stringhelp.c (make_filename): Implement using macros. Factor some
|
* stringhelp.c (make_filename): Implement using macros. Factor some
|
||||||
|
|
|
@ -27,7 +27,7 @@ TESTS = $(module_tests)
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/intl
|
AM_CPPFLAGS = -I$(top_srcdir)/intl
|
||||||
|
|
||||||
# We need libgcrypt because libjnlib-config includes gcrypt.h
|
# We need libgcrypt because libjnlib-config includes gcrypt.h
|
||||||
AM_CFLAGS = $(LIBGCRYPT_CFLAGS)
|
AM_CFLAGS = -DJNLIB_IN_JNLIB $(LIBGCRYPT_CFLAGS)
|
||||||
|
|
||||||
noinst_LIBRARIES = libjnlib.a
|
noinst_LIBRARIES = libjnlib.a
|
||||||
|
|
||||||
|
|
2160
jnlib/w32-gettext.c
2160
jnlib/w32-gettext.c
File diff suppressed because it is too large
Load Diff
|
@ -28,7 +28,7 @@ int write_w32_registry_string (const char *root, const char *dir,
|
||||||
const char *name, const char *value);
|
const char *name, const char *value);
|
||||||
|
|
||||||
#ifdef USE_SIMPLE_GETTEXT
|
#ifdef USE_SIMPLE_GETTEXT
|
||||||
int set_gettext_file (const char *filename, const char *regkey);
|
char *bindtextdomain (const char *domainname, const char *dirname);
|
||||||
const char *gettext (const char *msgid );
|
const char *gettext (const char *msgid );
|
||||||
const char *ngettext (const char *msgid1, const char *msgid2,
|
const char *ngettext (const char *msgid1, const char *msgid2,
|
||||||
unsigned long int n);
|
unsigned long int n);
|
||||||
|
|
Loading…
Reference in New Issue