mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use pathlib in `sphinx.transforms.i18n
`
This commit is contained in:
parent
5b1dc828ca
commit
e8db4379d4
@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import os.path
|
||||
from re import DOTALL, match
|
||||
from textwrap import indent
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
@ -394,10 +393,8 @@ class Locale(SphinxTransform):
|
||||
textdomain = docname_to_domain(self.env.docname, self.config.gettext_compact)
|
||||
|
||||
# fetch translations
|
||||
dirs = [
|
||||
os.path.join(self.env.srcdir, directory)
|
||||
for directory in self.config.locale_dirs
|
||||
]
|
||||
srcdir = self.env.srcdir
|
||||
dirs = [srcdir / directory for directory in self.config.locale_dirs]
|
||||
catalog, has_catalog = init_locale(dirs, self.config.language, textdomain)
|
||||
if not has_catalog:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user