[locale/blog] Remove unused locale strings

This commit is contained in:
Vincent Ambo 2015-11-21 19:01:05 +01:00
parent 4c961c4ac6
commit a68d6cfa31
2 changed files with 2 additions and 70 deletions

View file

@ -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

View file

@ -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"