Page MenuHome GnuPG

The pinentry button "Cancel" should renamed to "Abbrechen" if German as language is used. (rt#5946)
Closed, ResolvedPublic

Description

As example:
LANG = de_DE.UTF-8

$pinentry
GETPIN

Opens a PIN dialog with Cancel as button name.
I think this should be Abbrechen.
Localisation is mising.

Event Timeline

ludwig set Version to 0.8.0.svn231-0kk2.
ludwig added a subscriber: ludwig.
emanuel raised the priority of this task from Wishlist to Normal.Sep 17 2010, 2:09 PM
emanuel added projects: i18n, Bug Report.
emanuel added a subscriber: emanuel.

Werner, please note: this issue is kkc.

Retested: Still the same error with pinentry package 0.8.0.svn234-0kk1.

emanuel renamed this task from The pinentry button "Cancel" should renamed to "Abbrechen" if German as language is used. to The pinentry button "Cancel" should renamed to "Abbrechen" if German as language is used. (rt#5946).Sep 17 2010, 2:09 PM
emanuel assigned this task to werner.
emanuel changed Version from 0.8.0.svn231-0kk2 to 0.8.0.svn234-0kk1.
emanuel removed a project: Feature Request.
emanuel added subscribers: bernhard, werner.
werner added projects: gpgagent, gnupg.

This is not a pinentry problem but one of gpg-agent. What version of gpg-agent
are you using?

Note that pinentry does not have any i18n features. The labels for all buttons
as weel as the prompts are provided by the caller. The Cancel you see are
merely fallbacks.

$ gpg-agent --version
gpg-agent (GnuPG) 2.0.16

There are actually two problems here.

The first is that the gtk pinentry does not implement the
default-cancel and default-ok protocol options and thus always use the
standard ones. I just fixed that in pinentry (svn rev 237). The Qt
pinentry works coreclty since 0.8.0.

The other problem is indeed related to GnuPG:

It seems that most of the OPTION lc-message=foo code is not actually
used in gpg-agent. We only use that in the help file system
(gnupg_get_help_string). The problem here is that it is not possible
with gettext to safely switch locales; it is in theory possible using
a hack to trick out the gexttext/gcc optimization. However we would
still see two problems: thread safeness (which is not a major problem
in GnuPG) and the long time it takes to switch locales. The only way
I can see to solve this problem is by using a dedicated function to
look up the translated strings; this better uses the gettext
infrastructure and not our help file system. To make this work we
need to identify all strings in the gpg-agent code which are passed to
pinentry and wrap them into a lookup function. I am not sure whether
this is really required. For almost all users the locale (LC_MESSAGES)
under which gpg-agent was started is the one used with all tools. If
this will be done we won't backport it to 2.0.

Just to note:
I tested with the debian package pinentry-qt (0.8.0.svn234-0kk1) from
files.kolab.org. It's the same problem with pinentry-qt and pinentry-gtk (see
test below).
You wrote that pinentry-qt works corectly since 0.8.0 (=svn222). I can't confirm
this with my test below. Or do you mean, that the additional changes in gnupg
are required for show the german "Abbrechen" button text in pinentry-qt?

Test:

$ echo $LANG
de_DE.UTF-8

pinentry-qt:

$ /usr/bin/pinentry-qt
OK Your orders please
getpin

> button text "Cancel"

pinentry-gtk:
$ /usr/bin/pinentry-gtk

OK Your orders please
getpin

> button text "Cancel"

Right, you need a newer gnupg. Pinentry has no i18n support, thus your tests
are pointless.

2.0.16 should be sufficient, though. Just use a recent pinentry-qt.

Just to make sure:
I tested with gnupg 2.0.16 + pinentry 0.8.0-svn234.
You say that I should test gnupg 2.0.16 + pinentry 0.8.0-svn237.
Right?
(But in T1237 (wk on Sep 28 2010, 01:05 PM / Roundup) you wrote: "you need a newer gnupg".)

Use the released 0.8.0 qt pinentry and not some earlier (i.e. -svnXXX versions).

The release pinentry 0.8.0 version (from 2010-03-03) is based on svn222 (see
tags(pinentry-0.8.0).

The pinentry package "pinentry-qt (0.8.0.svn234-0kk1)" is newer (svn234).
Yes, it should better called 0.8.1-svn234 - but it's the same content.

As I already explained: It works for me using the qt pinentry!

What is you problem? Again: You can't test this by simply invoking pinentry on
the command line.

emanuel removed a project: Restricted Project.Jun 14 2011, 12:24 PM

Tested with current gnupg and pinentry-qt4:

pinentry qt4 (git 5190773293bc38550bbc8aeb1b539bfb47a47c78)
qt 4.7 
gpg (GnuPG) 2.1.0-git328ac58
libgcrypt 1.5.0-gitb90be28

$ export LC_ALL="de_DE.utf8"
$ gpg2 --gen-key

=> Pinentry comes up in German ("Abbrechen" instead of "Cancel")

So issue resolved.