mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user