diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-04 16:41:44 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-04 16:41:44 +0300 |
commit | 598b85da75bc533004d68b95a5056016dc16df1c (patch) | |
tree | e08eae0ea5f098257f01081e4c792bcfeb92eba6 /sphinx/application.py | |
parent | 11633f2e53bf01f6844256558444991836815690 (diff) | |
parent | 38bb3774643d779b708970f941f2b16d1ab81b89 (diff) |
Merge branch '3.x' into master
Diffstat (limited to 'sphinx/application.py')
-rw-r--r-- | sphinx/application.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index 4a82efcfa..72a8898bf 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -17,7 +17,7 @@ import sys from collections import deque from io import StringIO from os import path -from typing import Any, Callable, Dict, IO, List, Tuple, Type, Union +from typing import Any, Callable, Dict, IO, List, Optional, Tuple, Type, Union from typing import TYPE_CHECKING from docutils import nodes @@ -289,7 +289,10 @@ class Sphinx: if catalog.domain == 'sphinx' and catalog.is_outdated(): catalog.write_mo(self.config.language) - locale_dirs = [None, path.join(package_dir, 'locale')] + list(repo.locale_dirs) + locale_dirs = [None] # type: List[Optional[str]] + locale_dirs += list(repo.locale_dirs) + locale_dirs += [path.join(package_dir, 'locale')] + self.translator, has_translation = locale.init(locale_dirs, self.config.language) if has_translation or self.config.language == 'en': # "en" never needs to be translated |