From d9405f0c490e09e2a9918e7d30002fbbdcb5e9f1 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 9 May 2008 09:54:35 +0000 Subject: Updated German translation. Fix in gpgconf for W32. --- tools/ChangeLog | 5 +++++ tools/gpgconf-comp.c | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/ChangeLog b/tools/ChangeLog index b240ab82a..6638be57a 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog @@ -1,3 +1,8 @@ +2008-05-09 Werner Koch + + * gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Hack to + parly support translations. + 2008-04-08 Werner Koch * gpgconf-comp.c (gc_options_gpg): Add --auto-key-locate. diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index b4c78cdf9..664589b9c 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -1027,7 +1027,27 @@ gpg_agent_runtime_change (void) static const char * my_dgettext (const char *domain, const char *msgid) { -#ifdef ENABLE_NLS +#ifdef USE_SIMPLE_GETTEXT + if (domain) + { + static int switched_codeset; + char *text; + + if (!switched_codeset) + { + switched_codeset = 1; + gettext_select_utf8 (1); + } + + if (!strcmp (domain, "gnupg")) + domain = PACKAGE_GT; + + /* FIXME: we have no dgettext, thus we can't switch. */ + + text = gettext (msgid); + return text ? text : msgid; + } +#elif defined(ENABLE_NLS) if (domain) { static int switched_codeset; -- cgit v1.2.3