Merge pull request #6459 from tchak/fix-use-locale-in-email-preview

i18n : l'interface technique de prévisualisation des emails permet de les afficher dans la bonne langue (#6459)
This commit is contained in:
Pierre de La Morinerie 2021-09-09 13:14:54 -05:00 committed by GitHub
commit 8590af1e82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,24 +83,28 @@ class DossierMailerPreview < ActionMailer::Preview
"administration@example.com"
end
def user
User.new(email: "usager@example.com", locale: I18n.locale)
end
def deleted_dossier
DeletedDossier.new(dossier_id: 1, procedure: procedure)
end
def draft
Dossier.new(id: 47882, procedure: procedure, user: User.new(email: "usager@example.com"))
Dossier.new(id: 47882, procedure: procedure, user: user)
end
def dossier
Dossier.new(id: 47882, state: :en_instruction, procedure: procedure, user: User.new(email: "usager@example.com"))
Dossier.new(id: 47882, state: :en_instruction, procedure: procedure, user: user)
end
def dossier_en_construction
Dossier.new(id: 47882, state: :en_construction, procedure: procedure, user: User.new(email: "usager@example.com"))
Dossier.new(id: 47882, state: :en_construction, procedure: procedure, user: user)
end
def dossier_accepte
Dossier.new(id: 47882, state: :accepte, procedure: procedure, user: User.new(email: "usager@example.com"))
Dossier.new(id: 47882, state: :accepte, procedure: procedure, user: user)
end
def procedure