How to translate this error message?

I usually run into similar situations where I can’t trace what program is sending such am error when KDE Localization - Search a string in translations doesn’t find it, and if it is possible to translate these strings or not, is there a good way to do so?

This is a case where the KDE notification is passing on an error message it received from a non-KDE tool. Here I’m pretty sure that message comes from D-Bus itself.

1 Like

found it https://gitlab.freedesktop.org/dbus/dbus/-/blob/main/dbus/dbus-pending-call.c#L391-395 but I don’t think it is possible to translate it.

Right, it looks like the code in there is not marked as translatable. It should be! But that will need to be done over there.

That cannot ever work reliably, as the dbus-daemon may be running in a different locale from your user session (where the component which is receiving and printing the error is running).

The bug here is in the application which is displaying a raw error message from D-Bus. Even if the message was localised, it’s not useful to 99% of users. The app should check the error code and handle this kind of error more specifically in the UI (although actually this particular error typically indicates that the queried D-Bus service has crashed, so that would be the first thing to investigate and fix).

Right, it’s good for our software to catch errors and handle them internally, or at least display error messages we’ve written to be reasonably user-friendly.

That’s a lot more work though, and requires synchronization with what upstream is doing, which is why you don’t see it as often as just dumping the raw error message out for the user to read.

1 Like