mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixed docname resolution.
This commit is contained in:
parent
38e1e7770f
commit
fda1d0985a
@ -191,7 +191,8 @@ class Locale(Transform):
|
||||
env = self.document.settings.env
|
||||
settings, source = self.document.settings, self.document['source']
|
||||
# XXX check if this is reliable
|
||||
docname = posixpath.splitext(posixpath.basename(source))[0]
|
||||
assert source.startswith(env.srcdir)
|
||||
docname = posixpath.splitext(source[len(env.srcdir):].lstrip('/'))[0]
|
||||
section = docname.split(SEP, 1)[0]
|
||||
|
||||
# fetch translations
|
||||
|
Loading…
Reference in New Issue
Block a user