mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/i18n: Re-add special handling of LANGUAGE
This reverts commit 263297b4e5
while also
explaining in the docs where exactly LANGUAGE is ignored, and why.
Fixes #409306.
This commit is contained in:
parent
458f45cef0
commit
82dfbe95f5
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,8 @@ let
|
|||
"${config.i18n.defaultLocale}/${config.i18n.defaultCharset}"
|
||||
]
|
||||
++ lib.pipe config.i18n.extraLocaleSettings [
|
||||
# See description of extraLocaleSettings for why is this ignored 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")))
|
||||
]
|
||||
|
@ -92,6 +94,12 @@ in
|
|||
character set, and it must not be added manually here. To use a
|
||||
non-`UTF-8` character set such as ISO-XXXX-8, the
|
||||
{option}`i18n.localeCharsets` can be used.
|
||||
|
||||
Note that if the [`LANGUAGE`
|
||||
key](https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html)
|
||||
is used in this option, it is ignored when computing the locales
|
||||
required to be installed, because the possible values of this key are
|
||||
more diverse and flexible then the others.
|
||||
'';
|
||||
};
|
||||
localeCharsets = lib.mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue