diff --git a/app/models/mails/initiated_mail.rb b/app/models/mails/initiated_mail.rb index ab5096e92..9f4efcbd0 100644 --- a/app/models/mails/initiated_mail.rb +++ b/app/models/mails/initiated_mail.rb @@ -17,8 +17,8 @@ module Mails SLUG = "initiated_mail" DEFAULT_TEMPLATE_NAME = "notification_mailer/default_templates/initiated_mail" - DISPLAYED_NAME = 'Accusé de réception' - DEFAULT_SUBJECT = 'Votre dossier nº --numéro du dossier-- a bien été déposé (--libellé démarche--)' + DISPLAYED_NAME = I18n.t('activerecord.models.mail.initiated_mail.proof_of_receipt') + DEFAULT_SUBJECT = I18n.t('activerecord.models.mail.initiated_mail.default_subject', dossier_number: '--numéro du dossier--', procedure_libelle: '--libellé démarche--') DOSSIER_STATE = Dossier.states.fetch(:en_construction) end end diff --git a/app/models/mails/received_mail.rb b/app/models/mails/received_mail.rb index 05c422d6b..3eb4ecbfe 100644 --- a/app/models/mails/received_mail.rb +++ b/app/models/mails/received_mail.rb @@ -17,8 +17,8 @@ module Mails SLUG = "received_mail" DEFAULT_TEMPLATE_NAME = "notification_mailer/default_templates/received_mail" - DISPLAYED_NAME = 'Accusé de passage en instruction' - DEFAULT_SUBJECT = 'Votre dossier nº --numéro du dossier-- va être examiné (--libellé démarche--)' + DISPLAYED_NAME = I18n.t('activerecord.models.mail.received_mail.under_instruction') + DEFAULT_SUBJECT = I18n.t('activerecord.models.mail.received_mail.default_subject', dossier_number: '--numéro du dossier--', procedure_libelle: '--libellé démarche--') DOSSIER_STATE = Dossier.states.fetch(:en_instruction) end end diff --git a/app/views/layouts/mailers/_service_footer.html.haml b/app/views/layouts/mailers/_service_footer.html.haml index 0b5b6d90d..c5e5a3958 100644 --- a/app/views/layouts/mailers/_service_footer.html.haml +++ b/app/views/layouts/mailers/_service_footer.html.haml @@ -1,16 +1,17 @@ %strong - Merci de ne pas répondre à cet email. + = t('.do_not_reply') - if dossier.present? && dossier.messagerie_available? - Pour vous adresser à votre administration, passez directement par la + = t('.contact_admin') = succeed '.' do - = link_to 'messagerie du dossier', messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener' + = link_to t('.file_messagerie'), messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener' - if service.present? %table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0", style: "cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;text-align:left;" } %tr %td{ width: "50%", valign: "top" } %p - %strong Cette démarche est gérée par : + %strong + = t('.procedure_management') %br = service.nom %br @@ -19,17 +20,15 @@ = service.adresse %td{ width: "50%", valign: "top" } %p - %strong Poser une question sur votre dossier : + %strong + = t('.ask_question') %br - if dossier.present? && dossier.messagerie_available? - = link_to 'Par la messagerie', messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener' + = link_to t('.by_messagerie'), messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener' - else - Par email : + = t('.by_email') = link_to service.email, "mailto:#{service.email}" - if service.telephone_url.present? - %br - Par téléphone : + %br= t('.by_phone') = link_to service.telephone, service.telephone_url - %br - Horaires : #{ formatted_horaires(service.horaires) } - + %br= "#{t('.schedule')} #{ formatted_horaires(service.horaires) }" diff --git a/config/locales/models/mail/initiated_mail/en.yml b/config/locales/models/mail/initiated_mail/en.yml new file mode 100644 index 000000000..c58a99922 --- /dev/null +++ b/config/locales/models/mail/initiated_mail/en.yml @@ -0,0 +1,7 @@ +en: + activerecord: + models: + mail: + initiated_mail: + default_subject: Your file nº %{dossier_number} has been successfully submitted (%{procedure_libelle}) + proof_of_receipt: Acknowledgment of receipt diff --git a/config/locales/models/mail/initiated_mail/fr.yml b/config/locales/models/mail/initiated_mail/fr.yml new file mode 100644 index 000000000..25a85492d --- /dev/null +++ b/config/locales/models/mail/initiated_mail/fr.yml @@ -0,0 +1,7 @@ +fr: + activerecord: + models: + mail: + initiated_mail: + default_subject: Votre dossier nº %{dossier_number} a bien été déposé (%{procedure_libelle}) + proof_of_receipt: Accusé de réception diff --git a/config/locales/models/mail/received_mail/en.yml b/config/locales/models/mail/received_mail/en.yml new file mode 100644 index 000000000..bf9b55f49 --- /dev/null +++ b/config/locales/models/mail/received_mail/en.yml @@ -0,0 +1,7 @@ +en: + activerecord: + models: + mail: + received_mail: + default_subject: Your file nº %{dossier_number} will be examined (%{procedure_libelle}) + under_instruction: Acknowledgment of being under instruction diff --git a/config/locales/models/mail/received_mail/fr.yml b/config/locales/models/mail/received_mail/fr.yml new file mode 100644 index 000000000..b0f4494a4 --- /dev/null +++ b/config/locales/models/mail/received_mail/fr.yml @@ -0,0 +1,7 @@ +fr: + activerecord: + models: + mail: + received_mail: + default_subject: Votre dossier nº %{dossier_number} va être examiné (%{procedure_libelle}) + under_instruction: Accusé de passage en instruction diff --git a/config/locales/views/layouts/mailers/en.yml b/config/locales/views/layouts/mailers/en.yml new file mode 100644 index 000000000..4c54b1468 --- /dev/null +++ b/config/locales/views/layouts/mailers/en.yml @@ -0,0 +1,13 @@ +en: + layouts: + mailers: + service_footer: + do_not_reply: Please do not reply to this email. + contact_admin: To contact your administration, go directly to the + file_messagerie: file mailbox + procedure_management: "This procedure is managed by:" + ask_question: "Ask a question about your file:" + by_messagerie: By messaging + by_email: "By email :" + by_phone: "By phone :" + schedule: "Schedule :" diff --git a/config/locales/views/layouts/mailers/fr.yml b/config/locales/views/layouts/mailers/fr.yml new file mode 100644 index 000000000..92e067aac --- /dev/null +++ b/config/locales/views/layouts/mailers/fr.yml @@ -0,0 +1,13 @@ +fr: + layouts: + mailers: + service_footer: + do_not_reply: Merci de ne pas répondre à cet email. + contact_admin: Pour vous adresser à votre administration, passez directement par la + file_messagerie: messagerie du dossier + procedure_management: "Cette démarche est gérée par :" + ask_question: "Poser une question sur votre dossier :" + by_messagerie: Par la messagerie + by_email: "Par email :" + by_phone: "Par téléphone :" + schedule: "Horaires :"