From 39916e6ed3e298bfbec167e6cd982e3cb76e8cb0 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 27 May 2022 23:42:00 +0100 Subject: [PATCH] Resolve issue 10474 --- sphinx/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sphinx/config.py b/sphinx/config.py index 5f92479d3..7afb65eb3 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -163,6 +163,12 @@ class Config: raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % confdir) namespace = eval_config_file(filename, tags) + + # Resolve https://github.com/sphinx-doc/sphinx/issues/10474 where conf.py + # explicitly sets language to None, by coercing it to English. + if namespace["language"] is None: + namespace["language"] = "en" + return cls(namespace, overrides or {}) def convert_overrides(self, name: str, value: Any) -> Any: