Page MenuHome GnuPG

Kleopatra: Improve the text for the import certificates dialog
Testing, NormalPublic

Description

In importcertificatescommand.cpp is a string "Detailed results of importing %1:" which is wrong most of the time as several quite different values are possible here.
And it can not be translated correctly because of that and because translation context is missing.

%1 can be either "OpenPGP certificate server" in case of a keyserver:

or a URL for a WKD:

or a filename (including path) for a certificate imported from a file.

or "Clipboard" or "Notepad" or "Retrieve Signer Keys".

Please

  • use different strings for the different values where needed
  • for the case keyserver, return a URL, too ("hkps://keyserver.ubuntu.com" is better info than "OpenPGP certificate server")
  • add translation context

T7448: Draft: Kleopatra: Unify the information given on certificate import is related.

Details

Event Timeline

I think we have to use multiple different texts instead of assuming that we can use something general as "Detailed import results from %1" which fits all cases in all languages.

ebo renamed this task from Draft: Kleopatra: Improve the text for the import certificates dialog to Kleopatra: Improve the text for the import certificates dialog.Dec 10 2024, 11:05 AM
ebo triaged this task as Normal priority.
ebo updated the task description. (Show Details)
ikloecker moved this task from Backlog to WIP on the gpd5x board.
ikloecker set External Link to https://invent.kde.org/pim/kleopatra/-/merge_requests/434.Mar 9 2026, 5:15 PM
ikloecker changed the task status from Open to Testing.Mar 12 2026, 2:44 PM

Fixed.

We use individual texts now that all follow the pattern "Detailed results of import from ..." for import from file (file name is displayed), clipboard, notepad, smart card, WKD (URL is displayed), server ("keyserver" or "LDAP server").

ikloecker mentioned this in Unknown Object (Maniphest Task).Mar 16 2026, 8:43 AM

Almost looks good to me on gpg4win-5.1.0-beta658 @ win11.

Issues found

  • File import: The path probably should be wrapped at some point (new ticket?)
  • WKD/LDAP Import: an unknown key triggers the certify dialog, the result window is never shown. Is this ok?

Still needs testing

Done

  • file (file name is displayed)
  • clipboard
  • notepad
  • WKD (URL is displayed)
  • server ("keyserver" or "LDAP server")

File import: The path probably should be wrapped at some point (new ticket?)

Yes, I'd say new ticket. I'm sure we have similar problems in other dialogs that show a file path. I'm wondering if we really need to show the full path. I guess it would be sufficient if the full path was shown in the Audit Log (not sure if that's the case; probably not).

WKD/LDAP Import: an unknown key triggers the certify dialog, the result window is never shown. Is this ok?

Yes, this is done on purpose. (I'm not entirely convinced that this is ideal because this deprives the user of the two actions available in the result window, but this special behavior for a new single imported certificate exists since a long time.)

I guess it would be sufficient if the full path was shown in the Audit Log (not sure if that's the case; probably not).

Full path is available in the Audit Log:

As files are chosen deliberately before (either via file selector or drag & drop), the filename without the path would be even better. Any objections @ebo?

no objections from me. Though I wonder what gpg will do with very log file names…

Good point. Of course it will be displayed :)

Good point. Of course it will be displayed :)

The file names are displayed by Kleopatra. The actual audit logs of the imports of this file with gpg/gpgsm are what follows the file names (printed with fixed width font).

gpg just shows the import results:

  • text displayed on import from smart card:

I assume that this means the import of public keys from a S/MIME smart card. I have never seen any import information windows for that, including now. There is only this information at the bottom of the smart card window:

When are the "Detailed results of import from smart card" supposed to occur?

In T7446#220582, @ebo wrote:

When are the "Detailed results of import from smart card" supposed to occur?

I think this happens when using "Import Certificate from Card" for a PIV card. To test one first needs to write some S/MIME certificate to the card. (Side note: Nowadays this explicit import might be obsolete because certificates are imported automatically although I'm not sure if this really happens also for PIV.)

@ebo already tested this and the automatic import seems to suppress the import certificate dialog.
All other cases are fine, I'm quite sure the smartcard case would also work as intended.
I'll consider this resolved.

timegrid edited projects, added gpd5x (gpd-5.1.0); removed gpd5x.

yes, it is not worth the bother to test it