i18n: refactor admin support locales

This allow i18n-tasks to better detect dynamic keys.
This commit is contained in:
Pierre de La Morinerie 2021-09-16 22:48:35 -05:00
parent f9220891a7
commit 6656d1130b
4 changed files with 54 additions and 42 deletions

View file

@ -13,12 +13,12 @@ class Helpscout::FormAdapter
def self.admin_options
[
[I18n.t(ADMIN_TYPE_QUESTION, scope: [:supportadmin], app_name: APPLICATION_NAME), ADMIN_TYPE_QUESTION],
[I18n.t(ADMIN_TYPE_RDV, scope: [:supportadmin], app_name: APPLICATION_NAME), ADMIN_TYPE_RDV],
[I18n.t(ADMIN_TYPE_SOUCIS, scope: [:supportadmin], app_name: APPLICATION_NAME), ADMIN_TYPE_SOUCIS],
[I18n.t(ADMIN_TYPE_PRODUIT, scope: [:supportadmin]), ADMIN_TYPE_PRODUIT],
[I18n.t(ADMIN_TYPE_DEMANDE_COMPTE, scope: [:supportadmin]), ADMIN_TYPE_DEMANDE_COMPTE],
[I18n.t(ADMIN_TYPE_AUTRE, scope: [:supportadmin]), ADMIN_TYPE_AUTRE]
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_QUESTION], app_name: APPLICATION_NAME), ADMIN_TYPE_QUESTION],
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_RDV], app_name: APPLICATION_NAME), ADMIN_TYPE_RDV],
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_SOUCIS], app_name: APPLICATION_NAME), ADMIN_TYPE_SOUCIS],
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_PRODUIT]), ADMIN_TYPE_PRODUIT],
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_DEMANDE_COMPTE]), ADMIN_TYPE_DEMANDE_COMPTE],
[I18n.t(:question, scope: [:support, :admin, ADMIN_TYPE_AUTRE]), ADMIN_TYPE_AUTRE]
]
end

View file

@ -3,10 +3,10 @@
#contact-form
.container
%h1.new-h1
= t('contact_team', scope: [:supportadmin])
= t('.contact_team')
.description
= t('admin_intro_html', scope: [:supportadmin], contact_path: contact_path)
= t('.admin_intro_html', contact_path: contact_path)
%br
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
@ -14,19 +14,19 @@
- if !user_signed_in?
.contact-champ
= label_tag :email do
= t('pro_mail', scope: [:supportadmin])
= t('.pro_mail')
%span.mandatory *
= text_field_tag :email, params[:email], required: true
.contact-champ
= label_tag :type do
= t('your_question', scope: [:supportadmin])
= t('.your_question')
%span.mandatory *
= select_tag :type, options_for_select(@options, params[:type])
.contact-champ
= label_tag :phone do
= t('pro_phone_number', scope: [:supportadmin])
= t('.pro_phone_number')
= text_field_tag :phone
.contact-champ

View file

@ -33,7 +33,7 @@ en:
<p><a href=%{link_lost_user}>%{link_lost_user}</a></p>"
other:
question: Other topic
supportadmin:
admin:
your_question: Your question
admin_intro_html: "<p>As an administration, you can contact us through this form. We'll answer you as quickly as possibly by e-mail or phone.</p>
<br>
@ -42,9 +42,15 @@ en:
contact_team: Contact our team
pro_phone_number: Professional phone number (direct line)
pro_mail: Professional email address
admin demande rdv: I request an appointment for an online presentation of %{app_name}
admin question: I have a question about %{app_name}
admin soucis: I am facing a technical issue on %{app_name}
admin suggestion produit: I have a suggestion for an evolution
admin demande compte: I want to open an admin account with an Orange, Wanadoo, etc. email
admin autre: Other topic
admin question:
question: I have a question about %{app_name}
admin demande rdv:
question: I request an appointment for an online presentation of %{app_name}
admin soucis:
question: I am facing a technical issue on %{app_name}
admin suggestion produit:
question: I have a suggestion for an evolution
admin demande compte:
question: I want to open an admin account with an Orange, Wanadoo, etc. email
admin autre:
question: Other topic

View file

@ -32,7 +32,7 @@ fr:
<p><a href=%{link_lost_user}>%{link_lost_user}</a></p>"
other:
question: Autre sujet
supportadmin:
admin:
your_question: Votre question
admin_intro_html: "<p>En tant quadministration, vous pouvez nous contactez via ce formulaire. Nous vous répondrons dans les plus brefs délais, par email ou par téléphone.</p>
<br>
@ -42,9 +42,15 @@ fr:
contact_team: Contactez notre équipe
pro_phone_number: Numéro de téléphone professionnel (ligne directe)
pro_mail: Adresse e-mail professionnelle
admin demande rdv: Demande de RDV pour une présentation à distance de %{app_name}
admin question: Jai une question sur %{app_name}
admin soucis: Jai un problème technique avec %{app_name}
admin suggestion produit: Jai une proposition dévolution
admin demande compte: Je souhaite ouvrir un compte administrateur avec un email Orange, Wanadoo, etc.
admin autre: Autre sujet
admin question:
question: Jai une question sur %{app_name}
admin demande rdv:
question: Demande de RDV pour une présentation à distance de %{app_name}
admin soucis:
question: Jai un problème technique avec %{app_name}
admin suggestion produit:
question: Jai une proposition dévolution
admin demande compte:
question: Je souhaite ouvrir un compte administrateur avec un email Orange, Wanadoo, etc.
admin autre:
question: Autre sujet