{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.Chinese where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) chineseFormMessage :: FormMessage -> Text chineseFormMessage :: FormMessage -> Text chineseFormMessage (MsgInvalidInteger Text t) = Text "无效的整数: " forall a. Monoid a => a -> a -> a `Data.Monoid.mappend` Text t chineseFormMessage (MsgInvalidNumber Text t) = Text "无效的数字: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage (MsgInvalidEntry Text t) = Text "无效的条目: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage FormMessage MsgInvalidTimeFormat = Text "无效的时间, 必须符合HH:MM[:SS]格式" chineseFormMessage FormMessage MsgInvalidDay = Text "无效的日期, 必须符合YYYY-MM-DD格式" chineseFormMessage (MsgInvalidUrl Text t) = Text "无效的链接: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage (MsgInvalidEmail Text t) = Text "无效的邮箱地址: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage (MsgInvalidHour Text t) = Text "无效的小时: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage (MsgInvalidMinute Text t) = Text "无效的分钟: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage (MsgInvalidSecond Text t) = Text "无效的秒: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage FormMessage MsgCsrfWarning = Text "为了防备跨站请求伪造, 请确认表格提交." chineseFormMessage FormMessage MsgValueRequired = Text "此项必填" chineseFormMessage (MsgInputNotFound Text t) = Text "输入找不到: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage FormMessage MsgSelectNone = Text "<空>" chineseFormMessage (MsgInvalidBool Text t) = Text "无效的逻辑值: " forall a. Monoid a => a -> a -> a `mappend` Text t chineseFormMessage FormMessage MsgBoolYes = Text "是" chineseFormMessage FormMessage MsgBoolNo = Text "否" chineseFormMessage FormMessage MsgDelete = Text "删除?" chineseFormMessage (MsgInvalidHexColorFormat Text t) = Text "颜色无效,必须为 #rrggbb 十六进制格式: " forall a. Monoid a => a -> a -> a `mappend` Text t