diff --git a/app/views/faq/index.html.haml b/app/views/faq/index.html.haml index a2026b20354..d467388d0f4 100644 --- a/app/views/faq/index.html.haml +++ b/app/views/faq/index.html.haml @@ -7,18 +7,18 @@ %h1= t('.title', app_name: Current.application_name) - @faqs.each do |category, subcategories| - %h2= t(:name, scope: [:faq, :categories, category], raise: true) - %p= t(:description, scope: [:faq, :categories, category], raise: true) + %h2= t(:name, scope: [:faq, :categories, category], raise: true) # i18n-tasks-use t("faq.categories.#{category}.name") + %p= t(:description, scope: [:faq, :categories, category], raise: true) # i18n-tasks-use t("faq.categories.#{category}.description") .fr-accordions-group.fr-mb-6w - subcategories.each_with_index do |(subcategory, faqs), index| %section.fr-accordion %h3.fr-accordion__title %button.fr-accordion__btn{ 'aria-expanded': "false", 'aria-controls': "accordion-#{category}-#{index}" } - = t(:name, scope: [:faq, :subcategories, subcategory], raise: true) + = t(:name, scope: [:faq, :subcategories, subcategory], raise: true) # i18n-tasks-use t("faq.subcategories.#{subcategory}.name") .fr-collapse{ id: "accordion-#{category}-#{index}" } - - description = t(:description, scope: [:faq, :subcategories, subcategory], default: nil) + - description = t(:description, scope: [:faq, :subcategories, subcategory], default: nil) # i18n-tasks-use t("faq.subcategories.#{subcategory}.description") %p= description if description.present? %ul diff --git a/app/views/faq/show.html.haml b/app/views/faq/show.html.haml index b2ff97df6b5..45cfb50fb3c 100644 --- a/app/views/faq/show.html.haml +++ b/app/views/faq/show.html.haml @@ -6,6 +6,7 @@ .fr-col-12.fr-col-md-4 = render partial: "sidebar", locals: { faqs: @siblings, current: @metadata } .fr-col-12.fr-col-md-8 + -# i18n-tasks-use t("faq.categories.#{@metadata[:category]}.short_name") = render partial: "breadcrumb", locals: { faq_title: "#{t(:short_name, scope: [:faq, :categories, @metadata[:category]])} : #{@metadata[:title]}" } .markdown-content diff --git a/config/locales/faqs.en.yml b/config/locales/faqs.en.yml new file mode 100644 index 00000000000..8721ff136d8 --- /dev/null +++ b/config/locales/faqs.en.yml @@ -0,0 +1,46 @@ +en: + faq: + index: + meta_title: "Frequently Asked Questions" + title: Frequently Asked Questions (FAQ) of %{app_name} + sidebar_button: In this FAQ + categories: + usager: + short_name: User + name: User (file application) + description: Help users submit and follow up on files, including resolving common problems. + instructeur: + short_name: Instructor + name: Instructor (file processing) + description: For instructors on accessing and managing files. + administrateur: + short_name: Administrator + name: Administrator (form creation) + description: Information for administrators on configuring the platform or creating procedures. + subcategories: + dossier_technical_issue: + name: I'm encountering a technical problem with my file + find_dossier: + name: I want to find my file + description: What if I can't find my file? + fill_dossier: + name: I want to make a + dossier_state: + name: I want to follow the progress of my application + account: + name: Manage my account + instructeur_account: + name: Login to my account + instruction: + name: Instruction + create_procedure: + name: I want to create an online procedure + description: How do you create a new procedure? + general: + name: General + administrateur_departure: + name: I'm leaving my job + description: Good practices to anticipate before my departure + procedure_test: + name: How to test my form + description: How do you test a new procedure?