[IMP] conf: special case alt lang links for legal terms

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.

closes odoo/documentation#7382

closes odoo/documentation#7384

closes odoo/documentation#7387

Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
This commit is contained in:
Olivier Dony
2024-01-15 01:10:01 +01:00
parent 65f1e3ce0a
commit d0b7363de5
2 changed files with 17 additions and 1 deletions

View File

@@ -40,7 +40,7 @@
<a class="btn btn-primary" href="{{ enterprise_agreement_path_en }}" role="button">{{ _("Read") }}</a>
{%- else %}
<a class="btn btn-primary" href="{{ 'legal/terms/i18n/enterprise_%s.html' % language_code }}" role="button">{{ _("Read") }}</a>
<a class="btn btn-light text-primary" href="{{ enterprise_agreement_path_en }}">{{ _("English") }}</a>
<a class="btn btn-light text-primary" href="../{{ enterprise_agreement_path_en }}">{{ _("English") }}</a>
{%- endif %}
</div>
</div>