Skip to content

Commit

Permalink
chore(faq): translate english interface (not faq content)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinux committed May 16, 2024
1 parent 64de0cb commit a41ba20
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/faq/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/views/faq/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 46 additions & 0 deletions config/locales/faqs.en.yml
Original file line number Diff line number Diff line change
@@ -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?

0 comments on commit a41ba20

Please sign in to comment.