Merge pull request #8401 from adullact/feature/faq-url

Substitution de la variable FAQ_URL par des locales
This commit is contained in:
LeSim 2023-01-11 11:37:30 +01:00 committed by GitHub
commit cc3053e707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 45 additions and 42 deletions

View file

@ -3,9 +3,9 @@ class Helpscout::FormAdapter
def self.options def self.options
[ [
[I18n.t(:question, scope: [:support, :index, TYPE_INFO]), TYPE_INFO, FAQ_CONTACTER_SERVICE_EN_CHARGE_URL], [I18n.t(:question, scope: [:support, :index, TYPE_INFO]), TYPE_INFO, I18n.t("links.common.faq.contacter_service_en_charge_url")],
[I18n.t(:question, scope: [:support, :index, TYPE_PERDU]), TYPE_PERDU, LISTE_DES_DEMARCHES_URL], [I18n.t(:question, scope: [:support, :index, TYPE_PERDU]), TYPE_PERDU, LISTE_DES_DEMARCHES_URL],
[I18n.t(:question, scope: [:support, :index, TYPE_INSTRUCTION]), TYPE_INSTRUCTION, FAQ_OU_EN_EST_MON_DOSSIER_URL], [I18n.t(:question, scope: [:support, :index, TYPE_INSTRUCTION]), TYPE_INSTRUCTION, I18n.t("links.common.faq.ou_en_est_mon_dossier_url")],
[I18n.t(:question, scope: [:support, :index, TYPE_AMELIORATION]), TYPE_AMELIORATION, FEATURE_UPVOTE_URL], [I18n.t(:question, scope: [:support, :index, TYPE_AMELIORATION]), TYPE_AMELIORATION, FEATURE_UPVOTE_URL],
[I18n.t(:question, scope: [:support, :index, TYPE_AUTRE]), TYPE_AUTRE] [I18n.t(:question, scope: [:support, :index, TYPE_AUTRE]), TYPE_AUTRE]
] ]

View file

@ -51,7 +51,7 @@
= render partial: 'shared/help/help_dropdown_instructeur' = render partial: 'shared/help/help_dropdown_instructeur'
- else - else
// NB: on mobile in order to have links correctly aligned, we need a left icon // NB: on mobile in order to have links correctly aligned, we need a left icon
= link_to t('help'), FAQ_URL, class: 'fr-btn fr-icon-questionnaire-line fr-btn--icon-left', title: new_tab_suffix(t('help')), **external_link_attributes = link_to t('help'), t("links.common.faq.url"), class: 'fr-btn fr-icon-questionnaire-line fr-btn--icon-left', title: new_tab_suffix(t('help')), **external_link_attributes

View file

@ -12,4 +12,4 @@
%span.small-simple= t('.are_you_new', app_name: APPLICATION_NAME.gsub("-","‑")).html_safe %span.small-simple= t('.are_you_new', app_name: APPLICATION_NAME.gsub("-","‑")).html_safe
%br %br
%br %br
= link_to t('views.users.sessions.new.find_procedure'), COMMENT_TROUVER_MA_DEMARCHE_URL, title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary", **external_link_attributes = link_to t('views.users.sessions.new.find_procedure'), t("links.common.faq.comment_trouver_ma_demarche_url"), title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary", **external_link_attributes

View file

@ -28,7 +28,7 @@
%li.fr-footer__top-link %li.fr-footer__top-link
= 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"
%li.fr-footer__top-link %li.fr-footer__top-link
= link_to t("links.footer.faq.label"), t("links.footer.faq.url"), title: t("links.footer.faq.title"), class: "fr-footer__top-link", rel: "noopener noreferrer" = link_to t("links.common.faq.label"), t("links.common.faq.url"), title: t("links.common.faq.title"), class: "fr-footer__top-link", rel: "noopener noreferrer"
%li.fr-footer__top-link %li.fr-footer__top-link
= 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"
.fr-col-12.fr-col-sm-3.fr-col-md-3 .fr-col-12.fr-col-sm-3.fr-col-md-3

View file

@ -120,4 +120,4 @@
%h1.cta-panel-title Une question, un problème ? %h1.cta-panel-title Une question, un problème ?
%p.cta-panel-explanation Consultez notre FAQ %p.cta-panel-explanation Consultez notre FAQ
%div %div
= link_to "Voir la FAQ", FAQ_URL, class: "fr-btn fr-btn--lg", **external_link_attributes = link_to "Voir la FAQ", t("links.common.faq.url"), class: "fr-btn fr-btn--lg", **external_link_attributes

View file

@ -23,7 +23,7 @@
%h2= t(".have_a_procedure") %h2= t(".have_a_procedure")
%p.fr-h5= t(".fill_procedure") %p.fr-h5= t(".fill_procedure")
= link_to t(".how_to_find_procedure"), COMMENT_TROUVER_MA_DEMARCHE_URL, class: "fr-btn fr-btn--lg fr-mr-1w fr-mb-2w", title: new_tab_suffix(t(".how_to_find_procedure")), **external_link_attributes = link_to t(".how_to_find_procedure"), t("links.common.faq.comment_trouver_ma_demarche_url"), class: "fr-btn fr-btn--lg fr-mr-1w fr-mb-2w", title: new_tab_suffix(t(".how_to_find_procedure")), **external_link_attributes
= link_to t("views.users.sessions.new.connection"), new_user_session_path, class: "fr-btn fr-btn--secondary fr-btn--lg" = link_to t("views.users.sessions.new.connection"), new_user_session_path, class: "fr-btn fr-btn--secondary fr-btn--lg"
- cache [I18n.locale, "numbers-panel"], expires_in: 3.hours do - cache [I18n.locale, "numbers-panel"], expires_in: 3.hours do
@ -51,7 +51,7 @@
%h2.cta-panel-title= t(".question") %h2.cta-panel-title= t(".question")
%p.cta-panel-explanation= t(".answer_in_faq") %p.cta-panel-explanation= t(".answer_in_faq")
%div %div
= link_to t(".online_help"), FAQ_URL, class: "fr-btn fr-btn--lg", title: new_tab_suffix(t(".online_help")), **external_link_attributes = link_to t(".online_help"), t("links.common.faq.url"), class: "fr-btn fr-btn--lg", title: new_tab_suffix(t(".online_help")), **external_link_attributes
-# We temporarily disable the link to the contact page on the homepage -# We temporarily disable the link to the contact page on the homepage
-# %p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider -# %p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider
-# %div -# %div

View file

@ -4,7 +4,7 @@
- when :not_found - when :not_found
Nous navons pas trouvé détablissement correspondant à ce numéro de SIRET. Nous navons pas trouvé détablissement correspondant à ce numéro de SIRET.
= link_to('Plus dinformations', FAQ_ERREUR_SIRET_URL, target: '_blank', rel: 'noopener') = link_to('Plus dinformations', t("links.common.faq.erreur_siret_url"), **external_link_attributes)
- when :network_error - when :network_error
= t('errors.messages.siret_network_error') = t('errors.messages.siret_network_error')

View file

@ -5,7 +5,7 @@
= t('views.users.dossiers.autosave.draft_explanation') = t('views.users.dossiers.autosave.draft_explanation')
- else - else
= t('views.users.dossiers.autosave.explanation') = t('views.users.dossiers.autosave.explanation')
= link_to t('views.users.dossiers.autosave.more_information'), FAQ_AUTOSAVE_URL, target: '_blank', rel: 'noopener', class: 'autosave-more-infos fr-link fr-link--sm' = link_to t('views.users.dossiers.autosave.more_information'), t("links.common.faq.autosave_url"), class: 'autosave-more-infos fr-link fr-link--sm', **external_link_attributes
%p.autosave-status.succeeded %p.autosave-status.succeeded
%span.autosave-icon.icon.accept %span.autosave-icon.icon.accept
@ -14,7 +14,7 @@
= t('views.users.dossiers.autosave.draft_confirmation') = t('views.users.dossiers.autosave.draft_confirmation')
- else - else
= t('views.users.dossiers.autosave.confirmation') = t('views.users.dossiers.autosave.confirmation')
= link_to t('views.users.dossiers.autosave.more_information'), FAQ_AUTOSAVE_URL, target: '_blank', rel: 'noopener', class: 'autosave-more-infos fr-link fr-link--sm' = link_to t('views.users.dossiers.autosave.more_information'), t("links.common.faq.autosave_url"), class: 'autosave-more-infos fr-link fr-link--sm', **external_link_attributes
%p.autosave-status.failed %p.autosave-status.failed
%span.autosave-icon ⚠️ %span.autosave-icon ⚠️

View file

@ -1,5 +1,5 @@
%li %li
= link_to FAQ_URL, title: new_tab_suffix(t('help_dropdown.general_title')), **external_link_attributes do = link_to t("links.common.faq.url"), title: new_tab_suffix(t('help_dropdown.general_title')), **external_link_attributes do
%span.icon.help %span.icon.help
.dropdown-description .dropdown-description
%span.help-dropdown-title %span.help-dropdown-title

View file

@ -34,5 +34,5 @@
%p %p
Vous pouvez également consulter notre Vous pouvez également consulter notre
= link_to('FAQ', FAQ_EMAIL_NON_RECU_URL, title: new_tab_suffix('FAQ'), **external_link_attributes) = link_to(t("links.common.faq.label"), t("links.common.faq.email_non_recu_url"), title: new_tab_suffix(t("links.common.faq.title")), **external_link_attributes)
\. \.

View file

@ -15,6 +15,6 @@
%section.link-sent-help %section.link-sent-help
%p %p
Si vous voyez cette page trop souvent, consultez notre aide : #{link_to FAQ_CONFIRMER_COMPTE_CHAQUE_CONNEXION_URL, FAQ_CONFIRMER_COMPTE_CHAQUE_CONNEXION_URL, target: '_blank', rel: 'noopener' } Si vous voyez cette page trop souvent, consultez notre aide : #{link_to t("links.common.faq.confirmer_compte_chaque_connexion_url"), **external_link_attributes}
%p %p
= t('views.users.shared.contact_us_if_any_trouble_html', href: contact_admin_url) = t('views.users.shared.contact_us_if_any_trouble_html', href: contact_admin_url)

View file

@ -39,9 +39,6 @@ DS_ENV="staging"
# Instance customization: URL of the documentation website # Instance customization: URL of the documentation website
# DOC_URL="https://doc.demarches-simplifiees.fr" # DOC_URL="https://doc.demarches-simplifiees.fr"
# Instance customization: URL of the documentation support website
# FAQ_URL="https://faq.demarches-simplifiees.fr"
# Instance customization: URL of the accessibility statement # Instance customization: URL of the accessibility statement
# ACCESSIBILITE_URL="" # ACCESSIBILITE_URL=""

View file

@ -37,16 +37,6 @@ ARCHIVAGE_DOC_URL = [DOC_URL, "pour-aller-plus-loin", "archivage-longue-duree-de
DOC_INTEGRATION_MONAVIS_URL = [DOC_URL, "tutoriels", "integration-du-bouton-mon-avis"].join("/") DOC_INTEGRATION_MONAVIS_URL = [DOC_URL, "tutoriels", "integration-du-bouton-mon-avis"].join("/")
DOC_PROCEDURE_EXPIRES_URL = [DOC_URL, "expiration-et-suppression-des-dossiers"].join("/") DOC_PROCEDURE_EXPIRES_URL = [DOC_URL, "expiration-et-suppression-des-dossiers"].join("/")
FAQ_URL = ENV.fetch("FAQ_URL", "https://faq.demarches-simplifiees.fr")
FAQ_ADMIN_URL = [FAQ_URL, "collection", "1-administrateur-creation-dun-formulaire"].join("/")
FAQ_AUTOSAVE_URL = [FAQ_URL, "article", "77-enregistrer-mon-formulaire-pour-le-reprendre-plus-tard?preview=5ec28ca1042863474d1aee00"].join("/")
COMMENT_TROUVER_MA_DEMARCHE_URL = [FAQ_URL, "article", "59-comment-trouver-ma-demarche"].join("/")
FAQ_CONFIRMER_COMPTE_CHAQUE_CONNEXION_URL = [FAQ_URL, "article", "34-je-dois-confirmer-mon-compte-a-chaque-connexion"].join("/")
FAQ_EMAIL_NON_RECU_URL = [FAQ_URL, "article", "79-je-ne-recois-pas-demail"].join("/")
FAQ_CONTACTER_SERVICE_EN_CHARGE_URL = [FAQ_URL, "article", "12-contacter-le-service-en-charge-de-ma-demarche"].join("/")
FAQ_OU_EN_EST_MON_DOSSIER_URL = [FAQ_URL, "article", "11-je-veux-savoir-ou-en-est-linstruction-de-ma-demarche"].join("/")
FAQ_ERREUR_SIRET_URL = [FAQ_URL, "article", "4-erreur-siret"].join("/")
STATUS_PAGE_URL = ENV.fetch("STATUS_PAGE_URL", "https://status.demarches-simplifiees.fr") STATUS_PAGE_URL = ENV.fetch("STATUS_PAGE_URL", "https://status.demarches-simplifiees.fr")
DEMANDE_INSCRIPTION_ADMIN_PAGE_URL = ENV.fetch("DEMANDE_INSCRIPTION_ADMIN_PAGE_URL", "https://www.demarches-simplifiees.fr/commencer/demande-d-inscription-a-demarches-simplifiees") DEMANDE_INSCRIPTION_ADMIN_PAGE_URL = ENV.fetch("DEMANDE_INSCRIPTION_ADMIN_PAGE_URL", "https://www.demarches-simplifiees.fr/commencer/demande-d-inscription-a-demarches-simplifiees")
MATOMO_IFRAME_URL = ENV.fetch("MATOMO_IFRAME_URL", "https://#{ENV.fetch('MATOMO_HOST', 'stats.data.gouv.fr')}/index.php?module=CoreAdminHome&action=optOut&language=fr&&fontColor=333333&fontSize=16px&fontFamily=Muli") MATOMO_IFRAME_URL = ENV.fetch("MATOMO_IFRAME_URL", "https://#{ENV.fetch('MATOMO_HOST', 'stats.data.gouv.fr')}/index.php?module=CoreAdminHome&action=optOut&language=fr&&fontColor=333333&fontSize=16px&fontFamily=Muli")

View file

@ -4,6 +4,18 @@ en:
provided_by: "la DINUM" provided_by: "la DINUM"
title: "Direction Interministérielle au Numérique" title: "Direction Interministérielle au Numérique"
url: "https://numerique.gouv.fr" url: "https://numerique.gouv.fr"
common:
faq:
label: "FAQ"
title: "Frequently Asked Questions"
url: "https://faq.demarches-simplifiees.fr"
autosave_url: "https://faq.demarches-simplifiees.fr/article/77-enregistrer-mon-formulaire-pour-le-reprendre-plus-tard?preview=5ec28ca1042863474d1aee00"
comment_trouver_ma_demarche_url: "https://faq.demarches-simplifiees.fr/article/59-comment-trouver-ma-demarche"
confirmer_compte_chaque_connexion_url: "https://faq.demarches-simplifiees.fr/article/34-je-dois-confirmer-mon-compte-a-chaque-connexion"
contacter_service_en_charge_url: "https://faq.demarches-simplifiees.fr/article/12-contacter-le-service-en-charge-de-ma-demarche"
email_non_recu_url: "https://faq.demarches-simplifiees.fr/article/79-je-ne-recois-pas-demail"
erreur_siret_url: "https://faq.demarches-simplifiees.fr/article/4-erreur-siret"
ou_en_est_mon_dossier_url: "https://faq.demarches-simplifiees.fr/article/11-je-veux-savoir-ou-en-est-linstruction-de-ma-demarche"
footer: footer:
top_labels: top_labels:
communication: Communication communication: Communication
@ -40,10 +52,6 @@ en:
label: "Documentation" label: "Documentation"
title: "Our Documentation" title: "Our Documentation"
url: "https://doc.demarches-simplifiees.fr" url: "https://doc.demarches-simplifiees.fr"
faq:
label: "FAQ"
title: "Frequently Asked Questions"
url: "https://faq.demarches-simplifiees.fr"
mentions_legales: mentions_legales:
label: "Legal notices" label: "Legal notices"
title: "Legal notices regarding our platform" title: "Legal notices regarding our platform"

View file

@ -4,6 +4,18 @@ fr:
provided_by: "la DINUM" provided_by: "la DINUM"
title: "Direction Interministérielle au Numérique" title: "Direction Interministérielle au Numérique"
url: "https://numerique.gouv.fr" url: "https://numerique.gouv.fr"
common:
faq:
label: "FAQ"
title: "Foire aux Questions"
url: "https://faq.demarches-simplifiees.fr"
autosave_url: "https://faq.demarches-simplifiees.fr/article/77-enregistrer-mon-formulaire-pour-le-reprendre-plus-tard?preview=5ec28ca1042863474d1aee00"
comment_trouver_ma_demarche_url: "https://faq.demarches-simplifiees.fr/article/59-comment-trouver-ma-demarche"
confirmer_compte_chaque_connexion_url: "https://faq.demarches-simplifiees.fr/article/34-je-dois-confirmer-mon-compte-a-chaque-connexion"
contacter_service_en_charge_url: "https://faq.demarches-simplifiees.fr/article/12-contacter-le-service-en-charge-de-ma-demarche"
email_non_recu_url: "https://faq.demarches-simplifiees.fr/article/79-je-ne-recois-pas-demail"
erreur_siret_url: "https://faq.demarches-simplifiees.fr/article/4-erreur-siret"
ou_en_est_mon_dossier_url: "https://faq.demarches-simplifiees.fr/article/11-je-veux-savoir-ou-en-est-linstruction-de-ma-demarche"
footer: footer:
top_labels: top_labels:
communication: Communication communication: Communication
@ -43,10 +55,6 @@ fr:
label: "Documentation" label: "Documentation"
title: "Documentation utilisateur" title: "Documentation utilisateur"
url: "https://doc.demarches-simplifiees.fr" url: "https://doc.demarches-simplifiees.fr"
faq:
label: "FAQ"
title: "Foire aux Questions"
url: "https://faq.demarches-simplifiees.fr"
mentions_legales: mentions_legales:
label: "Mentions légales" label: "Mentions légales"
title: "Consulter nos Mentions légales" title: "Consulter nos Mentions légales"

View file

@ -19,7 +19,7 @@ describe 'Getting help:' do
within('.help-dropdown') do within('.help-dropdown') do
expect(page).to have_content(procedure.service.email) expect(page).to have_content(procedure.service.email)
expect(page).to have_content(procedure.service.telephone) expect(page).to have_content(procedure.service.telephone)
expect(page).to have_link(nil, href: FAQ_URL) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end end
end end
end end
@ -52,7 +52,7 @@ describe 'Getting help:' do
within('.help-dropdown') do within('.help-dropdown') do
expect(page).to have_content(dossier.procedure.service.email) expect(page).to have_content(dossier.procedure.service.email)
expect(page).to have_content(dossier.procedure.service.telephone) expect(page).to have_content(dossier.procedure.service.telephone)
expect(page).to have_link(nil, href: FAQ_URL) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end end
end end
end end
@ -69,7 +69,7 @@ describe 'Getting help:' do
within('.help-dropdown') do within('.help-dropdown') do
expect(page).to have_link(nil, href: messagerie_dossier_path(dossier)) expect(page).to have_link(nil, href: messagerie_dossier_path(dossier))
expect(page).to have_link(nil, href: FAQ_URL) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end end
end end
end end
@ -91,7 +91,7 @@ describe 'Getting help:' do
end end
def have_help_button def have_help_button
have_link('Aide', href: FAQ_URL) have_link('Aide', href: I18n.t("links.common.faq.url"))
end end
def have_help_menu def have_help_menu

View file

@ -23,7 +23,7 @@ describe 'layouts/_header.html.haml', type: :view do
it { is_expected.to_not have_css(".account-btn") } it { is_expected.to_not have_css(".account-btn") }
it 'displays the Help link' do it 'displays the Help link' do
expect(subject).to have_link('Aide', href: FAQ_URL) expect(subject).to have_link('Aide', href: I18n.t("links.common.faq.url"))
end end
context 'when on a procedure page' do context 'when on a procedure page' do
@ -48,7 +48,7 @@ describe 'layouts/_header.html.haml', type: :view do
it { is_expected.to have_selector(:button, user.email, class: "account-btn") } it { is_expected.to have_selector(:button, user.email, class: "account-btn") }
it 'displays the Help button' do it 'displays the Help button' do
expect(subject).to have_link("Aide", href: FAQ_URL) expect(subject).to have_link("Aide", href: I18n.t("links.common.faq.url"))
end end
end end