We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sphinx.transforms.i18n
1 parent 5b1dc82 commit e8db437Copy full SHA for e8db437
sphinx/transforms/i18n.py
@@ -3,7 +3,6 @@
3
from __future__ import annotations
4
5
import contextlib
6
-import os.path
7
from re import DOTALL, match
8
from textwrap import indent
9
from typing import TYPE_CHECKING, Any, TypeVar
@@ -394,10 +393,8 @@ def apply(self, **kwargs: Any) -> None:
394
393
textdomain = docname_to_domain(self.env.docname, self.config.gettext_compact)
395
396
# fetch translations
397
- dirs = [
398
- os.path.join(self.env.srcdir, directory)
399
- for directory in self.config.locale_dirs
400
- ]
+ srcdir = self.env.srcdir
+ dirs = [srcdir / directory for directory in self.config.locale_dirs]
401
catalog, has_catalog = init_locale(dirs, self.config.language, textdomain)
402
if not has_catalog:
403
return
0 commit comments