Look for translations in the system default path as well, for distributions that install the catalogs there.

This commit is contained in:
Georg Brandl 2009-05-17 12:34:45 +02:00
parent d132ef67a5
commit c0e848f0db
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,9 @@
Release 0.6.2 (in development)
==============================
* Look for Sphinx message catalogs in the system default path before
trying ``sphinx/locale``.
* Fix the search for methods via "classname.methodname".
* #155: Fix Python 2.4 compatibility: exceptions are old-style

View File

@ -176,7 +176,8 @@ class Builder(object):
if self.config.language is not None:
self.info(bold('loading translations [%s]... ' %
self.config.language), nonl=True)
locale_dirs = [path.join(package_dir, 'locale')] + \
# the None entry is the system's default locale path
locale_dirs = [None, path.join(package_dir, 'locale')] + \
[path.join(self.srcdir, x) for x in self.config.locale_dirs]
for dir_ in locale_dirs:
try: