phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 3 forks source link

Localize pipeline mailer #571

Closed ksierks closed 5 months ago

ksierks commented 5 months ago

What does this PR do and why?

Localized the pipeline mailer.

Screenshots or screen recordings

Pipeline completed email in English: image Pipeline completed email in French: image Pipeline errored email in English: image Pipeline errored email in French: image

How to set up and validate locally

  1. Install local mock email service, Mailhog.
  2. After setup, open a terminal and run ~/go/bin/MailHog.
  3. Run irida-next.
  4. Open a rails console.
  5. Select a workflow execution. w = WorkflowExecution.first
  6. Make sure email notifications are enabled. w.email_notification = true
  7. Set submitter locale: w.submitter.locale = :en
  8. Change state to completed or error. w.state = "completed"
  9. Save the workflow execution. w.save
  10. Open a browser and navigate to http://0.0.0.0:8025/. Check mock email service for sent email.
  11. Repeat steps for locale :fr.

Note: Email previews are located at http://localhost:3000/rails/mailers/pipeline_mailer. Try changing the locale drop-down.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 5 months ago

Simplecov Report

Covered Threshold
92.25% 90%