about summary refs log tree commit diff
path: root/src/Locales.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@googlemail.com>2012-03-23T23·32+0100
committerVincent Ambo <tazjin@googlemail.com>2012-03-23T23·32+0100
commitefbec9ff76ada0e59f8fc5c37a4c2734ccbf7ce2 (patch)
tree1b61546620799319152f27c08aeefab3321335db /src/Locales.hs
parenta405e185bac6673645d96defb3800b7a18ca351d (diff)
* added RSS.hs: functions to create an RSS feed
* added RSS feed handler
* FromReqURI instance for BlogLang
* fixed RSS-feed link
Diffstat (limited to 'src/Locales.hs')
-rw-r--r--src/Locales.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Locales.hs b/src/Locales.hs
index fc072ed61cb7..589235cea5da 100644
--- a/src/Locales.hs
+++ b/src/Locales.hs
@@ -3,8 +3,11 @@
 module Locales where
 
 import           Data.Data (Data, Typeable)
+import           Data.Maybe (fromMaybe)
 import           Data.Text (Text)
 import qualified Data.Text as T
+import           Network.URI
+
 
 import    BlogDB (BlogLang (..))
 
@@ -123,6 +126,18 @@ cTextPlaceholder :: BlogLang -> Text
 cTextPlaceholder DE = "Kommentartext hier eingeben :]"
 cTextPlaceholder EN = "Enter your comment here :]"
 
+-- RSS Strings
+rssTitle :: BlogLang -> String
+rssTitle DE = "Tazjins Blog"
+rssTitle EN = "Tazjin's Blog"
+
+rssDesc :: BlogLang -> String
+rssDesc DE = "Feed zu Tazjins Blog"
+rssDesc EN = "Feed for Tazjin's Blog"
+
+rssLink :: BlogLang -> URI
+rssLink l = fromMaybe nullURI $ parseURI ("http://tazj.in/" ++ show l)
+
 -- errors
 notFoundTitle :: BlogLang -> Text
 notFoundTitle DE = "Nicht gefunden"