aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Model')
-rw-r--r--src/server/Model/Mail.hs1
-rw-r--r--src/server/Model/Message/Key.hs9
-rw-r--r--src/server/Model/Message/Translations.hs72
3 files changed, 55 insertions, 27 deletions
diff --git a/src/server/Model/Mail.hs b/src/server/Model/Mail.hs
index 20addee..7c1a6ed 100644
--- a/src/server/Model/Mail.hs
+++ b/src/server/Model/Mail.hs
@@ -10,5 +10,4 @@ data Mail = Mail
, to :: [Text]
, subject :: Text
, plainBody :: LT.Text
- , htmlBody :: LT.Text
} deriving (Eq, Show)
diff --git a/src/server/Model/Message/Key.hs b/src/server/Model/Message/Key.hs
index 3d915b9..4076768 100644
--- a/src/server/Model/Message/Key.hs
+++ b/src/server/Model/Message/Key.hs
@@ -19,8 +19,7 @@ data Key =
| SignInExpired
| SignInInvalid
| SignInMailTitle
- | HiMail
- | SignInLinkMail
+ | SignInMail
| SignInEmailSent
-- Dates
@@ -54,7 +53,13 @@ data Key =
| MoneySymbol
| Punctual
| Monthly
+ | NoMonthlyPayment
| SingularMonthlyCount
| PluralMonthlyCount
+ -- Income
+
+ | Income
+ | NoIncome
+
deriving (Enum, Bounded, Show)
diff --git a/src/server/Model/Message/Translations.hs b/src/server/Model/Message/Translations.hs
index 79d177f..fce979a 100644
--- a/src/server/Model/Message/Translations.hs
+++ b/src/server/Model/Message/Translations.hs
@@ -69,25 +69,35 @@ m l SignInMailTitle =
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 -> "Salut {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 SignInMail =
+ T.intercalate
+ "\n"
+ ( case l of
+ English ->
+ [ "Hi {1},"
+ , ""
+ , T.concat
+ [ "Click to the following link in order to sign in to Shared Cost:"
+ , m l SharedCost
+ , ":"
+ ]
+ , "{2}"
+ , ""
+ , "See you soon!"
+ ]
+ French ->
+ [ "Salut {1},"
+ , ""
+ , T.concat
+ [ "Clique sur le lien suivant pour te connecter à "
+ , m l SharedCost
+ , ":"
+ ]
+ , "{2}"
+ , ""
+ , "À très vite !"
+ ]
+ )
m l SignInEmailSent =
case l of
@@ -210,20 +220,34 @@ m l Monthly =
English -> "Monthly"
French -> "Mensuel"
+m l NoMonthlyPayment =
+ case l of
+ English -> "No monthly payment"
+ French -> "Aucun paiement mensuel"
+
m l SingularMonthlyCount =
T.concat
[ case l of
English -> "{1} monthly payment of {2} "
French -> "{1} paiement mensuel de {2} "
, m l MoneySymbol
- , "."
]
m l PluralMonthlyCount =
T.concat
[ case l of
- English -> "{1} monthly payments totalling {2} "
- French -> "{1} paiements mensuels comptabilisant {2} "
- , m l MoneySymbol
- , "."
+ English -> "{1} monthly payments totalling {2}"
+ French -> "{1} paiements mensuels comptabilisant {2}"
]
+
+m l Income =
+ T.concat
+ [ case l of
+ English -> "You have a monthly net income of {1}"
+ French -> "Votre revenu mensuel net est de {1}"
+ ]
+
+m l NoIncome =
+ case l of
+ English -> "Income not given"
+ French -> "Revenu non renseigné"