Merge pull request #6405 from betagouv/i18n-signup

Internationalisation de la création du compte
This commit is contained in:
krichtof 2021-08-20 12:18:14 +02:00 committed by GitHub
commit d3cd8dbb12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 12 deletions

View file

@ -65,9 +65,9 @@
- elsif request.path != new_user_session_path - elsif request.path != new_user_session_path
- if request.path == new_user_registration_path - if request.path == new_user_registration_path
%li %li
Vous avez déjà un compte ? = t('views.shared.account.already_user_question')
%li %li
= link_to "Connexion", new_user_session_path, class: "button secondary" = link_to t('views.shared.account.signin'), new_user_session_path, class: "button secondary"
%li %li
- if dossier.present? && nav_bar_profile == :user - if dossier.present? && nav_bar_profile == :user

View file

@ -1 +1 @@
= link_to 'Aide', FAQ_URL, class: 'button primary' = link_to t('help'), FAQ_URL, class: 'button primary'

View file

@ -3,27 +3,27 @@
.auth-form .auth-form
= devise_error_messages! = devise_error_messages!
= form_for resource, url: user_registration_path, html: { class: "form" } do |f| = form_for resource, url: user_registration_path, html: { class: "form" } do |f|
%h1 Créez-vous un compte #{APPLICATION_NAME} %h1= t('views.registrations.new.title', name: APPLICATION_NAME)
= render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path } = render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }
= f.label :email, "Email (nom@site.com)", id: :user_email_label = f.label :email, t('views.registrations.new.email_label'), id: :user_email_label
= f.text_field :email, type: :email, autocomplete: 'email', autofocus: true, placeholder: "Votre adresse email", 'aria-describedby': :user_email_label = f.text_field :email, type: :email, autocomplete: 'email', autofocus: true, placeholder: t('views.registrations.new.email_placeholder'), 'aria-describedby': :user_email_label
.suspect-email.hidden .suspect-email.hidden
.email-suggestion-title .email-suggestion-title
Voulez-vous dire = t('views.registrations.new.wanna_say')
%span.email-suggestion-address blabla@gmail.com %span.email-suggestion-address blabla@gmail.com
 ?  ?
.email-suggestion-answer .email-suggestion-answer
= button_tag type: 'button', class: 'button small', onclick: "DS.acceptEmailSuggestion()" do = button_tag type: 'button', class: 'button small', onclick: "DS.acceptEmailSuggestion()" do
Oui = t('simple_form.yes')
= button_tag type: 'button', class: 'button small', onclick: "DS.discardEmailSuggestionBox()" do = button_tag type: 'button', class: 'button small', onclick: "DS.discardEmailSuggestionBox()" do
Non = t('simple_form.no')
= f.label :password, "Mot de passe (#{PASSWORD_MIN_LENGTH} caractères minimum)", id: :user_password_label = f.label :password, t('views.registrations.new.password_label', min_length: PASSWORD_MIN_LENGTH), id: :user_password_label
= f.password_field :password, autocomplete: 'new-password', value: @user.password, placeholder: "#{PASSWORD_MIN_LENGTH} caractères minimum", 'aria-describedby': :user_password_label = f.password_field :password, autocomplete: 'new-password', value: @user.password, placeholder: t('views.registrations.new.password_placeholder', min_length: PASSWORD_MIN_LENGTH), 'aria-describedby': :user_password_label
= f.submit "Créer un compte", class: "button large primary expand" = f.submit t('views.shared.account.create'), class: "button large primary expand"

View file

@ -30,6 +30,7 @@
# available at http://guides.rubyonrails.org/i18n.html. # available at http://guides.rubyonrails.org/i18n.html.
en: en:
help: 'Help'
utils: utils:
deconnexion: "Log out" deconnexion: "Log out"
pj: "Attachments" pj: "Attachments"
@ -60,6 +61,14 @@ en:
show_my_submitted_file: 'Show my submitted file' show_my_submitted_file: 'Show my submitted file'
want_empty_pdf: "You prefer to submit a paper form? You can download an empty PDF file, and send it to the right administration : %{service} - %{adresse}" want_empty_pdf: "You prefer to submit a paper form? You can download an empty PDF file, and send it to the right administration : %{service} - %{adresse}"
download_empty_pdf: 'Download an empty PDF file' download_empty_pdf: 'Download an empty PDF file'
registrations:
new:
title: "Create an account %{name}"
email_label: 'Email (name@site.com)'
email_placeholder: 'Your email address'
wanna_say: 'Do you mean to say'
password_label: "Password (%{min_length} characters minimum)"
password_placeholder: "%{min_length} characters minimum"
invites: invites:
dropdown: dropdown:
invite_to_edit: Invite someone to edit this file invite_to_edit: Invite someone to edit this file

View file

@ -20,6 +20,7 @@
# available at http://guides.rubyonrails.org/i18n.html. # available at http://guides.rubyonrails.org/i18n.html.
fr: fr:
help: 'Aide'
utils: utils:
deconnexion: "Déconnexion" deconnexion: "Déconnexion"
pj: "Pièces jointes" pj: "Pièces jointes"
@ -49,6 +50,15 @@ fr:
show_my_submitted_file: 'Voir mon dossier déposé' show_my_submitted_file: 'Voir mon dossier déposé'
want_empty_pdf: "Vous souhaitez effectuer une demande par papier ? Vous pouvez télécharger un dossier vide au format PDF, et l'envoyer à ladministration concernée : %{service} - %{adresse}" want_empty_pdf: "Vous souhaitez effectuer une demande par papier ? Vous pouvez télécharger un dossier vide au format PDF, et l'envoyer à ladministration concernée : %{service} - %{adresse}"
download_empty_pdf: 'Télécharger un dossier vide au format PDF' download_empty_pdf: 'Télécharger un dossier vide au format PDF'
registrations:
new:
title: "Créez-vous un compte %{name}"
email_label: 'Email (nom@site.com)'
email_placeholder: 'Votre adresse email'
wanna_say: 'Voulez-vous dire'
password_label: "Mot de passe (%{min_length} caractères minimum)"
password_placeholder: "%{min_length} caractères minimum"
invites: invites:
dropdown: dropdown:

View file

@ -8,5 +8,7 @@ en:
help_link: What is FranceConnect? help_link: What is FranceConnect?
separator: or separator: or
account: account:
already_user_question: 'Do you already have an account?'
already_user: "I already have an account" already_user: "I already have an account"
create: 'Create an account' create: 'Create an account'
signin: 'Sign in'

View file

@ -16,5 +16,7 @@ fr:
help_link: "Quest-ce que FranceConnect ?" help_link: "Quest-ce que FranceConnect ?"
separator: 'ou' separator: 'ou'
account: account:
already_user_question: 'Vous avez déjà un compte ?'
already_user: 'Jai déjà un compte' already_user: 'Jai déjà un compte'
create: 'Créer un compte' create: 'Créer un compte'
signin: 'Connexion'