Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2020-11-09 21:27:51 +0300
committerDmitry Shachnev <mitya57@gmail.com>2020-11-09 21:37:01 +0300
commitf92989ca6fe4d51f606cfc97610d6e1087b81969 (patch)
tree9837f52df584f9faba3b003580d65f9ea2e50c8f /sphinx/application.py
parent90f6fd90e0e32e6b2e80fa1783dc5f045a2d5de1 (diff)
Put system locale path after the paths specified by configuration
In Debian, we ship the translation data for Sphinx in the default search path, /usr/share/locale/. When a .mo file is present there, it takes priority over the translation files specified by the configuration, so overriding does not work. This makes test_customize_system_message fail.
Diffstat (limited to 'sphinx/application.py')
-rw-r--r--sphinx/application.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/application.py b/sphinx/application.py
index 59ac04b20..9627ac691 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -294,8 +294,8 @@ class Sphinx:
if catalog.domain == 'sphinx' and catalog.is_outdated():
catalog.write_mo(self.config.language)
- locale_dirs = [None] # type: List[Optional[str]]
- locale_dirs += list(repo.locale_dirs)
+ locale_dirs = list(repo.locale_dirs) # type: List[Optional[str]]
+ locale_dirs += [None]
locale_dirs += [path.join(package_dir, 'locale')]
self.translator, has_translation = locale.init(locale_dirs, self.config.language)