File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 66} :
77let
88 aggregatedLocales =
9- builtins . map
9+ ( builtins . map
1010 ( l : ( lib . replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l ) + "/UTF-8" )
1111 (
1212 [ config . i18n . defaultLocale ]
13- ++ config . i18n . extraLocales
13+ ++ ( lib . optionals ( builtins . isList config . i18n . extraLocales ) config . i18n . extraLocales )
1414 ++ ( lib . attrValues ( lib . filterAttrs ( n : v : n != "LANGUAGE" ) config . i18n . extraLocaleSettings ) )
15- ) ;
15+ )
16+ )
17+ ++ ( lib . optional ( builtins . isString config . i18n . extraLocales ) config . i18n . extraLocales ) ;
1618in
1719{
1820 ###### interface
5355 } ;
5456
5557 extraLocales = lib . mkOption {
56- type = lib . types . listOf lib . types . str ;
58+ type = lib . types . either ( lib . types . listOf lib . types . str ) ( lib . types . enum [ "all" ] ) ;
5759 default = [ ] ;
5860 example = [ "nl_NL.UTF-8" ] ;
5961 description = ''
6062 Additional locales that the system should support, besides the ones
6163 configured with {option}`i18n.defaultLocale` and
6264 {option}`i18n.extraLocaleSettings`.
65+ Set this to `"all"` to install all available locales.
6366 '' ;
6467 } ;
6568
108111
109112 config = {
110113 warnings =
111- lib . optional ( ( lib . subtractLists config . i18n . supportedLocales aggregatedLocales ) != [ ] )
114+ lib . optional
115+ (
116+ ! (
117+ ( lib . subtractLists config . i18n . supportedLocales aggregatedLocales ) == [ ]
118+ || lib . any ( x : x == "all" ) config . i18n . supportedLocales
119+ )
120+ )
112121 ''
113122 `i18n.supportedLocales` is deprecated in favor of `i18n.extraLocales`,
114123 and it seems you are using `i18n.supportedLocales` and forgot to
You can’t perform that action at this time.
0 commit comments