## Local rendering of Ukrainian git-novice In R, install {sandpaper}: ```r options(repos = c( carpentries = "https://carpentries.r-universe.dev/", CRAN = "https://cran.rstudio.com/" )) install.packages("sandpaper", dep = TRUE) ``` Also install {dovetail}, which is used for building the translated website: ```r remotes::install_github("joelnitta/dovetail") ``` At the terminal, clone `git-novice` from `ukrainian-carpentries`: (code if you use SSH) ```bash git clone git@github.com:ukrainian-carpentries/git-novice.git ``` (code if you use HTTPS) ```bash git clone https://github.com/ukrainian-carpentries/git-novice.git ``` In R, run the following code with the `git-novice` repo that you just cloned as the working directory: ``` library(dovetail) render_trans_from_branch(lang = "uk") ``` You should see the translated website appear in your browser. This is a **local** website, not online yet. The website is built in the `site` folder, which is currently ignored by git. We can make this live (online) by tracking it with git (un-ignoring it), then telling GitHub to build the website from `site`. I think we can wait to do that until the website is mostly translated. ## Syncing the l10n_main branch across forks With the current setup, the Crowdin translations are not sent directly to <https://github.com/ukrainian-carpentries/git-novice>. Rather, they first get sent to the the `l10n_main` branch of <https://github.com/swcarpentry-ja/git-novice>, then they need to be copied from there to <https://github.com/ukrainian-carpentries/git-novice> (in other words, you need to "sync the fork"). This can be done on GitHub by going to <https://github.com/ukrainian-carpentries/git-novice/tree/l10n_main> and clicking on `Sync fork`: ![image](https://hackmd.io/_uploads/r1qCUj0Oa.png) Once you sync the fork, the [translated Ukrainian website](https://ukrainian-carpentries.github.io/git-novice/) should be built automatically. Note that Crowdin only sends new translations to Github once per hour, so it may take up to one hour after making new translations (or approvals) before you are able to sync the fork. If you have Developer-level permissions in Crowdin, you can immediately send the new translations to GitHub by pressing the "Sync Now" button in the GitHub integration in Crowdin [as described in the translation guide](https://hackmd.io/@joelnitta/SkCSC6ZNT#About-branches). ## Downloading the translated MD files One fail-safe back up plan is download the translated MD files and use these to build your own Workbench lesson. - Go to <https://bioconductor.crowdin.com/git-novice/uk>, click on the three dots button next to the file name, and click "Download" to download the translated MD file. ![image](https://hackmd.io/_uploads/ByWzjsAOT.png) ![image](https://hackmd.io/_uploads/HJE12s0_p.png)