aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Translation/Message.hs
blob: c9e0fcb2e41271f2ac8e1314e679a7d107709468 (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
module Model.Translation.Message
  ( getMessage
  ) where

import Model.Translation.Language
import Model.Translation.Key

getMessage :: Key -> Language -> String

getMessage Home English = "home"
getMessage Home French = "accueil"

getMessage Resume English = "resume"
getMessage Resume French = "curriculum"

getMessage Projects English = "projects"
getMessage Projects French = "projets"

getMessage Contact English = "contact"
getMessage Contact French = "contact"

getMessage Experience English = "experience"
getMessage Experience French = "expérience"

getMessage EducationalBackground English = "educational background"
getMessage EducationalBackground French = "études"

getMessage Skills English = "skills"
getMessage Skills French = "compétences"

getMessage Interests English = "interests"
getMessage Interests French = "intérêts"

getMessage Since English = "since"
getMessage Since French = "depuis"

getMessage From English = "from"
getMessage From French = "de"

getMessage To English = "to"
getMessage To French = "à"

getMessage And English = "and"
getMessage And French = "et"

getMessage (Month m) English =
  case m of
    1 -> "january"
    2 -> "february"
    3 -> "march"
    4 -> "april"
    5 -> "may"
    6 -> "june"
    7 -> "july"
    8 -> "august"
    9 -> "september"
    10 -> "october"
    11 -> "november"
    12 -> "december"
    _ -> ""
getMessage (Month m) French =
  case m of
    1 -> "janvier"
    2 -> "février"
    3 -> "mars"
    4 -> "avril"
    5 -> "mai"
    6 -> "juin"
    7 -> "juillet"
    8 -> "août"
    9 -> "septembre"
    10 -> "octoble"
    11 -> "novembre"
    12 -> "décembre"
    _ -> ""

getMessage (MonthText count) English = "month" ++ (plural count)
getMessage (MonthText _) French = "mois"

getMessage (YearText count) English = "year" ++ (plural count)
getMessage (YearText count) French = "an" ++ (plural count)

getMessage TryIt English = "Try it!"
getMessage TryIt French = "Voir"

getMessage PageNotFound English = "Page not found."
getMessage PageNotFound French = "La page que vous recherchez n'est pas disponible."

plural :: Int -> String
plural count = if count > 1 then "s" else ""