aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/gpgconf-comp.c22
2 files changed, 26 insertions, 1 deletions
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 <[email protected]>
+
+ * gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Hack to
+ parly support translations.
+
2008-04-08 Werner Koch <[email protected]>
* 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;