blob: c36eaca5490807b947c7440192c7976ebd4be679 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
module View.Plural exposing
( plural
)
import Model.Translations exposing (Translations, getMessage)
plural : Translations -> Int -> String -> String -> String
plural translations n single multiple =
let singleMessage = getMessage translations single
multipleMessage = getMessage translations multiple
in (toString n) ++ " " ++ if n <= 1 then singleMessage else multipleMessage
|