-
Notifications
You must be signed in to change notification settings - Fork 219
Translation
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:
After completing the requirements, it's necessary that you fork this repository and then clone
it in your computer.
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:
- Clone the repository if you haven't already
- Navigate to
Resources/Locales/
- Create a new folder with your language code. (e.g.
Resources/Locales/de
) - Copy
Resources/Locales/pot/openspades.pot
inside your new folder - Change the extension of your newly copied file to
.po
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
Translation with Poedit is very simple.
- Navigate to you clone and the navigate to
Resources/Locales/*LANGUAGE*
- Open the
openspades.po
file with Poedit - Ensure the
openspades.po
file is up to date with the latestopenspades.pot
- In the manu bar, open the Catalog menu
- Click Update from POT file
- Select
Resources/Locales/pot/openspades.pot
as the POT file - Start translating right away
- When finished, submit you changes to us :)
Tip: You can make Poedit show the untranslated entries first inside the View menu.
- Navigate to the root of your clone
- Commit your changes either via GUI or using command-line. e.g.:
git add Resources/Locales/tlh/openspades.po
git commit -m "Add Klingon language"
git push
- Go to your fork inside the GitHub website
- Submit a pull request
- Wait for it to be approved
This page has a bit of missing information that needs to be added someday, however, those are not crucial.
lang.json
update-pot.sh
This wiki is in the middle of an update process to match the latest changes of OpenSpades 0.1.2
It may contain outdated, incorrect or incomplete information.
Please contact the repository owner (@yvt) via email or ask a question in the issue tracker if there is any obscure information you are looking for that can't be found in neither the source code nor in this wiki.