Translating - WULF-USA/Official-Website GitHub Wiki
1. Sign up for a GitHub account
First go to https://github.com and create an account. Then send a message to one of the project administrators to get added to the project.
2. Assign yourself to a translation project
Go to the Issues tab at the top of the screen and take a look at the list of open translation projects. If your language isn't listed, talk to one of the repository administrators. Once you find a project you would like to start on, click on the issue and on the right-hand side, click Assignee and click your GitHub username (multiple contributors can be assigned to a single issue).
3. Create a branch
First, find out your language code. If you don't know what it is, see the Important Notes section at the bottom of this article.
Go to the Code tab at the top of your screen and click on the button at the top-left that says Branch: master
. If a branch called trans-YourLanguageCode
already exists, click on it. Otherwise, click the box titled 'Find or create a branch' and create a new one called trans-YourLanguageCode
and press enter. If you don't know what your language code is, ask a project administrator.
Every time you come back to translate, make sure this box has your branch selected and not master
, otherwise your changes will not be able to be merged in!
4. Start translating
Below the branch selector is a list of folders and files. Click on the folder i18n
. This folder contains all translation data. Inside you will find a list of files, one for each language. The file en.yml
is your reference file as it contains a full list of all the strings that need to be translated. Find the file that has your language code and ends in .yml
and click on it, then click the pencil icon in the upper right-hand corner.
If it doesn't exist, click Create New File
in the upper right-hand corner. To ensure good translation accuracy, begin by copying and pasting the contents of en.yml
to the new file. At the top, name your file YourLanugageCode.yml
.
Each line contains a refcode and sometimes a string. If a link looks like this:
title: Blog Posts
title
is the refcode, and Blog Posts
is the string that needs to be translated. So if the translation for blog posts in your language is Foo Bar
, then you would change the line to look like this:
title: Foo Bar
5. Saving your work
If you need to walk away from translating or have finished translating everything, scroll down to where it says Commit Changes. You should see two boxes. In the smaller one, write a brief summary of your changes. For example: `More spanish translations". In the larger box, you can write a more detailed description of what you have done, or you can leave it blank. Click the green Commit Changes button and your changes are saved!
Important notes
What if I can't translate a certain string?
Just leave the English translation.
%1
in the strings?
What are these random This means that on the actual website, it will be replaced with a value, like a date/time/username/etc... Ask a developer or project administrator if you are unsure of what will be filled in here.
What is my language code?
Look at the issue you assigned yourself to or go to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes and look in the 639-1
column.