diff --git a/AUTHORS.rst b/AUTHORS.rst index 4646facb231..1bcd48ae779 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -69,6 +69,7 @@ Contributors * Ian Lee -- quickstart improvements * Jacob Mason -- websupport library (GSOC project) * James Addison -- linkcheck and HTML search improvements +* Janne Cederberg -- sphinx.js discovery bug-fix * Jeppe Pihl -- literalinclude improvements * Jeremy Maitin-Shepard -- C++ domain improvements * Joel Wurtz -- cellspanning support in LaTeX diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index 16bf66aa9ce..57a718e06d6 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -190,7 +190,9 @@ def create_build_info(self) -> BuildInfo: def _get_translations_js(self) -> Path | None: for dir_ in self.config.locale_dirs: - js_file = Path(dir_, self.config.language, 'LC_MESSAGES', 'sphinx.js') + js_file = Path( + self.srcdir, dir_, self.config.language, 'LC_MESSAGES', 'sphinx.js' + ) if js_file.is_file(): return js_file