After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572360 - "Password: " is not translated in pam module
"Password: " is not translated in pam module
Product: gnome-keyring
Classification: Core
Component: general
Other Linux
: Normal normal
: 2.28
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Reported: 2009-02-19 02:17 UTC by Vincent Untz
Modified: 2009-06-26 16:40 UTC
See Also:
GNOME target: 2.28.x
GNOME version: ---

Example patch (774 bytes, patch)
2009-02-19 02:19 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2009-02-19 02:17:12 UTC
In prompt_password(), we have a string "Password: ". I thought that PAM would magically translate it, but it seems it doesn't -- at least, I saw it a few minutes ago.

I'm not quite sure what's the right thing to do here:

 + we can use GNOME translations, and so use the gnome-keyring gettext domain.

 + we can try to use the PAM translations. On Linux, it means using the Linux-PAM domain (as far as I can tell). I tried here and it works.

The latter might be better for consistency, but I'm not sure if it will work on all platforms :/
Comment 1 Vincent Untz 2009-02-19 02:19:00 UTC
Created attachment 129030 [details] [review]
Example patch

Here's a patch for the second solution. Or at least an example of how it could be, since we don't want to use the Linux-PAM domain like that.

A solution could be to use a configure flag to specify the domain (it could also be used to say "use internal translation").
Comment 2 Stef Walter 2009-02-19 02:30:16 UTC
The patch looks good. But are you sure that this is meant to be translated? I think that there's a bit of screen scraping going on within PAM apps. 

I have a feeling, but I'm not certain, that this string is not only interpreted by humans, but also by applications.

How would we go about verifying this? Could you perhaps ask on a PAM mailing list where folks who would know hang out?
Comment 3 Vincent Untz 2009-02-19 02:43:08 UTC
When I saw the untranslated strings, I looked at the pam code and saw that:

(look for "Password:"). So they do translate it in PAM. But it might make sense to check by sending a mail if there's any doubt.
Comment 4 Stef Walter 2009-03-01 01:54:13 UTC
Oh boy, sorry, I missed string freeze on this one. Do you think it could wait until 2.27? If not, we could get permission for breaking the freeze.
Comment 5 Vincent Untz 2009-03-02 12:42:35 UTC
It's not urgent, so let's do it for 2.27. However, I'm confused: do you want to make the string translatable for translators, or do you want to re-use the pam translations (as my draft patch does)?

Actually, we should probably look for a pam translation (for consistency) and if there's none, use an internal translation. That sounds better.
Comment 6 Stef Walter 2009-03-03 01:01:31 UTC
Is there anyway to do that automatically without adding a configure option? 
Comment 7 Vincent Untz 2009-03-03 01:09:42 UTC
Sure. We can do this:

translated = NULL

 try Linux-PAM gettext domain
#if BSD
// wait for bsd people to tell us what domain to use
// wait for solaris people to tell us what domain to use

if (translated == NULL)
 use our own translation
Comment 8 Stef Walter 2009-03-03 01:19:52 UTC
Is this really what other projects with PAM modules do? 

Heh, sorry to keep going back and forth on this. If you're willing to take responsibility, I'd say go ahead and do it in the way that you feel is best.
Comment 9 Vincent Untz 2009-03-03 12:21:36 UTC
(In reply to comment #8)
> Is this really what other projects with PAM modules do? 

I think I only checked PAM modules that are shipped with PAM, so, well, it's not a good example. I'll check other PAM modules if I can find some.
Comment 10 André Klapper 2009-05-03 19:24:05 UTC
So, can this get in now that gnome-keyring has branched for 2.26, please?
Comment 11 Stef Walter 2009-06-26 16:40:54 UTC
I've committed Vincent's patch to master. Only fixes the problem on linux, but I wouldn't know where to start on other OS's.