|
| 1 | +# Translations Guidelines |
| 2 | + |
| 3 | + |
| 4 | +*How to contribute with Translations for p5 web editor* |
| 5 | + |
| 6 | +## General rules of thumb for translations |
| 7 | + |
| 8 | +In order to simplify the translations process the following rules of thumb were used: |
| 9 | + |
| 10 | +## Technical Part |
| 11 | + |
| 12 | +* There is only one file to translate all the texts in any specific language, which is located under the directory, in respective locale [subdirectory](https://github.com/processing/p5.js-web-editor/tree/develop/translations/locales) |
| 13 | +* The new language code must be added to [client/i18n.js](https://github.com/processing/p5.js-web-editor/blob/develop/client/i18n.js#L7) |
| 14 | +* New languages will need to be selected using a dropdown in Nav component, specifically in function [renderLanguageMenu.](https://github.com/processing/p5.js-web-editor/blob/develop/client/components/Nav.jsx#L550) |
| 15 | + |
| 16 | +## Translations |
| 17 | + |
| 18 | +* Every component should introduce its own subset of keys inside a dictionary named after the component. |
| 19 | + For instance: If you want to translate AssetList.jsx you need to introduce the following namespace in translations.json : |
| 20 | +```json |
| 21 | + "AssetList": { |
| 22 | + "Title": "p5.js Web Editor | My assets", |
| 23 | + "ToggleOpenCloseARIA": "Toggle Open/Close Asset Options", |
| 24 | + "OpenNewTab": "Open in New Tab", |
| 25 | + "HeaderName": "Name", |
| 26 | + } |
| 27 | +``` |
| 28 | +* There are common texts that are present with `Common` prefix, try to check first if the exact label is already present there. |
| 29 | +* Every key follows PascalCase case style. |
| 30 | +* Every key that is used in an ARIA text should end with the suffix `ARIA`. |
| 31 | +* The order of keys inside of appearance should be order of in the order they appear in the source code |
| 32 | + |
| 33 | +## Language Use |
| 34 | + |
| 35 | +The Processing Foundation is specifically invested in expanding the communities of technology and the arts to include and support those who have not had equal access because of their race, gender, class, sexuality, and/or disability. We see software as a medium, something that connects two things. We view it as a means for thinking and making. We believe software, and the tools to learn it, should be accessible to everyone |
| 36 | + |
| 37 | +With those principles in mind, we want to strongly suggest the use of non-gendered terms whenever possible. If it is not possible to avoid, use the most inclusive version. |
| 38 | +For instance, in Spanish translation we tackled that problem with a particular rule of thumb: |
| 39 | +Avoid male-gendered words, use instead the letter ‘e’ , we used the ‘e’ approach vs other approaches like ‘x’ or ‘@’ because you also need to think about how screen readers would read the text aloud. |
| 40 | + |
| 41 | +## Background |
| 42 | + |
| 43 | +Did you want to know the context? |
| 44 | +* The original idea for Alpha Editor in Spanish was addressed in [this issue](https://github.com/processing/p5.js-web-editor/issues/595) |
| 45 | +* The discussion regarding which library to use was addressed in [Library](https://github.com/processing/p5.js-web-editor/issues/1447) |
| 46 | +* [UI Design](https://github.com/processing/p5.js-web-editor/issues/1434) |
| 47 | +* [Language Use](https://github.com/processing/p5.js-web-editor/issues/1509) |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +Thanks! |
| 52 | + |
| 53 | +P5.js Web Editor Community |
| 54 | + |
0 commit comments