Skip to content

Creating a new language

Vicky Vergara edited this page Oct 20, 2018 · 7 revisions

IMPORTANT

  • Only publish on the new language the 100% translated files
  • Transifex only has the files in master branch
  • This instructions are based on the Japanese language
  • All instructions & directory trajectories are from the root of the repository

Prepare the Japanese documentation

  1. Go to master branch
git checkout master
  1. Download the translation
bash tools/transifex/download_translation.sh ja
  1. Build the Japanese documentation
bash tools/transifex/build_translations.sh ja
  1. Preview the generated translation

The generated documentation can be found on _build/doc/html/ja, use your favorite browser

Add the translation to the workshop site

  1. Workshop site is on branch gh-pages
git checkout gh-pages
  1. Copy the documentation to the latest version directory
cp -r _build/doc/html/ja 2.5
  1. add, commit & push
git add 2.5/ja
git commit -m '<meaningful message>'
git push

Add new language to the workshop version

  1. Edit the index.html and add the lines to the html list that corresponds:
<li>
     <a class="reference internal" href="2.5/en/index.html">English</a> ,
     <a class="reference internal" href="2.5/ja/index.html">日本語</a>
</li>
  • Additional languages are added to that section.
  1. Repeat step 1 for each <lang>-index.html found.
  2. Check navigation
  • Use your favorite browser to navigate on the local computer
  1. add, commit & push
git commit -a -m '<meaningful message>'
git push

Add new language to workshop

  1. Edit index.html and add the new language,
     <p class="rubric">Read me in:</p>
                     <a class="reference internal" href="index.html">English</a>
                     - <a class="reference internal" href="ja-index.html">日本語</a>
                     - <a class="reference internal" href="<lang>-index.html">Language name</a>
  • Repeat the step for each <lang>-index.html
  1. Create a new <lang>-index.html file (example Japanese)
cp index.html ja-index.html
  1. Update links
  • Edit ja-index.html file
  • Change en to ja where it applies, example: href="2.5/en/index.html" -> href="2.5/ja/index.html" if 2.5/ja directory exists.
  1. Test navigation
  • check navigation using your favorite browser
  1. add commit & push
git add ja-index.html
git commit -a -m '<meaningful message>'
git push
  1. Translate manually to Japanese
  • Translate ja-index.html file
  1. add, commit & push
git commit -a -m '<meaningful message>'
git push