Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] util: detect incorrect locale_dirs path #9176

Merged
merged 1 commit into from May 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion sphinx/util/i18n.py
Expand Up @@ -91,8 +91,11 @@ def locale_dirs(self) -> Generator[str, None, None]:

for locale_dir in self._locale_dirs:
locale_dir = path.join(self.basedir, locale_dir)
if path.exists(path.join(locale_dir, self.language, 'LC_MESSAGES')):
locale_path = path.join(locale_dir, self.language, 'LC_MESSAGES')
if path.exists(locale_path):
yield locale_dir
else:
logger.verbose(__('locale_dir %s does not exists'), locale_path)

@property
def pofiles(self) -> Generator[Tuple[str, str], None, None]:
Expand Down