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 {
|
supportedLocales = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = builtins.map (l: l + "/UTF-8")
|
default = unique
|
||||||
(unique (
|
(builtins.map (l: (replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l) + "/UTF-8") (
|
||||||
[
|
[
|
||||||
"C.UTF-8"
|
"C.UTF-8"
|
||||||
config.i18n.defaultLocale
|
config.i18n.defaultLocale
|
||||||
] ++ (attrValues (filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
|
] ++ (attrValues (filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
|
||||||
));
|
));
|
||||||
defaultText = literalExpression ''
|
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"
|
"C.UTF-8"
|
||||||
config.i18n.defaultLocale
|
config.i18n.defaultLocale
|
||||||
|
|
Loading…
Reference in a new issue