From fb5629d7f705b7e80dcf1852da58d2864c2b0d25 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 19 Jun 2016 01:00:53 +0200 Subject: Show payment count and sum right after search --- src/client/elm/View/Plural.elm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client/elm/View') diff --git a/src/client/elm/View/Plural.elm b/src/client/elm/View/Plural.elm index 727189c..ab91f06 100644 --- a/src/client/elm/View/Plural.elm +++ b/src/client/elm/View/Plural.elm @@ -2,6 +2,10 @@ module View.Plural exposing ( plural ) -plural : Int -> String -> String -> String -plural n single multiple = - (toString n) ++ " " ++ if n <= 1 then single else multiple +import Model.Translations exposing (Translations, getMessage) + +plural : Translations -> Int -> String -> String -> String +plural translations n single multiple = + let singleMessage = getMessage single translations + multipleMessage = getMessage multiple translations + in (toString n) ++ " " ++ if n <= 1 then singleMessage else multipleMessage -- cgit v1.2.3