~alcinnz/hurl

ref: 8d239eb61f8448f5b0158e97a738d87aeed42313 hurl/src/Network/URI/Messages.hs -rw-r--r-- 713 bytes
8d239eb6 — Adrian Cochrane Dispatch unsupported URIs to native apps on FreeDesktop.Org-compliant desktops 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- | Module holding localized error messages to be presented as a response.
--
-- To localize error messages provided by HURL, provide your translations between
-- "BEGIN LOCALIZATION" & "END LOCALIZATION" in this file.
--
-- The lines are formatted:
--    trans ("LANG":_) (KEY) = "TRANSLATION"
-- with uppercase indicating the bits you fill in.
module Network.URI.Messages (trans, Errors(..)) where

--- BEGIN LOCALIZATION
trans ("en":_) (UnsupportedScheme scheme) = "Unsupported protocol " ++ scheme
trans ("en":_) (OpenedWith app) = "Opened in " ++ app
--- END LOCALIZATION

trans (_:locales) err = trans locales err
trans [] err = trans ["en"] err

data Errors = UnsupportedScheme String | OpenedWith String