From 74212eb1b0e1757fc0ac3e5d45b0ee18bac491e5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 11 Aug 2017 11:56:54 -0700 Subject: Added support for translations (localization) (see #3559). * readDataFile, readDefaultDataFile, getReferenceDocx, getReferenceODT have been removed from Shared and moved into Class. They are now defined in terms of PandocMonad primitives, rather than being primitve methods of the class. * toLang has been moved from BCP47 to Class. * NoTranslation and CouldNotLoudTranslations have been added to LogMessage. * New module, Text.Pandoc.Translations, exporting Term, Translations, readTranslations. * New functions in Class: translateTerm, setTranslations. Note that nothing is loaded from data files until translateTerm is used; setTranslation just sets the language to be used. * Added two translation data files in data/translations. * LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage` (polyglossia) and `\figurename`. --- src/Text/Pandoc/Templates.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Templates.hs') diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index 43b7dc37b..d5a4faafa 100644 --- a/src/Text/Pandoc/Templates.hs +++ b/src/Text/Pandoc/Templates.hs @@ -44,7 +44,7 @@ import qualified Data.Text as T import System.FilePath ((<.>), ()) import Text.DocTemplates (Template, TemplateTarget, applyTemplate, compileTemplate, renderTemplate, varListToJSON) -import Text.Pandoc.Class (PandocMonad(readDataFile)) +import Text.Pandoc.Class (readDataFile, PandocMonad) import Text.Pandoc.Error import qualified Text.Pandoc.UTF8 as UTF8 -- cgit v1.2.3