user-record: Add languages field

This field is like preferredLanguage, but takes a priority list of
languages instead. If an app isn't translated into a user's primary
language, it can fall back to one of the other languages in the list
thus making the app more accessible to the user.

For instance: in my experience, many Ukrainians are fluent in Russian,
often significantly better than English (especially if they are of a
generation that grew up during the USSR). Such a person might set this
new variable to ["uk_UA.UTF-8", "ru_UA.UTF-8"] so that software that
lacks Ukrainian translations will first try Russian translations before
defaulting to English.

Fixes #31290
This commit is contained in:
Adrian Vovk
2024-02-13 17:39:14 -05:00
parent fa485e8fc5
commit 49e55abb7f
8 changed files with 199 additions and 39 deletions
+3
View File
@@ -146,6 +146,9 @@ _homectl() {
--cifs-user-name)
comps=$(compgen -A user -- "$cur" )
;;
--language)
comps=$(localectl list-locales 2>/dev/null)
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0