packages feed

localize 0.2.0.0 → 0.2.0.1

raw patch · 2 files changed

+5/−5 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Text.Localize: __ :: (Localized m) => TranslationSource -> m Text
+ Text.Localize: __ :: Localized m => TranslationSource -> m Text
- Text.Localize: __f :: (Localized m, VarContainer c) => TranslationSource -> c -> m Text
+ Text.Localize: __f :: (Localized m, MonadFail m, VarContainer c) => TranslationSource -> c -> m Text
- Text.Localize: __n :: (Localized m, VarContainer c) => TranslationSource -> TranslationSource -> Int -> c -> m Text
+ Text.Localize: __n :: (Localized m, MonadFail m, VarContainer c) => TranslationSource -> TranslationSource -> Int -> c -> m Text
- Text.Localize: translate :: (Localized m) => TranslationSource -> m Text
+ Text.Localize: translate :: Localized m => TranslationSource -> m Text
- Text.Localize: translateN :: (Localized m) => TranslationSource -> TranslationSource -> Int -> m Text
+ Text.Localize: translateN :: Localized m => TranslationSource -> TranslationSource -> Int -> m Text
- Text.Localize: translateNFormat :: (Localized m, VarContainer vars) => TranslationSource -> TranslationSource -> Int -> vars -> m Text
+ Text.Localize: translateNFormat :: (Localized m, MonadFail m, VarContainer vars) => TranslationSource -> TranslationSource -> Int -> vars -> m Text
- Text.Localize: withTranslation :: Localized m => (b -> r) -> (Catalog -> Maybe Context -> b -> r) -> (b -> m r)
+ Text.Localize: withTranslation :: Localized m => (b -> r) -> (Catalog -> Maybe Context -> b -> r) -> b -> m r
- Text.Localize.Types: class (Monad m, Applicative m) => Localized m where getContext = return Nothing
+ Text.Localize.Types: class (Monad m, Applicative m) => Localized m

Files

Text/Localize.hs view
@@ -139,7 +139,7 @@  -- | Translate a string and substitute variables into it. -- Data.Text.Format.Heavy.format syntax is used.-translateFormat :: (Localized m, F.VarContainer vars)+translateFormat :: (Localized m, MonadFail m, F.VarContainer vars)                 => TranslationSource -- ^ Original formatting string                 -> vars              -- ^ Substitution variables                 -> m T.Text@@ -150,13 +150,13 @@     Right fmt -> return $ F.format fmt vars  -- | Short alias for @translateFormat@.-__f ::  (Localized m, F.VarContainer c) => TranslationSource -> c -> m T.Text+__f ::  (Localized m, MonadFail m, F.VarContainer c) => TranslationSource -> c -> m T.Text __f = translateFormat  -- | Translate a string, taking plural forms into account, -- and substitute variables into it. -- Data.Text.Format.Heavy.format syntax is used.-translateNFormat :: (Localized m, F.VarContainer vars)+translateNFormat :: (Localized m, MonadFail m, F.VarContainer vars)                  => TranslationSource -- ^ Single form of formatting string in original language                  -> TranslationSource -- ^ Plural form of formatting string in original language                  -> Int               -- ^ Number@@ -169,6 +169,6 @@     Right fmt -> return $ F.format fmt vars  -- | Short alias for @translateNFormat@.-__n :: (Localized m, F.VarContainer c) => TranslationSource -> TranslationSource -> Int -> c -> m T.Text+__n :: (Localized m, MonadFail m, F.VarContainer c) => TranslationSource -> TranslationSource -> Int -> c -> m T.Text __n = translateNFormat 
localize.cabal view
@@ -1,5 +1,5 @@ name:                localize-version:             0.2.0.0+version:             0.2.0.1 synopsis:            GNU Gettext-based messages localization library description:         More or less fully functional translation framework,                      based on @haskell-gettext@ and @text-format-heavy@