From 463e3e15387f731dc1b445ca2f66f4b3ad82bfae Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Tue, 24 Sep 2024 11:05:49 +0200 Subject: [PATCH] improve email wording for transfert with DS account --- app/views/dossier_mailer/notify_transfer.html.haml | 2 +- config/locales/views/dossier_mailer/notify_transfer/en.yml | 4 ++-- config/locales/views/dossier_mailer/notify_transfer/fr.yml | 4 ++-- spec/mailers/dossier_mailer_spec.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/dossier_mailer/notify_transfer.html.haml b/app/views/dossier_mailer/notify_transfer.html.haml index c2e9d083f..6ca8e2998 100644 --- a/app/views/dossier_mailer/notify_transfer.html.haml +++ b/app/views/dossier_mailer/notify_transfer.html.haml @@ -11,7 +11,7 @@ %p - if @user.present? - = t('.transfer_text') + = t('.transfer_text', app_name: Current.application_name) %br = link_to t('.transfer_link'), dossiers_url(statut: 'dossiers-transferes') - else diff --git a/config/locales/views/dossier_mailer/notify_transfer/en.yml b/config/locales/views/dossier_mailer/notify_transfer/en.yml index c32b38d67..a18af441b 100644 --- a/config/locales/views/dossier_mailer/notify_transfer/en.yml +++ b/config/locales/views/dossier_mailer/notify_transfer/en.yml @@ -2,8 +2,8 @@ en: dossier_mailer: notify_transfer: subject: You have a pending transfer request. - transfer_text: "Access the transfer request by clicking on the following link:" - transfer_link: transfer request + transfer_text: "In order to accept or refuse the request you must log in on %{app_name}:" + transfer_link: Acces transfer request no_user_transfer_text: "In order to accept or refuse the request you must have an account:" no_user_transfer_link: Create an account on %{app_name} transfert_multiple: "%{sender} sends you a transfer request for %{count} files." diff --git a/config/locales/views/dossier_mailer/notify_transfer/fr.yml b/config/locales/views/dossier_mailer/notify_transfer/fr.yml index fbbd21d0d..d53e14027 100644 --- a/config/locales/views/dossier_mailer/notify_transfer/fr.yml +++ b/config/locales/views/dossier_mailer/notify_transfer/fr.yml @@ -2,8 +2,8 @@ fr: dossier_mailer: notify_transfer: subject: Vous avez une demande de transfert en attente. - transfer_text: "Accéder à la demande de transfert en cliquant sur le lien suivant :" - transfer_link: demande de transfert + transfer_text: "Afin de pouvoir accepter ou refuser la demande vous devez vous connectez sur %{app_name} :" + transfer_link: accéder à la demande de transfert no_user_transfer_text: "Afin de pouvoir accepter ou refuser la demande vous devez avoir un compte :" no_user_transfer_link: se créer un compte sur %{app_name} transfert_multiple: "%{sender} vous adresse une demande de transfert pour %{count} dossiers." diff --git a/spec/mailers/dossier_mailer_spec.rb b/spec/mailers/dossier_mailer_spec.rb index eb662dd7f..f429220f4 100644 --- a/spec/mailers/dossier_mailer_spec.rb +++ b/spec/mailers/dossier_mailer_spec.rb @@ -333,7 +333,7 @@ RSpec.describe DossierMailer, type: :mailer do dossier_transfer.update!(email: user_2.email) end it 'includes a direct URL to transfers' do - expect(subject.body).to include('Accéder à la demande de transfert en cliquant sur le lien suivant :') + expect(subject.body).to include('Afin de pouvoir accepter ou refuser la demande vous devez vous connectez sur') expect(subject.body).to include(dossiers_url(statut: 'dossiers-transferes', host: ENV.fetch("APP_HOST_LEGACY"))) end end