Joel Nitta
Chiba University
https://www.joelnitta.com
https://joelnitta.github.io/bioc_cab_2023-07-14
Not as simple as just re-writing text in another language as if translating a novel
Carpentries lessons are technical documents (rendered using software) and therefore present unique challenges
https://carpentries-incubator.github.io/targets-workshop/basic-targets.html#run-the-workflow
Two aspects:
internationalization (i18n
): Providing the framework to support translation (requires technical knowledge)
localization (l10n
): Actually translating strings (requires linguistic knowlege)
The old Carpentries lesson format is called the “Styles” format
The Styles format is based on Jekyll (and some other tools)
Translation system1 designed by David Pérez-Suárez used a tool called PO4gitbook
All translations controlled from a central repo* with submodules for each lesson
Rendering not straightforward
Various methods used to localize
The upcoming Carpentries lesson format is called “Workbench”, developed by Zhian Kamvar
The Workbench format is based on R and pandoc-flavoured markdown
dovetail
Each translation is contained within each lesson1
Rendering is easily accomplished locally by the translator
Plan to have a standard system for localization (e.g., pushing/pulling from crowdin)
dovetail
library(dovetail)
# Copy (untranslated) files needed for rendering lesson
create_locale("ja")
# Create PO files ----
create_po_for_locale("ja")
# Edit PO files ----
# for example, with
# usethis::edit_file("po/ja/01-introduction.po")
# Translate md files ----
# translate all (R)md files at once to `./locale/{lang}/`
translate_md_for_locale("ja")
# Build translated lesson ----
sandpaper::build_lesson("locale/ja/")
dovetail
Output of translation
|-- CONTRIBUTING.md # - Carpentries Rules for Contributions
|-- README.md # - Describes lesson
...
|-- po # - NEW, contains PO files for translation
| `-- ja/
| |-- 00-introducition.po
| |-- CONTRIBUTING.po
| |...
|-- locale # - NEW, contains translated files
| `-- ja/
| |-- CONTRIBUTING.md # - NEW, translated markdown files
| |-- site/ # - NEW, translated, rendered site
| |-- built/
| |...
dovetail
design philosophyi18n
)
l10n
)
l10n
) simple, we can encourage participation and grow local communities