From 5745923007b97b941848c602f75a0f499407890c Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Mon, 17 Jun 2024 12:16:39 +0200 Subject: [PATCH] Add hreflang=fr attribute to links pointing to French content --- app/views/root/_footer.html.haml | 18 +++++++++--------- .../shared/_footer_content_list.html.haml | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/views/root/_footer.html.haml b/app/views/root/_footer.html.haml index 17866aab8..224289bc2 100644 --- a/app/views/root/_footer.html.haml +++ b/app/views/root/_footer.html.haml @@ -7,7 +7,7 @@ %h3.fr-footer__top-cat= t("links.footer.top_labels.communication") %ul.fr-footer__top-list %li - = link_to t("links.footer.releases.label"), t("links.footer.releases.url"), title: t("links.footer.releases.title"), class: "fr-footer__top-link" + = link_to t("links.footer.releases.label"), t("links.footer.releases.url"), title: t("links.footer.releases.title"), class: "fr-footer__top-link", hreflang: "fr" %li = link_to t("links.footer.contact.label"), contact_path, title: t("links.footer.contact.title"), class: "fr-footer__top-link" .fr-col-12.fr-col-sm-3.fr-col-md-3 @@ -16,35 +16,35 @@ %li = link_to t("links.footer.mentions_legales.label"), MENTIONS_LEGALES_URL, title: t("links.footer.mentions_legales.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" %li - = link_to t("links.footer.suivi.label"), suivi_path, title: t("links.footer.suivi.title"), class: "fr-footer__top-link" + = link_to t("links.footer.suivi.label"), suivi_path, title: t("links.footer.suivi.title"), class: "fr-footer__top-link", hreflang: "fr" %li - = link_to t("links.footer.stats.label"), stats_path, title: t("links.footer.stats.title"), class: "fr-footer__top-link" + = link_to t("links.footer.stats.label"), stats_path, title: t("links.footer.stats.title"), class: "fr-footer__top-link", hreflang: "fr" %li = link_to t("links.footer.carte.label"), carte_path, title: t("links.footer.carte.title"), class: "fr-footer__top-link" %li - %a{ :href => t("links.footer.cgu.url"), :class => "fr-footer__top-link", :rel => "noopener noreferrer" } + %a{ :href => t("links.footer.cgu.url"), :class => "fr-footer__top-link", :rel => "noopener noreferrer", :hreflang => "fr" } %abbr{ title: t("links.footer.cgu.title") } = t("links.footer.cgu.label") .fr-col-12.fr-col-sm-3.fr-col-md-3 %h3.fr-footer__top-cat= t("links.footer.top_labels.resources") %ul.fr-footer__top-list %li - = link_to t("links.footer.doc.label"), t("links.footer.doc.url"), title: t("links.footer.doc.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" + = link_to t("links.footer.doc.label"), t("links.footer.doc.url"), title: t("links.footer.doc.title"), class: "fr-footer__top-link", rel: "noopener noreferrer", hreflang: "fr" %li - = link_to t("links.footer.api_doc.label"), t("links.footer.api_doc.url"), title: t("links.footer.api_doc.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" + = link_to t("links.footer.api_doc.label"), t("links.footer.api_doc.url"), title: t("links.footer.api_doc.title"), class: "fr-footer__top-link", rel: "noopener noreferrer", hreflang: "fr" %li %a{ :href => t("links.common.faq.url"), :class => "fr-footer__top-link", :rel => "noopener noreferrer" } %abbr{ title: t("links.common.faq.title") } = t("links.common.faq.label") %li - = link_to t("links.footer.code.label"), t("links.footer.code.url"), title: t("links.footer.code.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" + = link_to t("links.footer.code.label"), t("links.footer.code.url"), title: t("links.footer.code.title"), class: "fr-footer__top-link", rel: "noopener noreferrer", hreflang: "fr" .fr-col-12.fr-col-sm-3.fr-col-md-3 %h3.fr-footer__top-cat= t("links.footer.top_labels.diagnostic") %ul.fr-footer__top-list %li - = link_to t("links.footer.status_page.label"), t("links.footer.status_page.url"), title: t("links.footer.status_page.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" + = link_to t("links.footer.status_page.label"), t("links.footer.status_page.url"), title: t("links.footer.status_page.title"), class: "fr-footer__top-link", rel: "noopener noreferrer", hreflang: "fr" %li - = link_to t("links.footer.security.label"), t("links.footer.security.url"), title: t("links.footer.security.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" + = link_to t("links.footer.security.label"), t("links.footer.security.url"), title: t("links.footer.security.title"), class: "fr-footer__top-link", rel: "noopener noreferrer", hreflang: "fr" .fr-container .fr-footer__body .fr-footer__brand.fr-enlarge-link{ lang: "fr" } diff --git a/app/views/shared/_footer_content_list.html.haml b/app/views/shared/_footer_content_list.html.haml index ed162a378..af1f5f533 100644 --- a/app/views/shared/_footer_content_list.html.haml +++ b/app/views/shared/_footer_content_list.html.haml @@ -1,9 +1,9 @@ %ul.fr-footer__content-list %li.fr-footer__content-item - = link_to t('users.procedure_footer.official_links.legifrance.title'), t('users.procedure_footer.official_links.legifrance.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.legifrance.title')), class: 'fr-footer__content-link', **external_link_attributes + = link_to t('users.procedure_footer.official_links.legifrance.title'), t('users.procedure_footer.official_links.legifrance.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.legifrance.title')), class: 'fr-footer__content-link', hreflang: 'fr', **external_link_attributes %li.fr-footer__content-item - = link_to t('users.procedure_footer.official_links.gouvernement.title'), t('users.procedure_footer.official_links.gouvernement.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.gouvernement.title')), class: 'fr-footer__content-link', **external_link_attributes + = link_to t('users.procedure_footer.official_links.gouvernement.title'), t('users.procedure_footer.official_links.gouvernement.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.gouvernement.title')), class: 'fr-footer__content-link', hreflang:'fr', **external_link_attributes %li.fr-footer__content-item - = link_to t('users.procedure_footer.official_links.service_public.title'), t('users.procedure_footer.official_links.service_public.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.service_public.title')), class: 'fr-footer__content-link', **external_link_attributes + = link_to t('users.procedure_footer.official_links.service_public.title'), t('users.procedure_footer.official_links.service_public.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.service_public.title')), class: 'fr-footer__content-link', hreflang:'fr', **external_link_attributes %li.fr-footer__content-item - = link_to t('users.procedure_footer.official_links.data_gouv.title'), t('users.procedure_footer.official_links.data_gouv.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.data_gouv.title')), class: 'fr-footer__content-link', **external_link_attributes + = link_to t('users.procedure_footer.official_links.data_gouv.title'), t('users.procedure_footer.official_links.data_gouv.url'), title: new_tab_suffix(t('users.procedure_footer.official_links.data_gouv.title')), class: 'fr-footer__content-link', hreflang:'fr', **external_link_attributes