Restore language.disabled config

Fixes #11219
This commit is contained in:
Bjørn Erik Pedersen
2023-07-08 16:16:06 +02:00
parent 0f921ace6f
commit a481942532
3 changed files with 38 additions and 0 deletions

View File

@@ -274,6 +274,14 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
}
disabledLangs[lang] = true
}
for lang, language := range c.Languages {
if language.Disabled {
disabledLangs[lang] = true
if lang == c.DefaultContentLanguage {
return fmt.Errorf("cannot disable default content language %q", lang)
}
}
}
ignoredErrors := make(map[string]bool)
for _, err := range c.IgnoreErrors {