aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model
diff options
context:
space:
mode:
authorJoris2015-11-01 11:05:28 +0100
committerJoris2015-11-01 11:05:28 +0100
commitd3e045e8034c5473964c0529ffc1e181311842c2 (patch)
tree3cc792ed26b135823c812820364b8343d5b603aa /src/server/Model
parenta14af8d8f2cc9d561a8c8804a4c73b9a35ce8a97 (diff)
Removing useless Translations model
Diffstat (limited to 'src/server/Model')
-rw-r--r--src/server/Model/Json/Translations.hs17
-rw-r--r--src/server/Model/Message.hs5
2 files changed, 2 insertions, 20 deletions
diff --git a/src/server/Model/Json/Translations.hs b/src/server/Model/Json/Translations.hs
deleted file mode 100644
index 21b188a..0000000
--- a/src/server/Model/Json/Translations.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-{-# LANGUAGE DeriveGeneric #-}
-
-module Model.Json.Translations
- ( Translations(..)
- ) where
-
-import Data.Aeson
-import GHC.Generics
-
-import Model.Json.Translation
-
-data Translations = Translations
- { translations :: [Translation]
- } deriving (Show, Generic)
-
-instance FromJSON Translations
-instance ToJSON Translations
diff --git a/src/server/Model/Message.hs b/src/server/Model/Message.hs
index f647ce2..a65e01c 100644
--- a/src/server/Model/Message.hs
+++ b/src/server/Model/Message.hs
@@ -12,7 +12,6 @@ import Model.Message.Lang
import Model.Message.Translations (getNonFormattedMessage)
import Model.Message.Parts
-import Model.Json.Translations
import Model.Json.Translation
getMessage :: Key -> Text
@@ -21,8 +20,8 @@ getMessage = getParamMessage []
getParamMessage :: [Text] -> Key -> Text
getParamMessage values key = replaceParts values (getNonFormattedMessage lang key)
-getTranslations :: Translations
-getTranslations = Translations (map getTranslation [minBound..])
+getTranslations :: [Translation]
+getTranslations = (map getTranslation [minBound..])
getTranslation :: Key -> Translation
getTranslation key = Translation (T.pack . show $ key) (getParts $ getNonFormattedMessage lang key)