Skip to content

Tips for translators

Petar Kirov edited this page May 30, 2017 · 16 revisions
  • Copy the English sources from English repo to your language and then translate line by line
  • Use a dictionary or Wikipedia to find a good translation
  • Keep your PRs small - e.g. submit a PR for each file (The tool https://github.com/wilzbach/split-up-prs might help you)
  • Keep the English file names (UTF8 URLs aren't that well supported anyways)
  • Make sure to ping potential reviewers of your language on your PRs (if you know any) - tip: you might find someone on the D map
  • Don't include the index.yml in the beginning - it will just lead to merge conflicts
  • If you make changes to the code at the bottom a section (e.g. translating the comments) and you notice that your changes aren't reflected when running the tour locally, try the Reset button on the code editor

Seb's workflow

Start by cloning your language and the english base repo and go into your language folder:

git clone [email protected]:dlang-tour/english.git
git clone [email protected]:dlang-tour/german.git
cd german

and then copy over all language files to "your" language:

cp -R ../english/welcome .

Note that if you just want to translate one file, it might be better to select this file directly:

cp ../english/welcome/welcome-to-d.md welcome/

Now I translated it line-by-line (e.g. vim de/welcome/welcome-to-d.md) and then submit a PR for each changed file with splitup-prs:

splitup-prs # this will simulate which files are considered
splitup-prs -f

Please read the guide of splitup-prs first. Of course you can follow your used workflow to submit a PR, but please try to submit a PR per file - it makes the life of your reviewers a lot easier and it will also help you to (a) keep track of your work, (b) ensure your changes don't get stalled.

Open questions

  • Would it help reviewers if the first committed version is the English original, s.t. it's easier to compare within a git diff?

Known problems

For now some UI elements are translated, this will be fixed soon and the translation of these elements will be in the main index.yml.

Other translate guides

https://github.com/golang/tour/blob/master/TRANSLATE

Clone this wiki locally