rOpenSci package or resource used
The babeldown R package.
What did you do?
We have training materials built with the Carpentries workbench and wanted to translate them in Spanish for an upcoming training with a Peruvian audience.
Since lessons in the workbench are markdown and Rmarkdown files, babeldown appeared as a good candidates to speed up the creation of a first draft.
Output files were placed in the locale/es/episodes/
, following the convention started by @joelnitta in dovetail.
The ML-generated translations, after a first rough automated post-processing (see below), were reviewed by native Spanish speakers: Test Spanish translation via babeldown by Bisaloo · Pull Request #95 · epiverse-trace/tutorials-middle · GitHub
URL or code snippet for your use case
Image
Sector
academic, non-profit, government
Field(s) of application
epidemiology, pedagogy
Comments
One issue we encountered was in the unwanted translation of div classes.
The workbench makes extensive use of fenced divs to add specific blocks in the lessons: objectives, keypoints, challenges, callouts, solutions, hints, etc.
Currently, the text defining the class of these divs is extracted by babeldown and translated, which required an automated + manual revert of these changes:
sed -i -r 's/(:+) llamada/\1 callout/g' *
sed -i -r 's/(:+) objetivos/\1 objectives/g' *
sed -i -r 's/(:+) preguntas/\1 questions/g' *
sed -i -r 's/(:+) prerrequisito/\1 prereq/g' *
sed -i -r 's/(:+) puntos clave/\1 keypoints/g' *
sed -i -r 's/(:+) desafío/\1 challenge/g' *
sed -i -r 's/(:+) lista de control/\1 checklist/g' *
sed -i -r 's/(:+) discusión/\1 discussion/g' *
sed -i -r 's/(:+) testimonio/\1 testimonial/g' *
I believe this is tracked in a feature request in tinkr: protect_triplecolons? · Issue #98 · ropensci/tinkr · GitHub.