From 563bee8fc23a0858f8e6e9711b00c80df8f816ab Mon Sep 17 00:00:00 2001 From: Denis Costa Date: Fri, 23 Sep 2016 12:36:36 -0300 Subject: Adds translation to welcome mail. --- service/pixelated/adapter/welcome_mail.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'service/pixelated/adapter/welcome_mail.py') diff --git a/service/pixelated/adapter/welcome_mail.py b/service/pixelated/adapter/welcome_mail.py index a40e44a4..8d3cdd7a 100644 --- a/service/pixelated/adapter/welcome_mail.py +++ b/service/pixelated/adapter/welcome_mail.py @@ -18,8 +18,10 @@ from email import message_from_file from pixelated.adapter.model.mail import InputMail -def add_welcome_mail(mail_store): - welcome_mail = pkg_resources.resource_filename('pixelated.assets', 'welcome.mail') +def add_welcome_mail(mail_store, language='en-US'): + welcome_mail = pkg_resources.resource_filename( + 'pixelated.assets', + 'welcome.mail.%s' % (language)) with open(welcome_mail) as mail_template_file: mail_template = message_from_file(mail_template_file) -- cgit v1.2.3