summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2015-11-21T18·01+0100
committerVincent Ambo <tazjin@gmail.com>2015-11-21T18·01+0100
commita68d6cfa31ca9fa4e2773c5f3e375c21079c358b (patch)
tree08a2b292ba47cdb2a7d4a418f1182c224051ba71
parent4c961c4ac6948f6fed0b6ec420c9e0522d592263 (diff)
[locale/blog] Remove unused locale strings
-rw-r--r--src/Blog.hs2
-rw-r--r--src/Locales.hs70
2 files changed, 2 insertions, 70 deletions
diff --git a/src/Blog.hs b/src/Blog.hs
index 62e7d4575422..a78b911eda16 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -90,7 +90,7 @@ $maybe links <- pageLinks
   ^{links}
 |]
   where
-   toDisplay = if' showAll entries (take 6 entries)
+   toDisplay = if showAll then entries else (take 6 entries)
    linkElems Entry{..} = concat $ intersperse' "/" [show lang, show entryId]
 
 showLinks :: Maybe Int -> BlogLang -> Html
diff --git a/src/Locales.hs b/src/Locales.hs
index 00b2b871d19e..a800bbf847cd 100644
--- a/src/Locales.hs
+++ b/src/Locales.hs
@@ -6,19 +6,10 @@ import           Data.Text   (Text)
 import qualified Data.Text   as T
 import           Network.URI
 
-{- to add a language simply define its abbreviation and Show instance then
- - translate the appropriate strings and add CouchDB views in Server.hs -}
-
 data BlogError = NotFound | UnknownError
 
 version = "5.1-beta"
 
-allLang = [EN, DE]
-
-if' :: Bool -> a -> a -> a
-if' True x _ = x
-if' False _ y = y
-
 blogTitle :: BlogLang -> Text -> Text
 blogTitle DE s = T.concat ["Tazjins blog", s]
 blogTitle EN s = T.concat ["Tazjin's blog", s]
@@ -27,47 +18,6 @@ showLangText :: BlogLang -> Text
 showLangText EN = "en"
 showLangText DE = "de"
 
--- index site headline
-topText DE = "Aktuelle Einträge"
-topText EN = "Latest entries"
-
-getMonth :: BlogLang -> Int -> Int -> Text
-getMonth l y m = T.append (monthName l m) $ T.pack $ show y
-  where
-    monthName :: BlogLang -> Int -> Text
-    monthName DE m = case m of
-                    1  -> "Januar "
-                    2  -> "Februar "
-                    3  -> "März "
-                    4  -> "April "
-                    5  -> "Mai "
-                    6  -> "Juni "
-                    7  -> "Juli "
-                    8  -> "August "
-                    9  -> "September "
-                    10 -> "Oktober "
-                    11 -> "November "
-                    12 -> "Dezember "
-                    _  -> "Unbekannt "
-    monthName EN m = case m of
-                    1  -> "January "
-                    2  -> "February "
-                    3  -> "March "
-                    4  -> "April "
-                    5  -> "May "
-                    6  -> "June "
-                    7  -> "July "
-                    8  -> "August "
-                    9  -> "September "
-                    10 -> "October "
-                    11 -> "November "
-                    12 -> "December "
-                    _  -> "Unknown "
-
-entireMonth :: BlogLang -> Text
-entireMonth DE = "Ganzer Monat"
-entireMonth EN = "Entire month"
-
 backText :: BlogLang -> Text
 backText DE = "Früher"
 backText EN = "Earlier"
@@ -80,24 +30,6 @@ readMore :: BlogLang -> Text
 readMore DE = "[Weiterlesen]"
 readMore EN = "[Read more]"
 
-eTimeFormat :: BlogLang -> String
-eTimeFormat DE = "Geschrieben am %Y-%m-%d von "
-eTimeFormat EN = "Written on %Y-%m-%d by "
-
--- contact information
-contactText :: BlogLang -> Text
-contactText DE = "Wer mich kontaktieren will: "
-contactText EN = "Get in touch with me: "
-
-orText :: BlogLang -> Text
-orText DE = " oder "
-orText EN = " or "
-
--- footer
-noticeText :: BlogLang -> Text
-noticeText EN = "site notice"
-noticeText DE = "Impressum"
-
 -- RSS Strings
 rssTitle :: BlogLang -> String
 rssTitle DE = "Tazjins Blog"
@@ -126,4 +58,4 @@ unknownErrorText EN = "An unknown error has occured."
 -- static information
 repoURL   :: Text = "https://bitbucket.org/tazjin/tazblog-haskell"
 mailTo    :: Text = "mailto:tazjin+blog@gmail.com"
-twitter   :: Text = "http://twitter.com/#!/tazjin"
+twitter   :: Text = "https://twitter.com/tazjin"