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`. --- data/translations/en.trans | 19 +++++++++++++++++++ data/translations/fr.trans | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 data/translations/en.trans create mode 100644 data/translations/fr.trans (limited to 'data') diff --git a/data/translations/en.trans b/data/translations/en.trans new file mode 100644 index 000000000..0bdc172af --- /dev/null +++ b/data/translations/en.trans @@ -0,0 +1,19 @@ +Preface: Preface +References: References +Abstract: Abstract +Bibliography: Bibliography +Chapter: Chapter +Appendix: Appendix +Contents: Contents +ListOfFigures: ListOfFigures +ListOfTables: ListOfTables +Index: Index +Figure: Figure +Table: Table +Part: Part +Page: page +Proof: Proof +See: see +SeeAlso: see also +Cc: cc +To: To diff --git a/data/translations/fr.trans b/data/translations/fr.trans new file mode 100644 index 000000000..a1415d846 --- /dev/null +++ b/data/translations/fr.trans @@ -0,0 +1,19 @@ +Preface: Préface +References: Références +Abstract: Résumé +Bibliography: Bibliographie +Chapter: Chaptire +Appendix: Annexe +Contents: Table des matières +ListOfFigures: Table des figures +ListOfTables: Liste des tableaux +Index: Index +Figure: Fig. +Table: Tab. +Part: partie +Page: page +Proof: Démonstration +See: voir +SeeAlso: voir aussi +Cc: Copie à +To: -- cgit v1.2.3