pandoc-3.7.0.2: Conversion between markup formats

Copyright | Copyright (C) 2017-2024 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Translations.Types

Description

Data types for localization.

Translations are stored in `datatranslationslangname.trans`, where langname can be the full BCP47 language specifier, or just the language part. File format is:

    # A comment, ignored
    Figure: Figura
    Index: Indeksi

Synopsis

- data Term
  - = Abstract
  - | Appendix
  - | Bibliography
  - | Cc
  - | Chapter
  - | Contents
  - | Encl
  - | Figure
  - | Glossary
  - | Index
  - | Listing
  - | ListOfFigures
  - | ListOfTables
  - | Page
  - | Part
  - | Preface
  - | Proof
  - | References
  - | See
  - | SeeAlso
  - | Table
  - | To
- data Translations
- lookupTerm :: Term -> Translations -> Maybe Text

# Documentation

data Term #

Constructors

Abstract |
Appendix |
Bibliography |
Cc |
Chapter |
Contents |
Encl |
Figure |
Glossary |
Index |
Listing |
ListOfFigures |
ListOfTables |
Page |
Part |
Preface |
Proof |
References |
See |
SeeAlso |
Table |
To |

#### Instances

Instances details

FromJSON Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods parseJSON :: Value -> Parser Term # parseJSONList :: Value -> Parser [Term] # omittedField :: Maybe Term #
Enum Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods succ :: Term -> Term # pred :: Term -> Term # toEnum :: Int -> Term # fromEnum :: Term -> Int # enumFrom :: Term -> [Term] # enumFromThen :: Term -> Term -> [Term] # enumFromTo :: Term -> Term -> [Term] # enumFromThenTo :: Term -> Term -> Term -> [Term] #
Generic Term # |

Instance details

Defined in Text.Pandoc.Translations.Types

Associated Types

type Rep Term |

Instance details

Defined in Text.Pandoc.Translations.Types

type Rep Term = D1 ('MetaData "Term" "Text.Pandoc.Translations.Types" "pandoc-3.7.0.2-LV2qWKW0Q2RElzdkrvf5Ll" 'False) ((((C1 ('MetaCons "Abstract" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Appendix" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bibliography" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Cc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Chapter" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Contents" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Encl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Figure" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Glossary" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Index" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Listing" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ListOfFigures" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListOfTables" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Page" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Part" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Preface" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Proof" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "References" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "See" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SeeAlso" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Table" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "To" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: Term -> Rep Term x #

to :: Rep Term x -> Term #

Read Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods readsPrec :: Int -> ReadS Term # readList :: ReadS [Term] # readPrec :: ReadPrec Term # readListPrec :: ReadPrec [Term] #
Show Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods showsPrec :: Int -> Term -> ShowS # show :: Term -> String # showList :: [Term] -> ShowS #
Eq Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods (==) :: Term -> Term -> Bool # (/=) :: Term -> Term -> Bool #
Ord Term # |
Instance details Defined in Text.Pandoc.Translations.Types Methods compare :: Term -> Term -> Ordering # (<) :: Term -> Term -> Bool # (<=) :: Term -> Term -> Bool # (>) :: Term -> Term -> Bool # (>=) :: Term -> Term -> Bool # max :: Term -> Term -> Term # min :: Term -> Term -> Term #
type Rep Term # |

Instance details

Defined in Text.Pandoc.Translations.Types

type Rep Term = D1 ('MetaData "Term" "Text.Pandoc.Translations.Types" "pandoc-3.7.0.2-LV2qWKW0Q2RElzdkrvf5Ll" 'False) ((((C1 ('MetaCons "Abstract" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Appendix" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bibliography" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Cc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Chapter" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Contents" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Encl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Figure" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Glossary" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Index" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Listing" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ListOfFigures" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListOfTables" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Page" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Part" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Preface" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Proof" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "References" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "See" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SeeAlso" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Table" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "To" 'PrefixI 'False) (U1 :: Type -> Type))))))

data Translations #

#### Instances

Instances details

FromJSON Translations # |
Instance details Defined in Text.Pandoc.Translations.Types Methods parseJSON :: Value -> Parser Translations # parseJSONList :: Value -> Parser [Translations] # omittedField :: Maybe Translations #
Monoid Translations # |
Instance details Defined in Text.Pandoc.Translations.Types Methods mempty :: Translations # mappend :: Translations -> Translations -> Translations # mconcat :: [Translations] -> Translations #
Semigroup Translations # |
Instance details Defined in Text.Pandoc.Translations.Types Methods (<>) :: Translations -> Translations -> Translations # sconcat :: NonEmpty Translations -> Translations # stimes :: Integral b => b -> Translations -> Translations #
Generic Translations # |

Instance details

Defined in Text.Pandoc.Translations.Types

Associated Types

type Rep Translations |
Instance details Defined in Text.Pandoc.Translations.Types type Rep Translations = D1 ('MetaData "Translations" "Text.Pandoc.Translations.Types" "pandoc-3.7.0.2-LV2qWKW0Q2RElzdkrvf5Ll" 'True) (C1 ('MetaCons "Translations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Term Text))))

Methods

from :: Translations -> Rep Translations x #

to :: Rep Translations x -> Translations #

Show Translations # |
Instance details Defined in Text.Pandoc.Translations.Types Methods showsPrec :: Int -> Translations -> ShowS # show :: Translations -> String # showList :: [Translations] -> ShowS #
type Rep Translations # |
Instance details Defined in Text.Pandoc.Translations.Types type Rep Translations = D1 ('MetaData "Translations" "Text.Pandoc.Translations.Types" "pandoc-3.7.0.2-LV2qWKW0Q2RElzdkrvf5Ll" 'True) (C1 ('MetaCons "Translations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Term Text))))

lookupTerm :: Term -> Translations -> Maybe Text #

Lookup a term in a `Translations`.