From: Gunnar Wolf Date: Sat, 4 Nov 2017 00:37:08 +0000 (-0600) Subject: Merged some documentation and building changes from Petter Reinholdtsen. Thanks! X-Git-Tag: es-printed~696 X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/commitdiff_plain/ac5cabc29e2c4d214cac6099d36109b9d42aa660?ds=sidebyside;hp=00b1234001464c66ea42f7a50b27af57bc95e41e Merged some documentation and building changes from Petter Reinholdtsen. Thanks! --- diff --git a/HOWTO.md b/HOWTO.md index fb2d93f..0de9858 100644 --- a/HOWTO.md +++ b/HOWTO.md @@ -118,7 +118,7 @@ with it, and we need to find ways to do several improvements. However, the following command will give you a good glimpse on how your finished translation looks: - po4a-translate -f text -m MadewithCreativeCommonsup-to-dateversion.md -p po/es/mwcc.po -l MadewithCreativeCommonsup-to-dateversion.es.md -l MadewithCreativeCommonsup-to-dateversion.es.md -L utf8 -M utf8 -k 20 + po4a-translate -f text -m MadewithCreativeCommonsmostup-to-dateversion.md -p po/es/mwcc.po -l MadewithCreativeCommonsmostup-to-dateversion.es.md -l MadewithCreativeCommonsmostup-to-dateversion.es.md -L utf8 -M utf8 -k 20 What does it all mean? @@ -126,7 +126,7 @@ What does it all mean? The base format to/from which the translation is done is plain text. - -m MadewithCreativeCommonsup-to-dateversion.md + -m MadewithCreativeCommonsmostup-to-dateversion.md The name of your source document. @@ -134,7 +134,7 @@ The name of your source document. Which translation to use. In this case, Spanish translation. - -l MadewithCreativeCommonsup-to-dateversion.es.md + -l MadewithCreativeCommonsmostup-to-dateversion.es.md Filename to use for the created translation. Do note that I'm specifying a name that implies Spanish. diff --git a/Makefile b/Makefile index 249ddc6..5c71457 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,10 @@ LANGS = es nl nb all: pdf +distclean: clean + rm -f $(SOURCE).md clean: - rm -f $(SOURCE).pdf $(SOURCE).xml $(SOURCE).md + rm -f $(SOURCE).pdf $(SOURCE).xml for LANG in $(LANGS); do \ rm -f $(SOURCE).$$LANG.pdf $(SOURCE).$$LANG.xml $(SOURCE).$$LANG.md ;\ done @@ -46,7 +48,10 @@ po/mwcc.pot: $(SOURCE).md done $(SOURCE).es.md: $(SOURCE).md po/es/mwcc.po - po4a-translate -f text -m $(SOURCE).md -p po/es/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 20 + po4a-translate -f text -m $(SOURCE).md -p po/es/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 0 + +$(SOURCE).nb.md: $(SOURCE).md po/nb/mwcc.po + po4a-translate -f text -m $(SOURCE).md -p po/nb/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 0 %.xml: %.md pandoc -s -o $@ $(PANDOC_OPTS) $^ @@ -68,14 +73,14 @@ pdf: $(SOURCE).pdf s/\\author\{and\}/\\author{Paul Stacey \\and Sarah Hinchliff Pearson}/; \ s/\\DBKinditem\{\\writtenby\}\{and\}/\\DBKinditem{\writtenby}{Paul Stacey and Sarah Hinchliff Pearson}/; \ s/\\listoffigures//; \ - s/\\part\{(Prefacio|Introducción)\}/\\chapter*{$$1} \\addcontentsline{toc}{chapter}{$$1}/; \ - s/\\section\{Notas\}/\\section*{Notas}/; \ - s/(Vínculos Web)/\\section*{$$1}/; \ - s/^\s*(Modelo de ingresos|Fecha de la entrevista|Entrevistad(?:o|a|os|as))/\\textbf{$$1}/;' $@ - perl -p -i -e '$$work=1 if /chapter.Arduino/; $$work=0 if /chapter.Bibliografía/; \ + s/\\part\{(Foreword|Prefacio|Introduction|Introducción)\}/\\chapter*{$$1} \\addcontentsline{toc}{chapter}{$$1}/; \ + s/\\section\{(Notes|Notas)\}/\\section*{$$1}/; \ + s/(Web links?|Vínculos Web)/\\section*{$$1}/; \ + s/^\s*(Revenue model|Interview date|Interviewees?|(Modelo de ingresos|Fecha de la entrevista|Entrevistad(?:o|a|os|as)))/\\textbf{$$1}/;' $@ + perl -p -i -e '$$work=1 if /chapter.Arduino/; $$work=0 if /chapter.(Bibliography|Bibliografía)/; \ next unless $$work; \ s/(\\label\{[-\.\wáéíóúñ]+\}\\hyperlabel\{[-\.\wáéíóúñ]+\}%)/$$1\n\\begin{quote}/i; \ - s/(Perfil escrito por.+)/$$1\n\\end{quote}/' $@ + s/(Profile written by.+|Perfil escrito por.+)/$$1\n\\end{quote}/' $@ XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml