- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.3k
 
Closed
Description
Describe the bug
sphinx-build searches for translation files in the directory 'locale', even though
locale_dirs conf value defaults to 'locales' since Sphinx 1.5, as per changelog entry.
This causes weird behaviors like sphinx-intl looking for translations in 'locales' (sphinx-doc/sphinx-intl#14), but sphinx-build builds translated docs using translations from 'locale'.
Related code (I think, not sure though):
Line 321 in a1510de
| locale_dirs += [path.join(package_dir, 'locale')] | 
Line 217 in a1510de
| 'locale_dirs': _Opt(['locales'], 'env', ()), | 
How to Reproduce
# Get sphinx and sphinx-doc-translations sources
git clone --single-branch --depth 1 --branch 3.13 https://github.com/python/cpython
git clone --single-branch --depth 1 --branch 3.13 https://github.com/python/python-docs-pt-br cpython/Doc/locale/pt_BR/LC_MESSAGES
# Enter sphinx dir
cd cpython/Doc
# Build translated from locale
make html SPHINXOPTS='-Dlanguage=pt_BR'
# and check built files, should be translated
# Now rename directory
mv locale locales
# Again build translated from locale
make html SPHINXOPTS='-Dlanguage=pt_BR'
# and check the built files, which should NOT be translated now.Environment Information
Latest sphinx commit
Sphinx extensions
No response
Additional context
No response