manatools / dnfdaemon

DBus daemon for doing package action with the dnf package manager
GNU General Public License v2.0
12 stars 16 forks source link

System service always returns untranslated group names. #10

Open kkofler opened 7 years ago

kkofler commented 7 years ago

The user-visible name (DNF's ui_name) we get from the dnfdaemon system service (in the [1] list entry of any comps group or category) is always returned in English rather than translated. This is strange because DNF itself translates these names, and the DNF API documentation says that these names are translated. But dnfdaemon is not setting the locale appropriately, probably because it is a system service, and I cannot find an API to set it manually.

Should the applications ask the session daemon rather than the system daemon for the groups? Should they set the locale somewhere? (Where?) Yumex-DNF (unmodified Fedora package) and dnfdragora (even after my fix to use the [1] (ui_name) entry in the UI instead of the [0] (id or name) entry) both show me the groups in English whereas the DNF command line shows me German names.

timlau commented 7 years ago

The dnf-daemon runs as a system daemon (LANG=c) so there should properly be some way to set the locale you want to use when getting the ui_name. there is 2 things there need to be in place for this to work

  1. dnf-daemon api for setting the locale to use
  2. we need a way to force dnf to use the locale