packages feed

shakespeare-i18n 1.0.0.2 → 1.0.0.3

raw patch · 5 files changed

+61/−2 lines, 5 filesdep +hspecdep +shakespeare-i18ndep ~basedep ~text

Dependencies added: hspec, shakespeare-i18n

Dependency ranges changed: base, text

Files

Text/Shakespeare/I18N.hs view
@@ -312,7 +312,7 @@             let lang = pack $ reverse $ drop 4 $ reverse file             bs <- S.readFile file'             let s = unpack $ decodeUtf8 bs-            defs <- fmap catMaybes $ mapM parseDef $ lines s+            defs <- fmap catMaybes $ mapM (parseDef . T.unpack . T.strip . T.pack) $ lines s             return $ Just (file', (lang, defs))         else return Nothing 
shakespeare-i18n.cabal view
@@ -1,5 +1,5 @@ name:            shakespeare-i18n-version:         1.0.0.2+version:         1.0.0.3 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -15,6 +15,7 @@ cabal-version:   >= 1.8 build-type:      Simple homepage:        http://www.yesodweb.com/book/shakespearean-templates+extra-source-files: test-messages/*.msg  library     build-depends:   base             >= 4       && < 5@@ -29,6 +30,18 @@     ghc-options:     -Wall     if impl(ghc >= 7.4)        cpp-options: -DGHC_7_4++test-suite test+    hs-source-dirs: test+    main-is: Spec.hs+    other-modules: Text.Shakespeare.I18NSpec+    type: exitcode-stdio-1.0++    ghc-options:   -Wall+    build-depends: base+                 , shakespeare-i18n+                 , hspec >= 1.4+                 , text  source-repository head   type:     git
+ test-messages/en.msg view
@@ -0,0 +1,29 @@+NotAnAdmin: You must be an administrator to access this page.
+
+WelcomeHomepage: Welcome to the homepage
+SeeArchive: See the archive
+
+NoEntries: There are no entries in the blog
+LoginToPost: Admins can login to post
+NewEntry: Post to blog
+NewEntryTitle: Title
+NewEntryContent: Content
+
+PleaseCorrectEntry: Your submitted entry had some errors, please correct and try again.
+EntryCreated title@Text: Your new blog post, #{title}, has been created
+
+EntryTitle title@Text: Blog post: #{title}
+CommentsHeading: Comments
+NoComments: There are no comments
+AddCommentHeading: Add a Comment
+LoginToComment: You must be logged in to comment
+AddCommentButton: Add comment
+
+CommentName: Your display name
+CommentText: Comment
+CommentAdded: Your comment has been added
+PleaseCorrectComment: Your submitted comment had some errors, please correct and try again.
+
+HomepageTitle: Yesod Blog Demo
+BlogArchiveTitle: Blog Archive
+
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
+ test/Text/Shakespeare/I18NSpec.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings     #-}+{-# LANGUAGE TemplateHaskell       #-}+module Text.Shakespeare.I18NSpec+    ( spec+    ) where++import           Data.Text             (Text)+import           Text.Shakespeare.I18N++spec :: Monad m => m ()+spec = return ()++data Test = Test++mkMessage "Test" "test-messages" "en"