From 892a7dd19a92fc18767984e624b8a5026dce61e4 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Tue, 11 Aug 2015 21:32:10 +0200 Subject: Showing server sides generated messages from the client --- src/client/View/Header.elm | 3 ++- src/client/View/Page.elm | 2 +- src/client/View/SignIn.elm | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/client/View') diff --git a/src/client/View/Header.elm b/src/client/View/Header.elm index 788a473..1738d71 100644 --- a/src/client/View/Header.elm +++ b/src/client/View/Header.elm @@ -11,6 +11,7 @@ import ServerCommunication exposing (serverCommunications) import Model exposing (Model) import Model.View exposing (..) +import Model.Translations exposing (getMessage) import View.Icon exposing (renderIcon) @@ -20,7 +21,7 @@ renderHeader model = [] [ h1 [] - [ text "Shared Cost" ] + [ text (getMessage "SharedCost" model.translations) ] , case model.view of LoadingView -> text "" diff --git a/src/client/View/Page.elm b/src/client/View/Page.elm index 59c21a2..f7292ed 100644 --- a/src/client/View/Page.elm +++ b/src/client/View/Page.elm @@ -26,6 +26,6 @@ renderMain model = LoadingView -> renderLoading SignInView signInView -> - renderSignIn signInView + renderSignIn model signInView PaymentView paymentsView -> renderPayments paymentsView diff --git a/src/client/View/SignIn.elm b/src/client/View/SignIn.elm index a790f0a..6fb809d 100644 --- a/src/client/View/SignIn.elm +++ b/src/client/View/SignIn.elm @@ -14,12 +14,14 @@ import Update.SignIn exposing (..) import ServerCommunication as SC import ServerCommunication exposing (serverCommunications) +import Model exposing (Model) import Model.View.SignInView exposing (..) +import Model.Translations exposing (getMessage) import View.Events exposing (onSubmitPrevDefault) -renderSignIn : SignInView -> Html -renderSignIn signInView = +renderSignIn : Model -> SignInView -> Html +renderSignIn model signInView = div [ class "signIn" ] [ H.form @@ -31,7 +33,7 @@ renderSignIn signInView = [] , button [] - [ text "Sign in" ] + [ text (getMessage "SignIn" model.translations)] ] , div [ class "result" ] -- cgit v1.2.3