Commit 56399f5a authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Update send mail to get user requested locale

This updates sendmail to get links and save stats for the user requested
locale. Right now all body translations default to english since we
haven't translated it yet.
parent 277ba71b
......@@ -215,15 +215,15 @@ class Sendmail(object):
locales = strings.get_locales()
locale = locales[language]['locale']
locale = locales['en']['locale']"Getting links for {}.".format(platform))"Getting links for {} {}.".format(platform, language))
links = yield self.conn.get_links(
platform=platform, language=locale, status="ACTIVE"
platform=platform, language=language, status="ACTIVE"
# build message
link_msg, file = self.build_link_strings(links, platform, locale)
link_msg, file = self.build_link_strings(links, platform, language)
body_msg = self.build_body_message(link_msg, platform, file)
subject_msg = strings._("links_subject")
......@@ -241,7 +241,7 @@ class Sendmail(object):
yield self.conn.update_stats(
command="links", platform=platform, language=locale,
command="links", platform=platform, language=language,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment