From 79f07f768332187bd48b65800522a1fd1332eb97 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 9 Jun 2024 13:16:31 +0100 Subject: Towards localization --- TODO.md | 23 ++++++++++++++--------- bin/compile-book | 2 +- bin/compile-notes | 2 +- templates/book/references.md | 8 ++++++++ templates/notes/bibliography.md | 1 + templates/references.md | 8 -------- 6 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 templates/book/references.md create mode 100644 templates/notes/bibliography.md delete mode 100644 templates/references.md diff --git a/TODO.md b/TODO.md index 620425f..43ac297 100644 --- a/TODO.md +++ b/TODO.md @@ -2,27 +2,32 @@ ## Basic +* [ ] Add license and version information in the notebook. +* [ ] Add link to the notebook in the main book HTML. * [ ] Move `slides` to `content/slides`? +* [ ] Localization support, by detecting the `lang` YAML parameters and using + templates from `templates/{book,notes}/$lang`. * [ ] Improve the documentation, including: * [ ] Repository URL. - * [ ] Livros que usam Bookup. - * [ ] Projetos semelhantes: + * [ ] Translate to English. + * [ ] Add a reference to books using Bookup. + * [ ] Similar projects: * [ ] [Repositórios da Editora Hedra](https://github.com/hedra-editora). ## Improvements -* [ ] Supporte a uma variável de ambiente `BASE_URL`, aplicada - como variável de template `%%base_url%%`, permitindo que o - material compilado tenha links entre si? +* [ ] Suport for a `BASE_URL` environment variable? + It would be applied as a template variable in `%%base_url%%` placeholers, + allowing the compile material to have links among themselves. * [ ] Optionally add a small reference to the Bookup website in the book frontmatter? ## Issues -* [ ] Bug no `pandoc` ou `citeproc` ignorando citações dentro de blocos LaTeX. - Afetando o formato PDF. Vide teste em `test/pandoc`. - Considerar um relatório upstream. - Se necessário, aplicar também correções também nos repositórios downstream. +* [ ] Bug in `pandoc` or `citeproce` ignoring citation inside LaTeX blocks. + Affecting the PDF format. Test available at `test/pandoc`. + Consider an upstream bug report. + If needed, also apply corrections in the existing downstream projects. ## Bonus diff --git a/bin/compile-book b/bin/compile-book index f452d4b..930e673 100755 --- a/bin/compile-book +++ b/bin/compile-book @@ -40,7 +40,7 @@ done find content/sections -type f | grep '\.md$' | sort | while read file; do cat $file >> $OUTPUT.md echo "" >> $OUTPUT.md - cat $BASEDIR/templates/references.md >> $OUTPUT.md + cat $BASEDIR/templates/book/references.md >> $OUTPUT.md echo "" >> $OUTPUT.md done diff --git a/bin/compile-notes b/bin/compile-notes index da9287c..6760925 100755 --- a/bin/compile-notes +++ b/bin/compile-notes @@ -37,7 +37,7 @@ find content/notes -type f | grep '\.md$' | sort | while read file; do done # Bibliography section -echo "# Bibliografia" >> $OUTPUT.md +cat $BASEDIR/templates/book/bibliography.md >> $OUTPUT.md # Revision information sed -i -e "s|%%revision%%|$REVISION|g" -e "s|%%date%%|$DATE|g" $OUTPUT.md diff --git a/templates/book/references.md b/templates/book/references.md new file mode 100644 index 0000000..cf028c9 --- /dev/null +++ b/templates/book/references.md @@ -0,0 +1,8 @@ + +```{r echo=FALSE, results='asis'} +if (knitr::is_html_output()) { + cat("## Referências") + cat("\n") + cat("\n") +} +``` diff --git a/templates/notes/bibliography.md b/templates/notes/bibliography.md new file mode 100644 index 0000000..1c6d0e6 --- /dev/null +++ b/templates/notes/bibliography.md @@ -0,0 +1 @@ +# Bibliografia diff --git a/templates/references.md b/templates/references.md deleted file mode 100644 index cf028c9..0000000 --- a/templates/references.md +++ /dev/null @@ -1,8 +0,0 @@ - -```{r echo=FALSE, results='asis'} -if (knitr::is_html_output()) { - cat("## Referências") - cat("\n") - cat("\n") -} -``` -- cgit v1.2.3