Skip to content
Flávio Monteiro edited this page Jan 10, 2017 · 20 revisions

Requirements

Before getting started with translation, it's recommended to install a .po file editor (e.g. Poedit). This helps you write a translation file in the correct syntax and make it easier to see what is not yet translated and what is already translated.

Basic GitHub worflow knowledge is also necessary, please read this simple guide if you aren't used to Git and GitHub yet.
Having a GitHub account is also necessary, please create one if you haven't already.

These GitHub guides for starters are also very useful:

  1. https://guides.github.com/activities/hello-world/
  2. https://guides.github.com/activities/forking/

After completing the requirements, it's necessary that you fork this repository and then clone it in your computer.

Adding a new language

In case you want to translate a language that is not already present in OpenSpades, follow the instructions below.
You can see the list of languages that were already added in this wiki page.

First you have to create .po file derived from the OpenSpades .pot file.

  • The .pot file is called a template file, and contains the translatable texts.
  • The generated .po file will contain your translation.

To do this, follow these steps:

  1. Clone the repository if you haven't already
  2. Navigate to Resources/Locales/
  3. Create a new folder with your language code. (e.g. Resources/Locales/de)
  4. Copy Resources/Locales/pot/openspades.pot inside your new folder
  5. Change the extension of your newly copied file to .po (for Windows users, see this)

If you are a Windows user and the file extension is hidden, you'll have to make it visible to be able to rename the file to openspades.po

Translating

Translation with Poedit is very simple.

  1. Navigate to you clone and the navigate to Resources/Locales/*LANGUAGE*
  2. Open the openspades.po file with Poedit
  3. Ensure the openspades.po file is up to date with the latest openspades.pot
  4. In the manu bar, open the Catalog menu
  5. Click Update from POT file
  6. Select Resources/Locales/pot/openspades.pot as the POT file
  7. Start translating right away
  8. When finished, submit you changes to us :)

Tip: You can make Poedit show the untranslated entries first inside the View menu.

Submitting changes

  1. Navigate to the root of your clone
  2. Commit your changes either via GUI or using command-line. e.g.:
  3. git add Resources/Locales/de/openspades.po
  4. git commit -m "Add Klingon language"
  5. git push
  6. Go to your fork inside the GitHub website
  7. Submit a pull request
  8. Wait for it to be approved

Missing information (404: Not found)

This page has a bit of missing information that needs to be added someday, however, those are not crucial.

  • lang.json
  • update-pot.sh

See also: