aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/Translations.elm
diff options
context:
space:
mode:
authorJoris2016-08-21 14:30:40 +0200
committerJoris2016-08-21 14:30:40 +0200
commit75804df1cb231033f94183e41cdf79d36d8f6710 (patch)
tree48b7932285091fdbdaba6d77586859c1e1750ce0 /src/client/elm/Model/Translations.elm
parent3889d21ab58fbbc0134854b95013196a82e8d510 (diff)
downloadbudget-75804df1cb231033f94183e41cdf79d36d8f6710.tar.gz
budget-75804df1cb231033f94183e41cdf79d36d8f6710.tar.bz2
budget-75804df1cb231033f94183e41cdf79d36d8f6710.zip
Show a message if there is an error during a server request
Diffstat (limited to 'src/client/elm/Model/Translations.elm')
-rw-r--r--src/client/elm/Model/Translations.elm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/elm/Model/Translations.elm b/src/client/elm/Model/Translations.elm
index 9499dde..57409b0 100644
--- a/src/client/elm/Model/Translations.elm
+++ b/src/client/elm/Model/Translations.elm
@@ -49,11 +49,11 @@ partDecoderWithTag tag =
-----
-getMessage : String -> Translations -> String
+getMessage : Translations -> String -> String
getMessage = getParamMessage []
-getParamMessage : List String -> String -> Translations -> String
-getParamMessage values key translations =
+getParamMessage : List String -> Translations -> String -> String
+getParamMessage values translations key =
getTranslation key translations
|> Maybe.map (\parts -> String.concat (List.map (replacePart values) parts))
|> withDefault key