aboutsummaryrefslogtreecommitdiffstats
path: root/src/I18n.hs
blob: e50ba5b77406dda262ef87f0dfef08334641754d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{-# LANGUAGE OverloadedStrings #-}

module I18n
    ( Locale(..)
    , Message(..)

    , translate
    ) where

import qualified Data.Text as T

data Locale = EN | FR deriving (Show)

data Message
    = GitHubCommitRepoURLNotFound
    | GitRemoteSetOriginUpdatedRepoURL T.Text

translate_en_US :: Message -> T.Text
translate_en_US GitHubCommitRepoURLNotFound = "I couldn't find a repo URL for \
    \this channel. Try `git remote set origin REPO_URL`."
translate_en_US (GitRemoteSetOriginUpdatedRepoURL url) =
    "I updated the channel's repo URL to '" `T.append` url `T.append` "'."

translate :: Locale -> Message -> T.Text
translate EN = translate_en_US