diff options
author | Joris Guyonvarch | 2015-08-12 10:16:59 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-08-12 10:16:59 +0200 |
commit | d985e879e574c770453590791bc35352c2632d01 (patch) | |
tree | 15c4bb98b0f54e8557c6b4cbe527f5dd24cc0a9b /src/server/View/Mail | |
parent | 892a7dd19a92fc18767984e624b8a5026dce61e4 (diff) |
Translating sign in page and mail
Diffstat (limited to 'src/server/View/Mail')
-rw-r--r-- | src/server/View/Mail/SignIn.hs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/server/View/Mail/SignIn.hs b/src/server/View/Mail/SignIn.hs index e11b876..5eb181b 100644 --- a/src/server/View/Mail/SignIn.hs +++ b/src/server/View/Mail/SignIn.hs @@ -14,12 +14,15 @@ import Text.Blaze.Html.Renderer.Text (renderHtml) import Model.Database (User(..)) import qualified Model.Mail as M +import Model.Message.Key +import Model.Message getMail :: User -> Text -> [Text] -> M.Mail getMail user url to = M.Mail - { M.to = to - , M.subject = "Sign in to Shared Cost" + { M.from = (getMessage NoReplyMail) + , M.to = to + , M.subject = (getMessage SignInMailTitle) , M.plainBody = plainBody user url , M.htmlBody = htmlBody user url } @@ -28,19 +31,19 @@ plainBody :: User -> Text -> LT.Text plainBody user url = LT.intercalate "\n" - [ LT.concat ["Hi ", strictToLazy . userName $ user, ","] + [ strictToLazy (getVarMessage [userName user] HiMail) , "" - , "Click to the following link in order to sign in to Shared Cost:" + , strictToLazy (getMessage SignInLinkMail) , strictToLazy url ] htmlBody :: User -> Text -> LT.Text htmlBody user url = renderHtml . docTypeHtml . body $ do - toHtml $ LT.concat ["Hi ", strictToLazy . userName $ user, ","] + toHtml $ strictToLazy (getVarMessage [userName user] HiMail) br br - "Click to the following link in order to sign in to Shared Cost:" + toHtml $ strictToLazy (getMessage SignInLinkMail) br toHtml url |