Legal terms live under specific URL as their translations are not
managed in the same manner.
Layout is like this:
/terms/enterprise.html (EN)
/terms/i18n/enterprise_fr.html (FR)
This commit adapts the generation of alternative languages links for each
"legal terms page", so that it targets the correct i18n link, or goes
back to the canonical EN one, depending on the target language.
closesodoo/documentation#7382closesodoo/documentation#7384closesodoo/documentation#7387
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
1) PDF files are generated and stored at the root of the CURRENT_BRANCH
directory. The links to those files are generated at different levels of
the doctree, which makes it impossible to use a relative path.
For example the same "Enterprise Agreement" doc in EN is published on:
- /16.0/legal/terms/enterprise.html
- /16.0/fr/legal/terms/enterprise.html
As a workaround, use absolute links for the PDFs. They won't work
locally for now. Can be improved later, as long as we don't break
those links located in various depths of the troctree.
2) The legal constracts aren't translated in all availables languages
(yet), so those links are 404s now. Introduced a conf.py variable
`legal_translations` with the list of languages where translated
contracts are indeed available, and falling back to the EN version
otherwise. Some languages don't have *all* the contracts translated, so
some 404 may remain temporarily.
Forward-port of f69dba70be
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
closesodoo/documentation#3139
X-original-commit: a52a9eef2d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>