From 1e47a7754ca38bd1a6c74765d8378caf68ce4619 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 26 Mar 2017 21:10:42 +0200 Subject: Separate client and server watch --- src/client/View/Plural.elm | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/client/View/Plural.elm (limited to 'src/client/View/Plural.elm') diff --git a/src/client/View/Plural.elm b/src/client/View/Plural.elm new file mode 100644 index 0000000..c36eaca --- /dev/null +++ b/src/client/View/Plural.elm @@ -0,0 +1,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 -- cgit v1.2.3