diff --git a/conf.py b/conf.py index 19c15010d..dfe22d595 100644 --- a/conf.py +++ b/conf.py @@ -291,6 +291,12 @@ latex_documents = [ 'odoo_partnership_agreement_es.tex', 'Odoo Partnership Agreement (ES)', '', 'howto'), ] +# List of languages that have legal translations (excluding EN). The keys must be in +# `languages_names`. These translations will have a link to their versions of the legal +# contracts, instead of the default EN one. The main legal documents are not part of the +# translations since they have legal meaning. +legal_translations = ['de', 'es', 'fr', 'nl'] + # The name of an image file (relative to this directory) to place at the top of the title page. latex_logo = 'static/img/odoo_logo.png' @@ -397,6 +403,10 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree): ) ) + # Dynamic generation of localized legal doc links + context['legal_translations'] = legal_translations + + def _build_url(_version=None, _lang=None): if app.config.is_remote_build: # Project root like https://www.odoo.com/documentation diff --git a/content/legal/terms/enterprise.rst b/content/legal/terms/enterprise.rst index 98f3d0cf1..608d19ff3 100644 --- a/content/legal/terms/enterprise.rst +++ b/content/legal/terms/enterprise.rst @@ -7,8 +7,7 @@ Odoo Enterprise Subscription Agreement .. only:: html - `Download PDF <../../odoo_enterprise_agreement.pdf>`_ - + `Download PDF `_ .. note:: Version 10a - 2022-10-27 diff --git a/content/legal/terms/i18n/enterprise_de.rst b/content/legal/terms/i18n/enterprise_de.rst index 022f9902d..0b1cf8a2d 100644 --- a/content/legal/terms/i18n/enterprise_de.rst +++ b/content/legal/terms/i18n/enterprise_de.rst @@ -7,7 +7,7 @@ Odoo Enterprise Abonnementsvertrag .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Dies ist eine deutsche Übersetzung des "Odoo Enterprise Subscription Agreement". Diese Übersetzung soll das Verständnis erleichtern, hat aber keinen rechtlichen Wert. Der einzige diff --git a/content/legal/terms/i18n/enterprise_es.rst b/content/legal/terms/i18n/enterprise_es.rst index e9e7e5f3e..3d5c7567a 100644 --- a/content/legal/terms/i18n/enterprise_es.rst +++ b/content/legal/terms/i18n/enterprise_es.rst @@ -7,7 +7,7 @@ Acuerdo de suscripción de Odoo Enterprise .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Esta es una traducción al español del "Odoo Enterprise Subscription Agreement". Esta traducción se proporciona con la esperanza de que facilite la comprensión, pero no tiene diff --git a/content/legal/terms/i18n/enterprise_fr.rst b/content/legal/terms/i18n/enterprise_fr.rst index ce12c5623..344231c37 100644 --- a/content/legal/terms/i18n/enterprise_fr.rst +++ b/content/legal/terms/i18n/enterprise_fr.rst @@ -6,7 +6,7 @@ Odoo Enterprise Subscription Agreement (FR) .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Ceci est une traduction en français du contrat “Odoo Enterprise Subscription Agreement”. Cette traduction est fournie dans l’espoir qu’elle facilitera sa compréhension, mais elle diff --git a/content/legal/terms/i18n/enterprise_nl.rst b/content/legal/terms/i18n/enterprise_nl.rst index 6760ac52a..967e47e2b 100644 --- a/content/legal/terms/i18n/enterprise_nl.rst +++ b/content/legal/terms/i18n/enterprise_nl.rst @@ -7,7 +7,7 @@ Odoo Enterprise Subscription Agreement (NL) .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Dit is een Nederlandse vertaling van de "Odoo Enterprise Subscription Agreement". Deze vertaling wordt verstrekt in de hoop dat deze het begrip zal vergemakkelijken, diff --git a/content/legal/terms/i18n/partnership_es.rst b/content/legal/terms/i18n/partnership_es.rst index 347c13ebc..a21f98933 100644 --- a/content/legal/terms/i18n/partnership_es.rst +++ b/content/legal/terms/i18n/partnership_es.rst @@ -6,7 +6,7 @@ Odoo Partnership Agreement (ES) .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Esta es una traducción al español del "Odoo Partnership Agreement". Esta traducción se proporciona con la esperanza de que facilitará la comprensión, diff --git a/content/legal/terms/i18n/partnership_fr.rst b/content/legal/terms/i18n/partnership_fr.rst index 34d408b3a..1e4f2608a 100644 --- a/content/legal/terms/i18n/partnership_fr.rst +++ b/content/legal/terms/i18n/partnership_fr.rst @@ -6,7 +6,7 @@ Odoo Partnership Agreement (FR) .. only:: html - `Download PDF `_ + `Download PDF `_ .. warning:: Ceci est une traduction en français du contrat “Odoo Partnership Agreement”. Cette traduction est fournie dans l’espoir qu’elle facilitera sa compréhension, mais elle diff --git a/extensions/odoo_theme/layout_templates/legal.html b/extensions/odoo_theme/layout_templates/legal.html index a8fe0c094..355040f70 100644 --- a/extensions/odoo_theme/layout_templates/legal.html +++ b/extensions/odoo_theme/layout_templates/legal.html @@ -36,7 +36,7 @@

{{ _("Applies to self-hosting, Odoo.SH and Odoo Cloud.") }}

{%- set enterprise_agreement_path_en = 'legal/terms/enterprise.html' %} - {%- if language_code == 'en' %} + {%- if language_code not in legal_translations %} {{ _("Read") }} {%- else %} {{ _("Read") }} @@ -55,7 +55,7 @@
{%- set partnership_agreement_path_en = 'legal/terms/partnership.html' %} - {%- if language_code == 'en' %} + {%- if language_code not in legal_translations %} {{ _("Read") }} {%- else %} {{ _("Read") }} @@ -74,7 +74,7 @@
{%- set terms_of_sale_agreement_path_en = 'legal/terms/terms_of_sale.html' %} - {%- if language_code == 'en' %} + {%- if language_code not in legal_translations %} {{ _("Read") }} {%- else %} {{ _("Read") }}