maskmath icon indicating copy to clipboard operation
maskmath copied to clipboard

Contributor's Guide: Adding Translations

Open aatishb opened this issue 4 years ago • 39 comments

Contributor's Guide: Adding Translations

Thanks for your interest in contributing translations to this interactive essay!

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.

The index.html page contains the entire text of the article in English. To add a translation, you'll need to make a copy of this file and then go through this document line by line and translate it.

Steps to Contribute a Translation

  • 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 Screen Shot 2020-09-09 at 4 29 01 PM

  • Next, set up a live website for your fork. To do this, on your own fork of maskmath, click Settings on the top right. Screen Shot 2020-09-09 at 4 37 37 PM

  • Scroll down to GitHub Pages and select the master branch and click save. Screen Shot 2020-09-09 at 4 31 51 PM

  • 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. Screen Shot 2020-09-09 at 4 52 39 PM

  • 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. Screen Shot 2020-09-09 at 4 55 20 PM Screen Shot 2020-09-09 at 4 55 12 PM

  • 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. Screen Shot 2020-09-09 at 5 01 33 PM

  • 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. Screen Shot 2020-09-30 at 10 54 26 AM Untitled

  • 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. Screen Shot 2020-09-09 at 5 08 30 PM Screen Shot 2020-09-09 at 5 12 49 PM

  • 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. Screen Shot 2020-09-09 at 5 13 35 PM

  • Your Pull Request will be reviewed and once accepted you will be added as a contributor.

Thank you so much for contributing!

aatishb avatar Sep 09 '20 21:09 aatishb

Hi, I would like to help with the Spanish translation!

mariapaula9926 avatar Sep 10 '20 20:09 mariapaula9926

@mariapaula9926 sounds good, and thanks!

aatishb avatar Sep 10 '20 20:09 aatishb

Hello, I think I could do the Italian translation! thanks for sharing this, by the way... excellent job! :)

albannabla avatar Sep 11 '20 04:09 albannabla

Hi, I'm ~half way through the French translation in https://github.com/nlehuen/maskmath/blob/master/index-fr.html. Will continue tomorrow!

nlehuen avatar Sep 11 '20 21:09 nlehuen

Hello!! I would like to contribute with a translation to Brazilian Portuguese :)

gnegrelligarcia avatar Sep 11 '20 21:09 gnegrelligarcia

Hello, there are parts that cannot be translated from the HTML file... is this ok? example:

Screen Shot 2020-09-12 at 7 57 21 AM

albannabla avatar Sep 11 '20 23:09 albannabla

We have a fix in the works for this with https://github.com/aatishb/maskmath/pull/5 (as well as a fix for translating the titles and annotations for the two graphs). I'd suggest ignoring this for now and when you submit the pull request we can take care of it.

aatishb avatar Sep 12 '20 00:09 aatishb

We have a fix in the works for this with #5 (as well as a fix for translating the titles and annotations for the two graphs). I'd suggest ignoring this for now and when you submit the pull request we can take care of it.

Brilliant, thank you!

albannabla avatar Sep 12 '20 00:09 albannabla

Hi, I'm up for a translation to German.

tobiv avatar Sep 12 '20 21:09 tobiv

Hi there, I'd be happy to help with the Russian translation!

ulkar-aghayeva avatar Sep 13 '20 19:09 ulkar-aghayeva

Hi, I will start the Czech translation (cs).

progproc avatar Sep 13 '20 20:09 progproc

Hi, I'm up for a translation to German.

I would be happy to help translate or review the german translation.

mrtzkdev avatar Sep 14 '20 07:09 mrtzkdev

Hi, I saw this on @minutephysics; thanks for creating this! I would love to help with the Turkish translation (my native language) and would be able to finish by the end of this week.

pinardemetci avatar Sep 14 '20 22:09 pinardemetci

@pinardemetci (and everyone): That's great, go for it! Greatly appreciate your input!

aatishb avatar Sep 14 '20 23:09 aatishb

Hi, I would like to work on the Persian translation.

alisabzevari avatar Sep 16 '20 11:09 alisabzevari

Hello, I'd like work on traslating to Greek

pankgeorg avatar Sep 18 '20 07:09 pankgeorg

@aatishb , Greek is a gender specific language - I'm writing the credits - how do you prefer to be referenced? (He/Him, other?)

pankgeorg avatar Sep 18 '20 19:09 pankgeorg

Hi @pankgeorg, @aatishb, I just saw the 'minutephysics' video and I thought I could help you with the Greek translation, so we can save time, if you are not done already. If you are interested, e-mail me.

ismarou avatar Sep 18 '20 21:09 ismarou

@pankgeorg yes, he/him. Thanks for working on this!

aatishb avatar Sep 19 '20 16:09 aatishb

Hi, I'm up for a translation to German.

I would be happy to help translate or review the german translation.

What is the current status of the German translation?

ToniDS avatar Sep 22 '20 19:09 ToniDS

@ToniDS see my fork https://github.com/tobiv/maskmath I haven't had much time to work on it, I'll add you as a collaborator if you like.

tobiv avatar Sep 22 '20 21:09 tobiv

@ToniDS see my fork https://github.com/tobiv/maskmath I haven't had much time to work on it, I'll add you as a collaborator if you like. Yes, please! I will then fork it and write a PR to you, or is there a different workflow?

ToniDS avatar Sep 23 '20 12:09 ToniDS

well, working on Bahasa Indonesia (id) translation.

huedaya avatar Sep 25 '20 10:09 huedaya

Added the Czech translation. I am new to GitHub so I am not sure if I did the pull request right.

progproc avatar Sep 26 '20 07:09 progproc

Hi Aatish Great work! I would like to help with हिन‍्दी translation.

Sunny121294 avatar Sep 29 '20 10:09 Sunny121294

Hey there! Is Dutch still available? Otherwise I can provide the Dutch translation!

Cheers, Frank

fbuters avatar Oct 01 '20 11:10 fbuters

@fbuters @Sunny121294 go for it!

aatishb avatar Oct 01 '20 13:10 aatishb

@fbuters @Sunny121294 go for it! Alright! Hope to have it finished during upcoming weekend :)

fbuters avatar Oct 01 '20 14:10 fbuters

@aatishb, I'm on it.

Sunny121294 avatar Oct 07 '20 08:10 Sunny121294

I'm working on the Polish translation.

morethanoneanimal avatar Oct 14 '20 07:10 morethanoneanimal