|
1 | 1 | # Translations Guidelines
|
2 | 2 |
|
| 3 | +Translations are a great way to get started with contributing, and plays a big role in making the p5.js editor and its documentation more accessible. |
3 | 4 |
|
4 |
| -*How to contribute with Translations for p5 web editor* |
5 |
| - |
6 |
| -## General rules of thumb for translations |
| 5 | +Below are some general rules of thumb to keep in mind when contributing translations: |
7 | 6 |
|
8 |
| -In order to simplify the translations process the following rules of thumb were used: |
| 7 | +## What Can I Translate? |
| 8 | +If you're interested in translations, here's how to get started: |
| 9 | +- Please only translate languages **you speak fluently or natively**. |
| 10 | +- At this time, we do not accept machine-generated translations (i.e from Google Translate), as they often lack context or accuracy. |
| 11 | +- You can also start with reviewing or improving existing translations in languages you're familiar with as well! |
9 | 12 |
|
10 |
| -## Technical Part |
| 13 | +## How Can I Add Translations in the Codebase? |
11 | 14 |
|
12 | 15 | * There is only one file to translate all the texts in any specific language, which is located under the directory, in the respective locale [subdirectory](https://github.com/processing/p5.js-web-editor/tree/develop/translations/locales)
|
13 | 16 | * The new language code must be added to [client/i18n.js](https://github.com/processing/p5.js-web-editor/blob/edae248eede21d7ad7702945929efbcdfeb4d9ea/client/i18n.js#L22)
|
@@ -55,7 +58,7 @@ export function languageKeyToLabel(lang) {
|
55 | 58 | }
|
56 | 59 | ```
|
57 | 60 |
|
58 |
| -## Translations |
| 61 | +## Handling Translations Files |
59 | 62 |
|
60 | 63 | * Every component should introduce its own subset of keys inside a dictionary named after the component.
|
61 | 64 | For instance: If you want to translate AssetList.jsx you need to introduce the following namespace in translations.json :
|
@@ -92,5 +95,5 @@ Did you want to know the context?
|
92 | 95 |
|
93 | 96 | Thanks!
|
94 | 97 |
|
95 |
| -P5.js Web Editor Community |
| 98 | +p5.js Editor Community |
96 | 99 |
|
0 commit comments