move translations to Rmd files
Closed this issue · 6 comments
According to @naupaka, the Rmd files are the files of record for the R lessons. Since all of the translations were done to the .md files, these need to be moved to the .Rmd files. I will look into whether this can be done automatically.
Thanks @ErinBecker. If there's manual job involved I am sure you can ask in the translators group for help.
It seems that @raynamharris has identified a group in Argentina that would be willing to help with this. I think this is best done manually given that there are instances where the output was generated manually for aesthetics or to illustrate a point that would be difficult to make using a valid Rmd chunk. This makes automation difficult.
I'm putting down some instructions here to help with the process. I re-arranged the files in the repository (see #47) to make the process easier and to keep the history of contribution of the translations.
The files to edit are now all in the _episodes_rmd/' folder. They already have the
.Rmdextension, but I only converted the first file from markdown to Rmarkdown. Lessons 02 to 16 still need to be converted. I think it's best to do this conversion by having the English version of the Rmd file and the Spanish version to convert side-by-side. The English version are in the
_episode_rmd_en` folder. The Rmd chunks can be pasted directly from the English version to the Spanish version (taking care of not overwriting translated comments). In the process, make sure to remove the output of the chunk from the Rmd file.
For instance this in the markdown
version,
~~~
sessionInfo()
~~~
{: .r}
~~~
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin16.7.0 (64-bit)
Running under: macOS High Sierra 10.13
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets base
other attached packages:
[1] checkpoint_0.4.1 stringr_1.2.0 knitr_1.17
loaded via a namespace (and not attached):
[1] compiler_3.4.1 magrittr_1.5 tools_3.4.1 stringi_1.1.5
[5] methods_3.4.1 evaluate_0.10.1
~~~
{: .output}
becomes in the Rmd version:
```{r}
sessionInfo()
```
There are just a few instances where code that looks like output should remain as is. Having the English Rmd side-by-side should make it obvious that these chunks are not meant to be replaced by Rmarkdown code.
Another important thing to remember is to make sure the chunk just below the YAML header is included. These are in the English version, so when comparing side-by-side, they should be easy to spot. All the Rmd files need to have something like this just below the YAML header (where "03-" is replaced with the correct lesson number):
```{r, include=FALSE}
source("../bin/chunk-options.R")
knitr_fig_path("03-")
```
Let me know if you have any questions!
@raynamharris dejo esto en tus manos :D I'm sure this will work well with a group of people working together. I just wanted to mention to @fmichonneau the hackathon is tomorrow https://github.com/Carpentries-ES/R-hackaton-es so to prepare ourselves for the changes. All the best !
are we closing this issue now that I merged the PR?
I'm going to close this issue and reopen a new one with a different title (since the lessons have been moved but not converted) and checkbox list of lessons to work on. I'll copy and paste the description given by Francois since its very useful.