From b1cfb3bda4665852878d5095a044f46a6e9a3ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20M=C3=A9ndez=20Gort?= Date: Fri, 21 Oct 2016 18:53:34 -0400 Subject: [PATCH] Yesod.Form.I18n.Spanish added --- yesod-form/Yesod/Form/I18n/Spanish.hs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 yesod-form/Yesod/Form/I18n/Spanish.hs diff --git a/yesod-form/Yesod/Form/I18n/Spanish.hs b/yesod-form/Yesod/Form/I18n/Spanish.hs new file mode 100644 index 00000000..6c6d846f --- /dev/null +++ b/yesod-form/Yesod/Form/I18n/Spanish.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE OverloadedStrings #-} + +module Yesod.Form.I18n.Spanish where + +import Yesod.Form.Types (FormMessage (..)) +import Data.Monoid (mappend) +import Data.Text (Text) + +spanishFormMessage :: FormMessage -> Text +spanishFormMessage (MsgInvalidInteger t) = "Número entero inválido: " `mappend` t +spanishFormMessage (MsgInvalidNumber t) = "Número inválido: " `mappend` t +spanishFormMessage (MsgInvalidEntry t) = "Entrada inválida: " `mappend` t +spanishFormMessage MsgInvalidTimeFormat = "Hora inválida, debe tener el formato HH:MM[:SS]" +spanishFormMessage MsgInvalidDay = "Fecha inválida, debe tener el formato AAAA-MM-DD" +spanishFormMessage (MsgInvalidUrl t) = "URL inválida: " `mappend` t +spanishFormMessage (MsgInvalidEmail t) = "Dirección de correo electrónico inválida: " `mappend` t +spanishFormMessage (MsgInvalidHour t) = "Hora inválida: " `mappend` t +spanishFormMessage (MsgInvalidMinute t) = "Minuto inválido: " `mappend` t +spanishFormMessage (MsgInvalidSecond t) = "Segundo inválido: " `mappend` t +spanishFormMessage MsgCsrfWarning = "Como protección contra ataques CSRF, confirme su envío por favor." +spanishFormMessage MsgValueRequired = "Se requiere un valor" +spanishFormMessage (MsgInputNotFound t) = "Entrada no encontrada: " `mappend` t +spanishFormMessage MsgSelectNone = "" +spanishFormMessage (MsgInvalidBool t) = "Booleano inválido: " `mappend` t +spanishFormMessage MsgBoolYes = "Sí" +spanishFormMessage MsgBoolNo = "No" +spanishFormMessage MsgDelete = "¿Eliminar?" \ No newline at end of file