aboutsummaryrefslogtreecommitdiff
path: root/src/client/View
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-11 21:32:10 +0200
committerJoris Guyonvarch2015-08-11 21:32:10 +0200
commit892a7dd19a92fc18767984e624b8a5026dce61e4 (patch)
tree7d59d58d96958e91a4e9114be0effb9ec7a082a8 /src/client/View
parenta3bab4f2a0cc8a6a95753dc91d8e862f40c80dcc (diff)
Showing server sides generated messages from the client
Diffstat (limited to 'src/client/View')
-rw-r--r--src/client/View/Header.elm3
-rw-r--r--src/client/View/Page.elm2
-rw-r--r--src/client/View/SignIn.elm8
3 files changed, 8 insertions, 5 deletions
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" ]