-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.elm
52 lines (49 loc) · 1.72 KB
/
Main.elm
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
module Main exposing (main)
import Html
import Translation exposing (cldrToArgType, toElm)
main =
Html.div
[]
[ Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "Hello!"
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
, Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "Hello, {name}!"
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
, Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "You have slept {duration, number} seconds."
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
, Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "You have slept {duration, number, long} seconds."
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
, Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "Then they said: {_, delimited, quote, {Hello!}}"
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
, Html.pre []
[ Html.code []
[ toElm cldrToArgType "greeting" "We have met {_, list, and, {Alice} {Bob} {Cindy}}."
|> Maybe.withDefault "could not parse ICU message"
|> Html.text
]
]
]