Translating Ghost

A guide on how to help translate Ghost

Translating the Documentation

Getting the most recent Ghost docs

All of Ghost’s documentation (http://docs.ghost.org) is located in the gh-pages branch on the Ghost GitHub repository.

To start translating you will first need to ‘fork’ the GitHub repository branch to your own account. You can do this by clicking the ‘fork’ button in the top right corner of GitHub.

It looks like this: fork button

You should now be able to access you fork by navigating to github.com/\<your username\>/Ghost.

Once you have verified you have a working fork, you will need to download it to your computer. To download the fork to your machine, you will need to follow these steps (in the Terminal / Command prompt);

  1. Run git clone https://github.com/<your username>/Ghost.git -b gh-pages GitHub Clone
  2. Run cd Ghost

You should now be in the Ghost directory in your Terminal / Command Prompt. If you also open the Ghost folder in your directory browser of choice, you will see all the files for the Ghost documentation.

### Adding your translation

After following how to get the most recent Ghost documentation.

  1. Duplicate the /example_translation/ folder.
  2. Rename the duplicated folder to your appropriate language code (IETF language tag). e.g. en or pt_BR

If you're unsure of your language code, feel free to ask on the [forum](http://ghost.org/forum).

  1. Update all the lang: example_translation fields at the top of each .md file in your new directory to the same language code as your new directory.
  2. Update all the permalink: /example_translation/* fields at the the top of the .md files that require it (not in all the files), to permalink: /your_language_code/*. Be sure to keep the content where * is, the same.
  3. Add your language and translations to the _config.yml file. Follow the format already present, and remember to use the country code you have used in the above steps.
  4. Start translating the .md files in your new directory :)

Submitting your change

  1. Open the terminal back up, where you should still be in your /Ghost directory.
  2. Run git commit -a
  3. Name your commit message to sensibly reflect your addition / change. (press i to start typing your message) e.g “Included Welsh translations” or “Updated Welsh ‘usage’ docs”. Save your commit message by pressing ESC and typing :wq, then press enter.
  4. Submit your changes to your GitHub fork by running git push origin gh-pages. This sometimes prompts your for your GitHub username / password - enter those. You should then see some success messages.
  5. Navigate to your GitHub fork (github.com/\<your username\>/Ghost/tree/gh-pages)
  6. Click on the Pull Request button. GitHub Pull Request
  7. Enter any additional details that need to be known in the ‘description’ box.
  8. Submit your Pull Request to the TryGhost:gh-pages branch (should be automatically set).
  9. That’s it, you’re done. The Ghost team will review it and comment on any additional changes which need to be made.

Updating a translation

To update a translation you can simply follow the steps in “Adding your translation”, but ignoring all the setup and simply changing the required areas, or if you would prefer to follow a simpler alternative you can do it directly in GitHub.

In GitHub

  1. Locate the file that needs changing in the https://github.com/TryGhost/Ghost/tree/gh-pages repository.
  2. Click on file
  3. Click ‘Edit’
  4. Make your changes
  5. Add a sensible commit message e.g. “Updated Welsh ‘usage’ docs”
  6. Add a sensible description e.g. “Fixed a typo in the ‘usage’ docs where …”
  7. Read over your submission
  8. Click “Propose this file change”
  9. Feel good.

Translating the Ghost platform

Coming soon

Please do not send in translations for Ghost just yet, we are still setting up the best way to do this. We really don’t want to throw away anyone’s work.