about summary refs log tree commit diff
path: root/src/Server.hs
diff options
context:
space:
mode:
author"Vincent Ambo ext:(%22) <tazjin@me.com>2012-02-24T15·06+0100
committer"Vincent Ambo ext:(%22) <tazjin@me.com>2012-02-24T15·06+0100
commit35a5557e17aed86b4a655b4d4e6fe25d1466fd86 (patch)
tree94e245cc595ca7459edb2b463d234f4958dc5265 /src/Server.hs
parenta29a34d41f3101344b46f51a8e5dc5afecf82218 (diff)
* localization moved to Locales.hs
Diffstat (limited to 'src/Server.hs')
-rw-r--r--src/Server.hs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/Server.hs b/src/Server.hs
index 8b513595e00c..764d3c9055aa 100644
--- a/src/Server.hs
+++ b/src/Server.hs
@@ -18,14 +18,11 @@ import qualified Text.Blaze.Html5.Attributes as A
 import           Text.JSON.Generic
 
 import           Blog
+import           Locales
 
 tmpPolicy :: BodyPolicy
 tmpPolicy = (defaultBodyPolicy "./tmp/" 0 1000 1000)
 
-
---TazBlog version
-version = ("2.2b" :: String)
-
 main :: IO()
 main = do
     putStrLn ("TazBlog " ++ version ++ " in Haskell starting")
@@ -33,8 +30,8 @@ main = do
 
 tazBlog :: ServerPart Response
 tazBlog = do
-    msum [ dir "en" $ blogHandler EN
-         , dir "de" $ blogHandler DE
+    msum [ dir (show DE) $ blogHandler DE
+         , dir (show EN) $ blogHandler EN
          , do nullDir
               showIndex DE
          , do dir " " $ nullDir
@@ -68,13 +65,9 @@ showIndex lang = do
     entries <- getLatest lang []
     ok $ toResponse $ renderBlog lang $ renderEntries entries 6 (topText lang)
   where
-    topText EN = "Latest entries"
-    topText DE = "Aktuelle Einträge"
-
 
 renderBlog :: BlogLang -> Html -> Html
-renderBlog DE body = blogTemplate "Tazjins Blog" "Wer mich kontaktieren will: " " oder " version DE body
-renderBlog EN body = blogTemplate "Tazjin's Blog" "Get in touch with me: " " or " version EN body
+renderBlog lang body = blogTemplate lang body
 
 -- http://tazj.in/2012/02/10.155234