[IMP] documentation: legal page design

Prior to this commit, the terms and conditions were displayed in a table
with all the languages and it was not practical for the futur, with many
more languages.

task-3073198

closes odoo/documentation#3139

X-original-commit: a52a9eef2d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Morgane (morm)
2022-11-28 13:49:53 +00:00
committed by Antoine Vandevenne (anv)
parent 882123671b
commit 10bf041900
18 changed files with 183 additions and 115 deletions

View File

@@ -404,8 +404,9 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
The entry 'language' is added by Sphinx in the rendering context.
"""
_current_lang = app.config.language or 'en'
# Replace the context value by its translated description ("Français" instead of "french")
# Replace the context value by its upper-cased value ("FR" instead of "fr")
context['language'] = languages_names.get(_current_lang)
context['language_code'] = _current_lang
# If the list of languages is not set, assume that the project has no alternate language
_provided_languages = app.config.languages and app.config.languages.split(',') or []