Language documentation (#2467)

* Update _list.json

* Update _list.json

* Create LANGUAGES.md

* 1st part of the content

* Finish language guidlines

* Fixed grammatical errors, typos and made some improvements

* Fixes and Additions

* Update THEMES.md

* Update LANGUAGES.md

* Add Languages.md link
This commit is contained in:
Teddi 2022-02-13 09:33:02 -06:00 committed by GitHub
parent 59839352bb
commit ada4401362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 4 deletions

View file

@ -123,6 +123,8 @@ Before submitting a theme make sure...
- Be sure to add your language to the `_list` and `_groups` files
- Make sure the number of words in the file corresponds to the file name (for example: `languageName.json` is 200 words, `languageName_1k.json` is 1000 words, and so on)
(If you want to contribute languages but don't know how to, check [LANGUAGES.md](https://github.com/teddinotteddy/monkeytype/blob/30f77fdc271c52743e8541d3bd2d27e23a4f5fab/LANGUAGES.md))
#### Quote Guidelines
- Do not include content that contains any libelous or otherwise unlawful, abusive or obscene text.

56
LANGUAGES.md Normal file
View file

@ -0,0 +1,56 @@
### **Table of Contents**
- [Forking Monkeytype](#forking-monkeytype)
- [Creating Languages](#creating-langauges)
- [Commiting Langauges](#commiting-languages)
- [Language Guidelines](#language-guidelines)
### Forking Monkeytype
First you will have to copy the Monkeytype repository also known as forking. Go to the [Monkeytype Repo](https://github.com/Miodec/monkeytype/) and then click the "fork" button.
<img width="1552" alt="Screen Shot 2022-01-12 at 11 51 49 AM" src="https://user-images.githubusercontent.com/83455454/149194972-23343642-7a1f-4c0c-b5f2-36f4b39a2639.png">
## Creating Langauges
Once you have forked the repository you can now add your langauge. (If you haven't already forked the repository, refer to this [section](#forking-the-repository).) Create a file in ```./frontend/static/languages/```. Create a json file with the language name and the amount of words. e.g ```language_1k.json```. The minimum amount of words needed are 200 and if that is the amount of words you chose to add then ignore the ```_1k``` part of the name. Otherwise the name should look something like this: ```language_1k.json```. The inside of the file should look like this:
```
{
"name": "language",
"leftToRight": true,
"bcp47": "es-ES",
"words": [
"words",
]
}
```
(It is recommended that you familiarize yourselves with JSON before adding a language.) For the name varible put the name of your language. Left to right indicates how the language is written. If it is written left to right then put ```true``` otherwise put false. For bcp47 put your languages IETF language tag. (For more information about the IETF language tag refer to [here]("https://en.wikipedia.org/wiki/IETF_language_tag").) But you aren't done just yet. You need to add your language to the ```_groups.json``` and ```_list.json``` files.
Add the name of the language to the ```_groups.json``` file like so:
```
{
"name": "language",
"languages": ["language"]
}
```
And add your language to the ```_list.json``` file like so:
```
,"spanish"
,"spanish_1k"
,"spanish_10k"
,"YOUR_LANGUAGE"
,"french"
,"french_1k"
,"french_2k"
```
### Commiting Languages
Once you have created your language you now need to create a pull request on the main Monkeytype repository. Go to the branch where you created your languages on GitHub.
Then make sure your branch is up to date. Once it is up to date click contribute.
Update branch:
<img width="1552" alt="Screen Shot 2022-01-12 at 10 55 19 AM" src="https://user-images.githubusercontent.com/83455454/149186547-5b9fe4fd-b944-4eed-a959-db43f96198bf.png">
Create a pull request:
<img width="1552" alt="Screen Shot 2022-01-12 at 10 56 42 AM" src="https://user-images.githubusercontent.com/83455454/149186637-66dae488-05ae-45c4-9217-65bc36c4927b.png">
## Language Guidelines
Make sure your language follows the language guidelines.
[Language guidelines](https://github.com/Miodec/monkeytype/blob/master/CONTRIBUTING.md#language-guidelines)

View file

@ -1,18 +1,18 @@
### **Table of Contents**
- [Forking the Repository](#forking-the-repository)
- [Forking Monkeytype](#forking-monkeytype)
- [Creating Themes](#creating-themes)
- [Commiting Themes](#commiting-themes)
- [Theme Guidelines](#theme-guidelines)
### Forking the Repository
First you will have to copy the repository also known as forking. Go the the [Monkeytype Repo](https://github.com/Miodec/monkeytype/) and then click the "fork" button.
### Forking Monkeytype
First you will have to copy the Monkeytype repository also known as forking. Go to the [Monkeytype Repo](https://github.com/Miodec/monkeytype/) and then click the "fork" button.
<img width="1552" alt="Screen Shot 2022-01-12 at 11 51 49 AM" src="https://user-images.githubusercontent.com/83455454/149194972-23343642-7a1f-4c0c-b5f2-36f4b39a2639.png">
## Creating Themes
After you have forked the repository you can now add your theme. (If you haven't already forked the repository yet refer to [here](#forking-the-repository))
After you have forked the repository you can now add your theme. (If you haven't already forked the repository yet refer to [here](#forking-the-repository).)
Create a file in ```./frontend/static/themes/```. Call it whatever you want but make sure that it is all lowercase and underscores for spaces. It should look something like this:
```theme_name.css```.
@ -60,4 +60,5 @@ After that add some screenshots of your theme to the pull request. Click create
then your new theme is on Monkeytype.
## Theme Guidelines
Make sure your theme follows the theme guidelines.
[Theme guidelines](https://github.com/Miodec/monkeytype/blob/master/CONTRIBUTING.md#theme-guidelines)