fix: I18n

This commit is contained in:
simon lehericey 2022-11-08 11:08:09 +01:00
parent db3ebfa6d2
commit 33e803cc79
3 changed files with 68 additions and 12 deletions

View file

@ -1,9 +1,11 @@
- content_for(:title, t('.profile'))
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Tableau de bord', tableau_de_bord_helper_path],
['Profil']] }
[t('.profile')]] }
#profil-page.container
%h1 Profil
%h1= t('.profile')
- if @waiting_merge_emails.present?
.card
@ -16,19 +18,19 @@
= link_to 'Accepter la fusion', accept_merge_path, method: :post, class: 'fr-btn fr-btn--secondary', data: { confirm: "Confirmez-vous la fusion des comptes ?" }
.card
.card-title Coordonnées
.card-title= t('.contact')
%p
Votre email est actuellement
= t('.your_email')
%span.email-address= current_user.email
- waiting_email = current_user.unconfirmed_email || current_user.requested_merge_into&.email
- if waiting_email.present?
%p.mb-4
Changement en attente :
= t('.pending_change')
%span.email-address= waiting_email
%br
Pour finaliser votre changement dadresse, vérifiez vos emails et cliquez sur le lien de confirmation.
= t('.finalize_email_change')
- if current_user.instructeur?
%p.mb-4
@ -38,8 +40,8 @@
legit_admin_domains: LEGIT_ADMIN_DOMAINS.join(', '))
= form_for current_user, url: update_email_path, method: :patch, html: { class: 'form' } do |f|
= f.email_field :email, value: nil, placeholder: 'Nouvelle adresse email', required: true
= f.submit "Changer mon adresse", class: 'fr-btn fr-btn--secondary'
= f.email_field :email, value: nil, placeholder: t('.new_email_address'), required: true
= f.submit t('.change_address'), class: 'fr-btn fr-btn--secondary'
- if !instructeur_signed_in?
.card
@ -48,7 +50,7 @@
= form_tag transfer_all_dossiers_path, class: 'form' do
= email_field_tag :next_owner, nil, required: true
= submit_tag "Transférer tous mes dossiers", class: 'fr-btn fr-btn--secondary', data: { confirm: t('.transfer_confirmation') }
= submit_tag t('.transfer_my_files'), class: 'fr-btn fr-btn--secondary', data: { confirm: t('.transfer_confirmation') }
- if @waiting_transfers.present?
.card.warning
@ -85,7 +87,7 @@
- @france_connect_informations.each do |fci|
%li
#{fci.given_name} #{fci.family_name} (#{fci.email_france_connect})
= link_to 'Interdire laccès',
= link_to t('.forbid_access'),
france_connect_information_path(fci_id: fci.id),
method: :delete,
data: { confirm: t('.unlink_confirmation', full_name: fci.full_name) },

View file

@ -0,0 +1,45 @@
en:
users:
profil:
show:
profile: Profile
contact: Contact Information
your_email: Your current email is
new_email_address: New email address
change_address: Change my address
transfer_title: Transfer all your files
transfer_explication_html: "<p>This feature allows you to change the owner of all your files. This is usually useful when changing jobs or if you want to merge several accounts.</p>
<p>Email address of the recipient of all your files</p>"
waiting_transfers: "Pending Transfers :"
one_waiting_transfer:
one: "The new owner %{email} must confirm the transfer of a file by following the instructions received in their email."
other: "The new owner %{email} must confirm the transfer of your %{count} files by following the instructions received in their email."
transfer_confirmation: "Do you accept the transfer?"
transfer_my_files: Transfer all my files
pending_change: 'Pending change:'
finalize_email_change: To finalise your change of email address, check your emails and click on the confirmation link.
email_explications_html: >
<b class="bold">%{application_name}</b> must ensure that your account is used for professional purposes.
<br>
<br>
We can only automatically allow email changes to the following domains:
<br>
%{legit_admin_domains}
<br>
<br>
If this is not the case for you, contact support:
<a href="mailto:%{contact_email}">%{contact_email}</a>
identities:
one: FranceConnect Identity
other: FranceConnect Identities
linked_identities:
one: 'Your account on %{application_name} is currently linked to the following identity:'
other: 'Your account on %{application_name} is currently linked to the following %{count} identities:'
unlink_confirmation: 'the FranceConnect account "%{full_name}" will no longer be able to access your files.'
forbid_access: forbid access
ensure_update_email_is_authorized:
email_not_allowed: "The email %{requested_email} cannot be used, contact support: <a href='mailto:%{contact_email}'>%{contact_email}</a>"
transfer_all_dossiers:
new_transfer:
one: "The transfer of a file to %{email} is in progress"
other: "The transfer of %{count} files to %{email} is in progress"

View file

@ -2,6 +2,11 @@ fr:
users:
profil:
show:
profile: Profil
contact: Coordonnées
new_email_address: Nouvelle adresse email
your_email: Votre email est actuellement
change_address: Changer mon adresse
transfer_title: Transferer tous vos dossiers
transfer_explication_html: "<p>Cette fonctionnalité vous permet de changer le propriétaire de tous vos dossiers. Cest généralement utile lors dun changement de poste ou si vous souhaitez fusionner plusieurs comptes.</p>
<p>Adresse email du destinataire de tous vos dossiers</p>"
@ -10,16 +15,19 @@ fr:
one: "Le nouveau propriétaire %{email} doit confirmer le transfert dun dossier en suivant les instructions reçues dans son mail."
other: "Le nouveau propriétaire %{email} doit confirmer le transfert de vos %{count} dossiers en suivant les instructions reçues dans son mail."
transfer_confirmation: "Confirmez-vous le transfert ?"
transfer_my_files: Transférer tous mes dossiers
pending_change: 'Changement en attente :'
finalize_email_change: Pour finaliser votre changement dadresse, vérifiez vos emails et cliquez sur le lien de confirmation.
email_explications_html: >
<b class="bold">%{application_name}</b> doit sassurer que votre compte est utilisé dans un cadre professionnel.
<br>
<br>
Nous pouvons autoriser automatiquement les changements demail vers les domaines suivants&nbsp;:
Nous pouvons autoriser automatiquement les changements demail vers les domaines suivants :
<br>
%{legit_admin_domains}
<br>
<br>
Si ce nest pas votre cas, contactez le support&nbsp;:
Si ce nest pas votre cas, contactez le support :
<a href="mailto:%{contact_email}">%{contact_email}</a>
identities:
one: Identité FranceConnect
@ -28,6 +36,7 @@ fr:
one: 'Votre compte sur %{application_name} est actuellement lié à lidentité suivante :'
other: 'Votre compte sur %{application_name} est actuellement lié aux %{count} identité suivantes :'
unlink_confirmation: 'le compte FranceConnect « %{full_name} » ne pourra plus accéder à vos dossiers.'
forbid_access: Interdire laccès
ensure_update_email_is_authorized:
email_not_allowed: "Lemail %{requested_email} ne peut être utilisé, contactez le support : <a href='mailto:%{contact_email}'>%{contact_email}</a>"
transfer_all_dossiers: