From 5a538c5216df1c9f74f920c249ff53e239795995 Mon Sep 17 00:00:00 2001 From: Nadir Sampaoli Date: Sun, 15 Mar 2015 17:56:57 +0100 Subject: [PATCH 1/2] Add make target for other languages For example, to build the french version of the guide (will output a file named tutorial-fr.pdf): make pdf-lang GUIDE_LANG=fr --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 2475cb2..efd0760 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ PANDOC = pandoc INPUT = README.md +INPUT_LANG = guide-$(GUIDE_LANG).md OUTPUT = tutorial.pdf +OUTPUT_LANG = tutorial-$(GUIDE_LANG).pdf TITLE = -V title=LearnHaskell AUTHOR = -V author=bitemyapp FONTSIZE = -V fontsize=12pt @@ -13,5 +15,8 @@ FLAGS = --normalize --smart --toc $(VARIABLES) pdf: README.md $(PANDOC) -s $(INPUT) -o $(OUTPUT) $(FLAGS) --column=80 +pdf-lang: guide-$(GUIDE_LANG).md + $(PANDOC) -s $(INPUT_LANG) -o $(OUTPUT_LANG) $(FLAGS) --column=80 + dialogues: dialogues.md $(PANDOC) -s dialogues.md -o dialogues.pdf $(FLAGS) --column=80 From 93891a344ea6ea78b63c08f00bdebb4b869d5dff Mon Sep 17 00:00:00 2001 From: Nadir Sampaoli Date: Mon, 16 Mar 2015 22:44:45 +0100 Subject: [PATCH 2/2] Add documentation for `make pdf-lang` --- Contributing.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Contributing.md b/Contributing.md index b094331..a804579 100644 --- a/Contributing.md +++ b/Contributing.md @@ -7,3 +7,25 @@ - After you're done with your edits, use `make` to build the pdf and verify that everything looks nice. + +## Building pdf files + +You can build other pdf version of the guide for languages other than +english. For instance, to build the french version: + + make pdf-lang GUIDE_LANG=fr + +This will output a `tutorial-fr.pdf` file. + +Currently the repository provides a `guide-*.md` file for the following +languages: + + Language | Parameter + ---------: | ------------- + German | `GUIDE_LANG=de` + Greek | `GUIDE_LANG=el` + Spanish | `GUIDE_LANG=es` + French | `GUIDE_LANG=fr` + Italian | `GUIDE_LANG=it` + Portuguese | `GUIDE_LANG=pt` + Turkish | `GUIDE_LANG=tr`