0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/i18n: Remove special handling of LANGUAGE

Partially revert #179194 which first filtered
`extraLocaleSettings.LANGUAGE`. Indeed this environment variable is
given precedence according to:

https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html

So using it will simply make all other `extraLocaleSettings` be ignored
in practice, but the OS shouldn't ignore it when aggregating the locales
required in general, as this setup should still be legitimate, and it
may even be useful if you wish to set it by default and use `env -u
LANGUAGE` for some programs.
This commit is contained in:
Doron Behar 2025-05-18 18:43:20 +03:00
parent cbbd59e14e
commit 263297b4e5

View file

@ -12,8 +12,6 @@ let
"${config.i18n.defaultLocale}/${config.i18n.defaultCharset}"
]
++ lib.pipe config.i18n.extraLocaleSettings [
# TODO: Explain why is this filter added here...
(lib.filterAttrs (n: v: n != "LANGUAGE"))
(lib.mapAttrs (n: v: (sanitizeUTF8Capitalization v)))
(lib.mapAttrsToList (LCRole: lang: lang + "/" + (config.i18n.localeCharsets.${LCRole} or "UTF-8")))
]