Skip to content

Commit

Permalink
Merge pull request #9176 from mart-e/4-add-warning-i18n
Browse files Browse the repository at this point in the history
[IMP] util: detect incorrect locale_dirs path
  • Loading branch information
tk0miya committed May 8, 2021
2 parents f47bf14 + bda29f1 commit 4b19792
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 4b19792

Please sign in to comment.