https://bugzilla.redhat.com/show_bug.cgi?id=624158
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|systemd-maint@redhat.com |zbyszek@in.waw.pl
--- Comment #21 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Let's revive this thread...
tl;dr: I propose to add a new D-Bus method. Would this work for gnome/other desktops and other interested parties?
localectl and localed allow setting multiple values for LANGUAGE. We could do that, but I don't think that the current interface should be modified to automatically expand language tags. After all, I someone tells localectl to set LANGUAGE=x localed should obey. Instead, we could move the logic to all consumers of the api, e.g. gnome-control-center, and have those consumers append the fallbacks themselves. I don't like this because it would require signficant extension in every consumer. So in the end I think this should be implemented in localed, but as a new d-bus method:
org.freedesktop.locale1.SetLocaleWithFallback( in as locale, in b add_fallback, in b user_interaction);
This would be like SetLocale, but if LANGUAGE is set, it would be extended with fallback from a table carried by systemd-localed. If LANG was set, but not LANGUAGE, LANGUAGE including fallbacks would be added.
All the clients would have to be modified. In case of localectl this would be relatively simple patch to add --no-fallback and to flip set-locale to use SetLocaleWithFallback by default, and SetLocale with the option.
Higher level like desktop environments would simply switch over to SetLocaleWithFallback.
I'd be happy to implement this scheme, but I'd like to have some confirmation that this would be useful from interested/knowledgeable people.