aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Translated.hs
blob: b92ae39d951d4cb75c2f5b2758c255bddbfc3de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE DeriveGeneric #-}

module Model.Translated where

import GHC.Generics
import Data.Yaml

import Model.Translation.Language

data Translated = Translated
  { english :: String
  , french :: String
  } deriving (Show, Read, Eq, Generic)

instance FromJSON Translated

getTranslation :: Language -> Translated -> String
getTranslation English translated = english translated
getTranslation French translated = french translated