pandoc-3.10: 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 Source #

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

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.10-HDtgLHV36vi9t4gfnv8HSy" '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 Source #

to :: Rep Term x -> Term Source #

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

Instance details

Defined in Text.Pandoc.Translations.Types

type Rep Term = D1 ('MetaData "Term" "Text.Pandoc.Translations.Types" "pandoc-3.10-HDtgLHV36vi9t4gfnv8HSy" '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 Source #

#### Instances

Instances details

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

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.10-HDtgLHV36vi9t4gfnv8HSy" 'True) (C1 ('MetaCons "Translations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Term Text))))

Methods

from :: Translations -> Rep Translations x Source #

to :: Rep Translations x -> Translations Source #

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

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

Lookup a term in a `Translations`.