{-# LANGUAGE OverloadedStrings #-}

module Model.Message.Translations
  ( getNonFormattedMessage
  ) where

import Data.Text (Text)
import qualified Data.Text as T

import Model.Message.Key
import Model.Message.Lang

getNonFormattedMessage :: Lang -> Key -> Text
getNonFormattedMessage = m

m :: Lang -> Key -> Text

-- Mail

m l NoReplyMail =
  case l of
    English -> "no-reply@shared-cost.guyonvarch.me"
    French  -> "pas-de-reponse@shared-cost.guyonvarch.me"

-- Sign in

m l SharedCost =
  case l of
    English -> "Shared Cost"
    French  -> "Partage des frais"

m l SignIn =
  case l of
    English -> "Sign in"
    French  -> "Connexion"

m l SendEmailFail =
  case l of
    English -> "Sorry, we failed to send you the sign up email."
    French  -> "Désolé, nous n'avons pas pu t'envoyer le courriel de connexion."

m l Unauthorized =
  case l of
    English -> "You are not authorized to sign in."
    French  -> "Tu n'es pas autorisé à te connecter."

m l EnterValidEmail =
  case l of
    English -> "Please enter a valid email address."
    French  -> "Ton courriel n'est pas valide."

m l SignInUsed =
  case l of
    English -> "You already used this link, please sign in again."
    French  -> "Tu as déjà utilisé ce lien, connecte-toi à nouveau."

m l SignInExpired =
  case l of
    English -> "The link expired, please sign in again."
    French  -> "Le lien sur lequel tu as cliqué est expiré, connecte-toi à nouveau."

m l SignInInvalid =
  case l of
    English -> "The link is invalid, please sign in again."
    French  -> "Le lien sur lequel tu as cliqué est invalide, connecte-toi à nouveau."

m l SignInMailTitle =
  case l of
    English -> T.concat ["Sign in to ", m l SharedCost]
    French  -> T.concat ["Connexion à ", m l SharedCost]

m l HiMail =
  case l of
    English -> "Hi {1},"
    French  -> "Bonjour {1},"

m l SignInLinkMail =
  case l of
    English ->
      T.concat
        [ "Click to the following link in order to sign in to Shared Cost:"
        , m l SharedCost
        , ":"
        ]
    French  ->
      T.concat
        [ "Clique sur le lien suivant pour te connecter à "
        , m l SharedCost
        , ":"
        ]

m l SignInEmailSent =
  case l of
    English -> "We sent you an email, please click to the provided link in order to sign in."
    French  -> "Nous t'avons envoyé un courriel, clique sur le lien dans ce mail pour te connecter."

-- Date

m l January =
  case l of
    English -> "January"
    French  -> "Janvier"

m l February =
  case l of
    English -> "February"
    French -> "Février"

m l March =
  case l of
    English -> "March"
    French -> "Mars"

m l April =
  case l of
    English -> "April"
    French -> "Avril"

m l May =
  case l of
    English -> "May"
    French -> "Mai"

m l June =
  case l of
    English -> "June"
    French -> "Juin"

m l July =
  case l of
    English -> "July"
    French -> "Juillet"

m l August =
  case l of
    English -> "August"
    French -> "Août"

m l September =
  case l of
    English -> "September"
    French -> "Septembre"

m l October =
  case l of
    English -> "October"
    French -> "Octoble"

m l November =
  case l of
    English -> "November"
    French -> "Novembre"

m l December =
  case l of
    English -> "December"
    French -> "Décembre"

m l Date =
  case l of
    English -> "{2} {1}, {3}"
    French -> "{1} {2} {3}"

-- Validation

m l CategoryRequired =
  case l of
    English -> "The category is required."
    French -> "La catégorie est requise."

m l CostRequired =
  case l of
    English -> "The cost is required."
    French -> "Le coût est requis."

m l CostMustBeNumber =
  case l of
    English -> "The cost must be a number."
    French -> "Le coût doit être un nombre."

-- Payments

m l Add =
  case l of
    English -> "Add"
    French  -> "Ajouter"