{-# LANGUAGE DeriveGeneric #-} module Model.Message.Key ( Key(..) ) where import qualified Data.Aeson as Json import qualified Data.Text as T data Key = -- Title SharedCost -- Sign | Email | SignIn | SendEmailFail | InvalidEmail | UnauthorizedSignIn | Forbidden | EnterValidEmail | SignInUsed | SignInExpired | SignInInvalid | SignInMailTitle | SignInMail | SignInEmailSent -- Dates | January | February | March | April | May | June | July | August | September | October | November | December | ShortDate | LongDate -- Validation | CategoryRequired | CostRequired -- Payments | Name | Cost | Frequency | InvalidFrequency | AddPayment | PaymentNotDeleted | Punctual | Monthly | SingularMonthlyCount | PluralMonthlyCount | PaymentsTitle | Payment | Payments | SearchText | Worth -- Statistics | Statistics | Balance | Overall | ByMonths | By | Mean -- Income | CumulativeIncomesSince | Income | MonthlyNetIncomes | IncomeNotDeleted | Creation | Amount | ConfirmDelete -- Form | Empty | InvalidString | InvalidDate | InvalidInt | SmallerIntThan | GreaterIntThan -- Dialog | Confirm | Undo -- Http error | Timeout | NetworkError | UnexpectedPayload deriving (Enum, Bounded, Show) instance Json.ToJSON Key where toJSON = Json.String . T.pack . show