[gnome-keyring] Make "Password: " prompt be translated in pam module.



commit 039311c6022e5068f92418ac1cc641e092a50915
Author: Stef Walter <stef memberwebs com>
Date:   Fri Jun 26 16:38:08 2009 +0000

    Make "Password: " prompt be translated in pam module.
    
    Fixed on Linux. I'm not an expert in this area, and have no idea
    how make other desktops work. Patches are welcome.
    Patch from Vincent Untz. Fixes bug #572360

 pam/gkr-pam-module.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c
index bd0e23d..f19dd9a 100644
--- a/pam/gkr-pam-module.c
+++ b/pam/gkr-pam-module.c
@@ -54,6 +54,13 @@
 #include <syslog.h>
 #include <unistd.h>
 
+#if defined(ENABLE_NLS) && defined(__linux__)
+#include <libintl.h>
+#define gkr_pam_gettext(msgid) dgettext ("Linux-PAM", msgid)
+#else
+#define gkr_pam_gettext(msgid) (msgid)
+#endif /* ENABLE_NLS */
+
 enum {
 	ARG_AUTO_START          = 0x0010
 };
@@ -730,7 +737,7 @@ prompt_password (pam_handle_t *ph)
 	memset (&msg, 0, sizeof (msg));
 	memset (&resp, 0, sizeof (resp));
 	msg.msg_style = PAM_PROMPT_ECHO_OFF;
-	msg.msg = "Password: ";
+	msg.msg = gkr_pam_gettext ("Password: ");
 	msgs[0] = &msg;
 	
 	/* Call away */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]