This step-by-step guide is written assuming that this may be your first time contributing on GitHub. If you have questions or concerns, you can leave a comment below, open a new issue, or send me an email. If you're familiar with Github, you can skim through this guide.
We encourage contributions of all kinds, including from first-time GitHub contributors, and are acknowledging all contributions on the Github Page using the All Contributors system.
-
Sign up for a Github Account if you don't already have one.
-
So that we don't double our efforts, first check if anyone is already working on this translation in the comment thread below. If no one is translating to this language, leave a comment below letting us know that you would like to proceed with a translation (don't forget to include the language you're translating to!)
-
If someone else is already working on a translation for this language, we can still use your help in reviewing this translation. If the translation is already live and you want to make improvements (e.g. correct a typo or fix a broken link), you can do so by simply editing the file and submitting a Pull Request. If you have many edits, it's better that you follow the procedure below to combine your changes into a single Pull Request. If the translation is not yet live (i.e. someone is currently working on it), you can indicate your interest in collaborating on it or reviewing it with a comment below tagging whoever is working on it.
-
On the Github Page for maskmath, click the Fork button on the top right. This will create your own personal copy of the contents of this website (known as a fork), accessible at https://github.com/your-username/maskmath
-
Next, set up a live website for your fork. To do this, on your own fork of maskmath, click Settings on the top right.
-
Scroll down to GitHub Pages and select the master branch and click save.
-
This will let you view your local version of the website at https://your-username.github.io/maskmath/
. Check that this link works, you should see a copy of the original mask math essay.
-
Next, make a copy of index.html
with the two-letter language code of the language you are translating to. For example, if you are translating to Spanish, this file will be called index-es.html
If you're new to GitHub, here's how to go about doing this. First copy the contents of index.html
to the clipboard. Then, on your fork of maskmath, click here to create a new file.
-
Give this file the name index-languagecode.html
where languagecode
is the two letter language code (e.g. index-es.html
). Next, paste in the contents of the original index.html file and when you're done click Commit new file to save changes.
-
If this worked, you should shortly be able to access this new page online at https://your-username.github.io/maskmath/index-languagecode.html
-
In your fork, click on the index-languagecode.html
file and press the edit button on the top right.
-
In Line 3 of the this file which reads <html lang="en">
, replace the language code en
with the language code that you are translating into.
-
You can now go through this file line by line and translate all the English text. After you translate a section, press the commit changes button at the bottom of the page to save your changes.
-
It's better to do this in short stretches because then you can open the live website at https://your-username.github.io/maskmath/index-languagecode.html
to test and make sure the changes are working as expected. If you make a mistake, you can compare your changes against index.html to see what went wrong. (Click Commits on your fork to see a complete list of all your changes.)
-
(More advanced) If you prefer to work locally on your computer instead of on the GitHub website, you can use the GitHub Desktop client and a text editor like Sublime Editor.
-
You're encouraged to add a line of credit to yourself in the translation. In the Credits & References section of index-languagecode.html
next to the sentence This essay was created by Aatish Bhatia in collaboration with Henry Reich.
For example, you can add a (translated) sentence like It was translated into [your-language] by [your-name].
You can link your name to your website or social media profile.
-
In your fork, click on the folder js
, and then click on the file vue-definitions.js
and press the edit button on the top right. Look for the section that lists all the translations (around line 250). Duplicate the last entry in this list, then edit it so that it points to the correct url and name of the language you are translating into, and save changes. If this worked correctly, you should shortly see your language listed in the header of the page. Confirm that this link works as expected.
-
When you're done with the translation and have tested that that the website loads as expected, make a Pull Request to incorporate your changes into the original maskmath website. To do this, in your fork of maskmath, click the Pull request button, and then click Create pull request.
-
Add a title and description, and Create your pull request. You can add any relevant notes in here. Please keep the Allow edits by maintainers
button ticked as this will help me easily merge your changes.
-
Your Pull Request will be reviewed and once accepted you will be added as a contributor.