Fix docs on languages set and getMessageRender to use it (#1325)

This commit is contained in:
Josh Berman 2017-11-26 11:52:37 +02:00
parent c21e77947c
commit 79ab662a80
3 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## 1.4.37.1
* Fix documentation on `languages` function, update `getMessageRender` to use said function. [1325] (https://github.com/yesodweb/yesod/issues/1325)
## 1.4.37
* Add `setWeakEtag` function in Yesod.Core.Handler module.

View File

@ -1079,7 +1079,7 @@ getMessageRender :: (MonadHandler m, RenderMessage (HandlerSite m) message)
=> m (message -> Text)
getMessageRender = do
env <- askHandlerEnv
l <- reqLangs <$> getRequest
l <- languages
return $ renderMessage (rheSite env) l
-- | Use a per-request cache to avoid performing the same action multiple times.
@ -1130,15 +1130,15 @@ cachedBy k action = do
-- | Get the list of supported languages supplied by the user.
--
-- Languages are determined based on the following three (in descending order
-- Languages are determined based on the following (in descending order
-- of preference):
--
-- * The _LANG user session variable.
--
-- * The _LANG get parameter.
--
-- * The _LANG cookie.
--
-- * The _LANG user session variable.
--
-- * Accept-Language HTTP header.
--
-- Yesod will seek the first language from the returned list matched with languages supporting by your application. This language will be used to render i18n templates.

View File

@ -1,5 +1,5 @@
name: yesod-core
version: 1.4.37
version: 1.4.37.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>