[MERGE] forward port of 12.0 to 13.0

This commit is contained in:
Martin Trigaux
2021-05-14 16:29:22 +02:00
3 changed files with 28 additions and 129 deletions

View File

@@ -5,6 +5,7 @@ from pathlib import Path
from pygments.lexers import JsonLexer, XmlLexer
from sphinx.util import logging
import sphinx
_logger = logging.getLogger(__name__)
@@ -128,7 +129,13 @@ intersphinx_mapping = {
github_user = 'odoo'
github_project = 'documentation'
locale_dirs = ['locale/']
locale_dirs = ['../locale/']
# custom docname_to_domain to devide the translations of applications in subdirectories
sphinx.transforms.i18n.docname_to_domain = (
sphinx.util.i18n.docname_to_domain
) = lambda docname, compact: docname.split('/')[1 if docname.startswith('applications/') else 0]
supported_languages = {
'de': 'Deutsch',
'en': 'English',