Integrate pinentry-mac into pinentry

Werner Koch wk at gnupg.org
Sat Nov 28 17:29:09 CET 2015


On Fri, 27 Nov 2015 21:36, Mento at gpgtools.org said:

> I need the strings "Show typing" and "Save in keychain".

This is the list of the fixed strings:

      /* TRANSLATORS: These are labels for buttons etc used in
         Pinentries.  An underscore indicates that the next letter
         should be used as an accelerator.  Double the underscore for
         a literal one.  The actual to be translated text starts after
         the second vertical bar.  Note that gpg-agent has been set to
         utf-8 so that the strings are in the expected encoding.  */
      { "ok",     N_("|pinentry-label|_OK") },
      { "cancel", N_("|pinentry-label|_Cancel") },
      { "yes",    N_("|pinentry-label|_Yes") },
      { "no",     N_("|pinentry-label|_No") },
      { "prompt", N_("|pinentry-label|PIN:") },
      { "pwmngr", N_("|pinentry-label|_Save in password manager"), 1 },
      { "cf-visi",N_("Do you really want to make your "
                     "passphrase visible on the screen?") },
      { "tt-visi",N_("|pinentry-tt|Make passphrase visible") },
      { "tt-hide",N_("|pinentry-tt|Hide passphrase") },
      { NULL, NULL}
    };

What about using only a tooltip and an icon for the "Show typing"?  For
the tooltip you may then use tt-visi and tt-hide.  Instead of an icon
the texts "..." and "abc" may also work in all languages.

For "Save in keychain" you should use pwmngr.  In you code you can use this:

      if (pinentry->default_pwmngr)
        {
          msg = pinentry_utf8_validate (pinentry->default_pwmngr);
          w = gtk_check_button_new_with_mnemonic (msg);
          g_free (msg);
        }
      else
        w = gtk_check_button_new_with_label ("Save passphrase using libsecret");

So that if the string is not available a fixed string is used.  We use
a different one here to be able to detect that something went wrong.
pinentry_utf8_validate() is useful to make sure that the provided string
is really utf-8 encoded.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list