3
0
Fork 0
forked from mirrors/nixpkgs

Merge #180368: nixos/i18n: normalise locale names

This commit is contained in:
Vladimír Čunát 2022-07-16 09:01:42 +02:00
commit 7fbdf335d8
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -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