You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributor_docs/i18n_contribution.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,40 +37,37 @@ If you want to contribute with p5.js website translations, you are in the right
37
37

38
38
39
39
4. Open your command-line interface (CLI) and [clone](https://help.github.com/articles/cloning-a-repository/) your fork of the p5.js-website repository to `your_directory` on your laptop by typing:
40
-
41
-
```bash
40
+
```
42
41
$ git clone repo_URL
43
42
```
44
43
45
44
5. Go to the repository's directory `[your_directory]/p5.js-website/` and install all the packages and dependencies for the website by typing (if you work on Mac it should be like `Users/[your_user]/[your_directory]/p5.js-website/`):
46
45
47
-
```bash
46
+
```
48
47
$ npm install
49
48
```
50
49
6. Check if the packages are correctly installed by typing:
51
50
52
-
```bash
51
+
```
53
52
$ npm run watch
54
53
```
55
54
56
55
7. This should open a window in your browser with the site running at http://localhost:9000.
57
56
8. Set `github.com/processing/p5.js-website` as the upstream of your local. Type the following to list the configured remote for your fork (or follow this [tutorial](https://help.github.com/articles/configuring-a-remote-for-a-fork/)):
Then specify a new remote upstream for your fork (don't forget that by doing this you are setting the upstream for your local fork, but not for your fork on Github):
66
-
67
-
```bash
63
+
9. Then specify a new remote upstream for your fork (don't forget that by doing this you are setting the upstream for your local fork, but not for your fork on Github):
@@ -84,7 +81,7 @@ Finally verify if your remote upstream has been set (it should look like this):
84
81
85
82
1. Sync your fork to keep it up-to-date with the upstream repository following the next commands or this [tutorial](https://help.github.com/articles/syncing-a-fork/). First fetch the upstream repo and its commits -commits will be stored on your local fork- and then merge changes from upstream to your local:
86
83
87
-
```bash
84
+
```
88
85
$ git fetch upstream
89
86
$ git merge upstream/master
90
87
```
@@ -93,23 +90,22 @@ Finally verify if your remote upstream has been set (it should look like this):
93
90
3. Check if your changes are correct and don't break the website render by typing `npm run watch`.
94
91
4. Commit the files you have changed, type:
95
92
96
-
```bash
97
-
$ git add -A
93
+
```
94
+
$ git add -A
98
95
$ git commit -m "add a message to your commit"
99
96
$ git push
100
97
```
101
98
102
99
5. Commit to your repository at your github account and create a new [Pull Request](https://github.com/processing/p5.js-website/wiki/Pull-requests). Click the *Pull Reques* tab on your fork page and then click the green button *New Pull Request*.
103
-

100
+

104
101
105
102
## File Structure
106
103
Under this repo there are two directories in which we have to focus:
107
-
108
-
```
109
-
p5.js-website/
110
-
src/
111
-
dist/
112
-
```
104
+
```
105
+
p5.js-website/
106
+
src/
107
+
dist/
108
+
```
113
109
114
110
* `dist/`: the actual website is stored under this directory and its files **must never be modified by hand**, they are overwritten each time the web is built.
115
111
* `src/`: contains the files from where the page is rendered, which means .hbs and .yml files for the website itself and .js and .json files for Reference and Examples. **All your changes must be done here**.
@@ -126,14 +122,14 @@ Under this repo there are two directories in which we have to focus:
126
122
127
123
1. Define an abbreviation for your language following the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) standard. It's expected that abbreviations are two-letter, but for macro languages can be added extra extensions depending on each case.
128
124
2. Open a new issue and propose the addition of the new language. If both the proposal and the abbreviation are approved proceed with the next step.
129
-
3. Add an entry with the new language abbreviation at `package.json` to the `languages` category -located under the repository root directory.
125
+
3. Add an entry with the new language abbreviation at `package.json` to the `languages` category -located under the repository root directory. Please keep the language abbreviations in alphabetical order.
130
126
131
127
```JSON
132
128
"languages": [
133
129
"en",
134
130
"es",
135
131
"zh-Hans",
136
-
"new language here"
132
+
"new language here (or in correct alphabetical spot)"
0 commit comments