aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-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)