diff options
author | Teddy Wing | 2017-08-20 20:04:24 +0200 |
---|---|---|
committer | Teddy Wing | 2017-08-20 20:04:24 +0200 |
commit | e1462aecda91b990fe9d2e4531f6986234b84fb4 (patch) | |
tree | 7707102130b13ad482b815f91994ff023443c5ac /src/I18n.hs | |
parent | 5792fb1fc1439994a4877761820d8d034b66110d (diff) | |
download | sorbot-e1462aecda91b990fe9d2e4531f6986234b84fb4.tar.bz2 |
CliOptions: Parse the `language` option into a `Locale`
Instead of parsing `--language` as a string, parse it as a real `Locale`
type. This means the parsing is taken care of for us at the CLI option
handling stage instead of later on.
We can thus use the language value more quickly and easily, passing it
to the `translate` function, which takes a `Locale`.
Diffstat (limited to 'src/I18n.hs')
-rw-r--r-- | src/I18n.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/I18n.hs b/src/I18n.hs index 5a74d80..e50ba5b 100644 --- a/src/I18n.hs +++ b/src/I18n.hs @@ -9,7 +9,7 @@ module I18n import qualified Data.Text as T -data Locale = EN | FR +data Locale = EN | FR deriving (Show) data Message = GitHubCommitRepoURLNotFound |