mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
nixos/i18n: normalise locale codeset names in supportedLocales
This commit is contained in:
parent
49546f4413
commit
cc0d38b58e
@ -53,16 +53,16 @@ with lib;
|
||||
|
||||
supportedLocales = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = builtins.map (l: l + "/UTF-8")
|
||||
(unique (
|
||||
default = unique
|
||||
(builtins.map (l: (replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l) + "/UTF-8") (
|
||||
[
|
||||
"C.UTF-8"
|
||||
config.i18n.defaultLocale
|
||||
] ++ (attrValues (filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
|
||||
));
|
||||
defaultText = literalExpression ''
|
||||
builtins.map (l: l + "/UTF-8")
|
||||
(unique (
|
||||
unique
|
||||
(builtins.map (l: (replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l) + "/UTF-8") (
|
||||
[
|
||||
"C.UTF-8"
|
||||
config.i18n.defaultLocale
|
||||
|
Loading…
Reference in New Issue
Block a user