On Fri, Oct 10, 2008 at 7:49 PM, Robert Relyea <[EMAIL PROTECTED]> wrote: > Ludovic Rousseau wrote: >> >> On Fri, Oct 10, 2008 at 2:45 AM, Robert Relyea <[EMAIL PROTECTED]> wrote: >> >>> >>> BTW does the _(password_prompt) do the right thing for the translation >>> teams? >>> >> >> >> In general we go that using a declaration like N_("Smart card") in the >> source code. >> > > OK, that's the part I was missing. The patch probably should have the > translation on the sprintf rather than the prompt.... > > Original patch: > > + sprintf(password_prompt, "%s PIN: ", configuration->token_type); > if (configuration->use_first_pass) { > rv = pam_get_pwd(pamh, &password, NULL, PAM_AUTHTOK, 0); > } else if (configuration->try_first_pass) { > - rv = pam_get_pwd(pamh, &password, _("Smart card password: "), > PAM_AUTHTOK, > + rv = pam_get_pwd(pamh, &password, _(password_prompt), PAM_AUTHTOK, > > Suggestion: > > > > + N_("Smart card") N_("Token) N_("Security Device") N_("Authentication > Device") /* or is this better in pam_pkcs11.conf? */
It would be better in pam_pkcs11.conf since the text is configured there. This would give the list of texts that are translated. If the configuration in pam_pkcs11.conf was an index in a list of possible text, the N_() could be in the source code. > + sprintf(password_prompt, _("%s PIN: "), _(configuration->token_type)); > if (configuration->use_first_pass) { > rv = pam_get_pwd(pamh, &password, NULL, PAM_AUTHTOK, 0); > } else if (configuration->try_first_pass) { > - rv = pam_get_pwd(pamh, &password, _("Smart card password: "), > PAM_AUTHTOK, > + rv = pam_get_pwd(pamh, &password, password_prompt, PAM_AUTHTOK, Better now. -- Dr. Ludovic Rousseau _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel