diff options
author | Werner Koch <wk@gnupg.org> | 2017-11-15 11:34:30 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-11-15 11:34:30 +0100 |
commit | 166f3f9ec40888e10cb0c51017944bfc57503fc1 (patch) | |
tree | 0ab7bde45edb9c51dc6706febb9da2bfce8c8661 /g10/card-util.c | |
parent | Merge branch 'STABLE-BRANCH-2-2' (diff) | |
download | gnupg2-166f3f9ec40888e10cb0c51017944bfc57503fc1.tar.xz gnupg2-166f3f9ec40888e10cb0c51017944bfc57503fc1.zip |
gpg: Repurpose the ISO defined DO "sex" to "salutation".
* g10/card-util.c (current_card_status): String changes.
(change_sex): Description change.
(cmds): Add "salutation"; keep "sex" as an alias.
--
Note that we can't change the used values or tags but at least the UI
should show reflect the real purpose of the field.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/card-util.c')
-rw-r--r-- | g10/card-util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index 8a03a26cf..854b94f47 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -531,9 +531,9 @@ current_card_status (ctrl_t ctrl, estream_t fp, print_isoname (fp, "Name of cardholder: ", "name", info.disp_name); print_name (fp, "Language prefs ...: ", info.disp_lang); - tty_fprintf (fp, "Sex ..............: %s\n", - info.disp_sex == 1? _("male"): - info.disp_sex == 2? _("female") : _("unspecified")); + tty_fprintf (fp, "Salutation .......: %s\n", + info.disp_sex == 1? _("Mr."): + info.disp_sex == 2? _("Mrs.") : ""); print_name (fp, "URL of public key : ", info.pubkey_url); print_name (fp, "Login data .......: ", info.login_data); if (info.private_do[0]) @@ -1088,7 +1088,7 @@ change_sex (void) int rc; data = cpr_get ("cardedit.change_sex", - _("Sex ((M)ale, (F)emale or space): ")); + _("Salutation (M = Mr., F = Mrs., or space): ")); if (!data) return -1; trim_spaces (data); @@ -1109,7 +1109,7 @@ change_sex (void) rc = agent_scd_setattr ("DISP-SEX", str, 1, NULL ); if (rc) - log_error ("error setting sex: %s\n", gpg_strerror (rc)); + log_error ("error setting salutation: %s\n", gpg_strerror (rc)); xfree (data); write_sc_op_status (rc); return rc; @@ -1891,7 +1891,8 @@ static struct { "fetch" , cmdFETCH , 0, N_("fetch the key specified in the card URL")}, { "login" , cmdLOGIN , 1, N_("change the login name")}, { "lang" , cmdLANG , 1, N_("change the language preferences")}, - { "sex" , cmdSEX , 1, N_("change card holder's sex")}, + { "salutation",cmdSEX , 1, N_("change card holder's salutation")}, + { "sex" ,cmdSEX , 1, NULL }, /* Backward compatibility. */ { "cafpr" , cmdCAFPR , 1, N_("change a CA fingerprint")}, { "forcesig", cmdFORCESIG, 1, N_("toggle the signature force PIN flag")}, { "generate", cmdGENERATE, 1, N_("generate new keys")}, |