aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Message/Translations.hs
blob: a5de110e791b86379994e7f337e5531cd3098ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
{-# 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@cost.guyonvarch.me"
    French  -> "pas-de-reponse@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é a 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 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
    English -> "We sent you an email with a connexion link."
    French  -> "Nous t'avons envoyé un courriel avec un lien 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 ShortDate =
  case l of
    English -> "{3}-{2}-{1}"
    French  -> "{1}/{2}/{3}"

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

-- Validation

m l CategoryRequired =
  case l of
    English -> "Type a category."
    French  -> "Entre une catégorie."

m l CostRequired =
  case l of
    English -> "Type a cost."
    French  -> "Entre un coût."

m l CostMustBeNonNullNumber =
  case l of
    English -> "The cost must be a non-null integer."
    French  -> "Le coût doit être un entier non nul."

m l IncomeRequired =
  case l of
    English -> "Type an income."
    French  -> "Entre un revenu."

m l IncomeMustBeNonNullNumber =
  case l of
    English -> "The income must be a non-null integer."
    French  -> "Le revenu doit être un entier non nul."

-- Payments

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

m l PaymentNotDeleted =
  case l of
    English -> "The payment could not have been deleted."
    French  -> "Le paiement n'a pas pu être supprimé."

m l MoneySymbol =
  case l of
    English -> "$"
    French  -> "€"

m l Punctual =
  case l of
    English -> "Punctual"
    French  -> "Ponctuel"

m l Monthly =
  case l of
    English -> "Monthly"
    French  -> "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}"
    ]

-- Income

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é"

m l Edit =
  case l of
    English -> "Edit"
    French  -> "Éditer"

m l Validate =
  case l of
    English -> "Validate"
    French  -> "Valider"

m l Undo =
  case l of
    English -> "Undo"
    French  -> "Annuler"

m l NewIncome =
  case l of
    English -> "New income"
    French  -> "Nouveau revenu"