{-# LANGUAGE CPP #-} -- | 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. -- -- Translations between #if WITH_HTTP_URI & #endif are specific to HTTP error handling. module Network.URI.Messages (trans, Errors(..)) where import Data.List (stripPrefix) import Data.Maybe (fromMaybe) import Control.Exception (Exception) trans _ (RawXML markup) = markup --- BEGIN LOCALIZATION ("en":_) `trans` UnsupportedScheme scheme = "Unsupported protocol " ++ scheme ("en":_) `trans` UnsupportedMIME mime = "Unsupported filetype " ++ mime ("en":_) `trans` RequiresInstall mime appsMarkup = "

Please install a compatible app to open " ++ linkType ++ " links

\n" ++ appsMarkup where linkType = fromMaybe mime $ stripPrefix "x-scheme-handler/" mime ("en":_) `trans` OpenedWith app = "Opened in " ++ app ("en":_) `trans` ReadFailed msg = "Failed to read file: " ++ msg ("en":_) `trans` MalformedResponse why = "Invalid response! " ++ why ("en":_) `trans` ExcessiveRedirects = "Too many redirects!" ("en":_) `trans` GeminiError '1' '1' label = "