-
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 format and make it easier to see what is not yet translated and what is already translated.
First you have to create .po
file 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.
Then, you can start your translation and when done, submit it to the GitHub repository using a pull request
Note: If you don't have yet, register a GitHub account so you can submit your pull request.
Note 2: If you don't have any Git/GitHub experience, read those first:
Optionally, if you wish to get into advanced Git, then read The Git Documentation (takes some time)
You can skip this step if you wish to clone the repository directly, but I recommend to fork it first so you can submit the pull request using the GitHub website interface, which I find easier to do.
Go to the OpenSpades repository page and click "fork" at the upper right corner.
Now you've successfully forked the repository.
Note: You can delete the fork later, after you're finished with the translations.
If you don't have it yet, install git.
Then, clone your fork at a directory of your choice.
git clone https://github.com/*yourUsername*/openspades.git
Now that you cloned the repository into your computer:
- Navigate to the cloned repository folder
- Go to
Resources/Locales/Pot/
- There you'll find the
openspades.pot
file 😄
Create a new directory inside Resources/Locales/
with you language code. (e.g. en
, pt_BR
)
- If you are using Poedit
- Open the
.pot
file with Poedit - Save the generated
.po
in the newly created directory. (e.g.en
,pt_BR
) - Edit the file anytime you want and submit the translation when finished.
- If you are using a common text editor (e.g. Notepad++, Geany, Gedit, Vim, Emacs)
- Copy the
.pot
file to your newly created directory (e.g.en
,pt_BR
) - Change the extension from
.pot
to.po
- Edit the file anytime you want and submit the translation when finished.
- Add the changed file
git add Resources/Locales/*LANGUAGE*/openspades.po
- Commit
git commit -m "Add Klingon language"
- Upload to our fork
git push
If you haven't, please read Forking tutorial
- Navigate to your forked repository inside GitHub.
- GitHub will say you can submit a pull request
- Submit it
- Wait for it to be approved
That's it 👍
Note (update-pot.sh still has to be explained)
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.