Here are declared LocalizableTemplate
(also called PCLT)
and LocalizedTemplate
.
Here by localization is meant localization in languages.
First (localizable template) is above languages,
while second (localized template) is a template version
in a concrete language.
- data PCS_SpecificMarkings
- ssm2ldtm :: SeparatedSectorMarker -> PCS_SpecificMarkings
- type LngTpl_AbstractedString = [(PCS_SpecificMarkings, ByteString, MarkedChunkLength)]
- listOfParams :: LngTpl_AbstractedString -> [ParamName_LBS]
- type ParserBadResult = String
- data PCLT_ParserLowLevelFailure
- doTheParse :: PCLT_InnerConfig -> ByteString -> ([PCLT_ParserLowLevelFailure], Maybe (LngTpl_AbstractedString, [PCLT_CompositeKey]))
- type PCLT_CatalogMap = Map PCLT_ID LocalizableTemplate
- type LngTpl_SubCompositesMap = PCLT_CatalogMap
- data LocalizedTemplate = LocalizedTemplate {}
- type DefaultLngTpl = LocalizedTemplate
- type NondefaultLngTpl = LocalizedTemplate
- compareStrictOrientationOnDefault :: PCLT_ID -> StrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets -> NondefaultLngTpl -> DefaultLngTpl -> Bool
- _compareStrictOrientationOnDefault :: PCLT_ID -> StrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets -> ([PCLT_ID], [ParamName_LBS]) -> ([PCLT_ID], [ParamName_LBS]) -> Bool
- data PCLT_ShowDetalizationLevel
- type PCLT_RequiredShowDetalizationLevel = PCLT_ShowDetalizationLevel
- type PCLT_AllocatedShowDetalizationLevel = PCLT_ShowDetalizationLevel
- data PCLT_RawCatalogData = PCLT_RawCatalogData (Map PCLT_ID (Map LanguageName ByteString, PCLT_RequiredShowDetalizationLevel))
- data PCLT_ErrornousSDL = UnreadableSDL_ESDL SDLModus String
- __const_esdl_rawinputshowsize_inShowAsPCSI :: Int
- str2PCLT_SDL :: SDLModus -> String -> PCLT_InnerConfig -> PCLT_ShowDetalizationLevel
- data LocalizableTemplate = LocalizableTemplate {}
Template pieces
data PCS_SpecificMarkings Source
These are types of template pieces. They are made by ssm2ldtm
from SeparatedSectorMarker
type LngTpl_AbstractedString = [(PCS_SpecificMarkings, ByteString, MarkedChunkLength)]Source
Template content.
listOfParams :: LngTpl_AbstractedString -> [ParamName_LBS]Source
Extract a list of parameter names from a template content.
Parsing from a lazy ByteString to a localized template content
type ParserBadResult = StringSource
data PCLT_ParserLowLevelFailure Source
These errors are possible only if program is wrong.
doTheParse :: PCLT_InnerConfig -> ByteString -> ([PCLT_ParserLowLevelFailure], Maybe (LngTpl_AbstractedString, [PCLT_CompositeKey]))Source
The parsing uses parameters
Test.PCLT.Config.pcsParameterPlaceholderWrapper
and
Test.PCLT.Config.pcsCompositePlaceholderWrapper
of
Test.PCLT.Config.PCLT_InnerConfig
.
The list [PCLT_CompositeKey]
in the result is a list of composite keys
(template IDs, used by template as inclusions)
Localized template
data LocalizedTemplate Source
LocalizedTemplate | |
|
Text.PCLT.Config.pcsStrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets
compareStrictOrientationOnDefault :: PCLT_ID -> StrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets -> NondefaultLngTpl -> DefaultLngTpl -> BoolSource
Carrying strict orientation routines. See description of
StrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets
.
_compareStrictOrientationOnDefault :: PCLT_ID -> StrictOrient_ofParamsAndCmpsts_onDfltLngTplsSets -> ([PCLT_ID], [ParamName_LBS]) -> ([PCLT_ID], [ParamName_LBS]) -> BoolSource
Requirement for making a representation from template - SDL
data PCLT_ShowDetalizationLevel Source
This is an extending wrapper around SDL. It is used for specification of requirement for making representation from template. This specification is attached to every localizable template in PCLT catalog
PCLT_SDL ShowDetalizationLevel | Plain SDL, nominal. If SDL of representation reciever is less then that, then template cann't be used in representation generation. |
PCLT_SDL_ToTemplateLink PCLT_ID | "The requirement is the same as is specified for referenced template". |
PCLT_SDL_ToParamCompositeLink PCLT_ParamKey | "The requirement is the same as is specified a for referenced
template, which is referenced by a |
PCLT_SDL_Errornous PCLT_ErrornousSDL | In input data for catalog formation the given specification
is errornous.
If config's (Text.PCLT.Config) parameters
|
data PCLT_RawCatalogData Source
Raw templates (both localizeds, and localizables).
Input data for catalog formation. Used by HasStaticRawPCLTs
class
(declared in Text.PCLT.HasStaticRawPCLTs)
data PCLT_ErrornousSDL Source
This is a bad result of parsing some String
into PCLT_ShowDetalizationLevel
. The second argument is this bad input.
__const_esdl_rawinputshowsize_inShowAsPCSI :: IntSource
A constant currently set to 25. It is used in a parser str2PCLT_SDL
:
if the input is errornous, this much symbols of input are saved
in UnreadableSDL_ESDL
. If input is bigger, then the saved trunc is
tailed with "..."
str2PCLT_SDL :: SDLModus -> String -> PCLT_InnerConfig -> PCLT_ShowDetalizationLevelSource
Parse String
into PCLT_ShowDetalizationLevel
. First of all parser
tries strict_str2sdl
. Then, if failed, parser uses following
config entries:
-
pcsParameterPlaceholderWrapper
- if prefix and postfix of input is this (by default it is "@@|"), then it is parsed intoPCLT_SDL_ToParamCompositeLink
-
pcsCompositePlaceholderWrapper
- if prefix and postfix of input is this (by default it is "##|"), then it is parsed intoPCLT_SDL_ToTemplateLink
-
pcsAllowEmptySDL_parseItByModusMargin
- if it is positive and input is empty, then it gets parsed into (PCLT_SDL $
), where modus is first argument; esle, if parameter is negative and input is empty, it is parsed tomarginOfSDLModus
modusPCLT_SDL_Errornous
-
pcsAllowUnreadableSDL_parseIdByModusMargin
- if it is positive and input is unparsable, then it gets parsed into
, where modus is first argument; esle, if parameter is negative and input is unparsable, it is parsed toPCLT_SDL
$marginOfSDLModus
modusPCLT_SDL_Errornous
Localizable template
data LocalizableTemplate Source
LocalizableTemplate | |
|