Commit ef5bc91e authored by Doron Behar's avatar Doron Behar Committed by github-actions[bot]
Browse files

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.

(cherry picked from commit 263297b4)
parent 53efec63
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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")))
    ]