|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Enigma! |
| 4 | + |
| 5 | +We recommend discussing your contribution with other members of the community - either directly in your pull request, |
| 6 | +or in our other community spaces. We're always happy to help if you need us! |
| 7 | + |
| 8 | +Enigma is distributed under the [LGPL-3.0](LICENSE). |
| 9 | + |
| 10 | +## Translating |
| 11 | +Translations are loaded from [enigma/src/main/resources/lang/](enigma/src/main/resources/lang/). |
| 12 | + |
| 13 | +These are the currently supported languages and their corresponding files: |
| 14 | + |
| 15 | +| Language | File | |
| 16 | +|----------------------------|--------------| |
| 17 | +| English (U.S.) **default** | `en_us.json` | |
| 18 | +| Chinese (Simplified) | `zh_cn.json` | |
| 19 | +| French | `fr_fr.json` | |
| 20 | +| German | `de_de.json` | |
| 21 | +| Japanese | `ja_jp.json` | |
| 22 | + |
| 23 | +If a language you'd like to translate isn't on the list, feel free to ask for help on |
| 24 | +[Quilt's Discord Server](https://discord.quiltmc.org/)! |
| 25 | + |
| 26 | +### Search Aliases |
| 27 | +Many elements in Enigma's GUI support search aliases, but most don't have any aliases. |
| 28 | +A full list of search alias translation keys is [below](#complete-list-of-search-alias-translation-keys). |
| 29 | +Search aliases are alternative names for an element that a user might search for when looking for that element. |
| 30 | +For example, the `Dev` menu element has two search aliases: `"Development"` and `"Debugging"`. This means that if a user |
| 31 | +searches for "Debug", the `Dev` menu will be a search result. |
| 32 | + |
| 33 | +Search aliases are language-specific, so there's no need to translate the English aliases if they aren't likely |
| 34 | +to be searched for in your target language. In fact, any language may add additional aliases that aren't present in the |
| 35 | +English translation. |
| 36 | + |
| 37 | +Since elements can have multiple search aliases, their translations can be lists. Aliases are separated by `;`.<br> |
| 38 | +For example, the `Dev` menu's aliases look like this in the translation file: `"Development;Debugging"` |
| 39 | +This means that aliases may not contain the `;` character. |
| 40 | + |
| 41 | +Some things to keep in mind when adding search aliases: |
| 42 | +- elements' names are always searchable; there's no need to add their names to their aliases |
| 43 | +- searching is case-insensitive, so there's no need to add variations that only differ in capitalization |
| 44 | +- searching matches prefixes, so there's no need to add variations that are prefixes of one another, |
| 45 | +just add the longest variation (note that the element name may be a prefix of an alias, as is the case with `Dev`'s |
| 46 | +`"Development"` alias) |
| 47 | + |
| 48 | +If you'd like to add search aliases to an element that doesn't already have aliases, add its alias translation key to |
| 49 | +its translation file. |
| 50 | + |
| 51 | +#### Complete list of search alias translation keys |
| 52 | +| Element | Translation Key | |
| 53 | +|-----------------------------|-------------------------------------------| |
| 54 | +| `Dev` menu | `"dev.menu.aliases"` | |
| 55 | +| `Collab` menu | `"menu.collab.aliases"` | |
| 56 | +| `Decompiler` menu | `"menu.decompiler.aliases"` | |
| 57 | +| `Help` menu | `"menu.help.aliases"` | |
| 58 | +| `Search` menu | `"menu.search.aliases"` | |
| 59 | +| `Crash History` menu | `"menu.file.crash_history.aliases"` | |
| 60 | +| `File` menu | `"menu.file.aliases"` | |
| 61 | +| `Open Recent Project` menu | `"menu.file.open_recent_project.aliases"` | |
| 62 | +| `Save Mappings As...` menu | `"menu.file.mappings.save_as.aliases"` | |
| 63 | +| `View` menu | `"menu.view.aliases"` | |
| 64 | +| `Entry Tooltips` menu | `"menu.view.entry_tooltips.aliases"` | |
| 65 | +| `Languages` menu | `"menu.view.languages.aliases"` | |
| 66 | +| `Server Notifications` menu | `"menu.view.notifications.aliases"` | |
| 67 | +| `Scale` menu | `"menu.view.scale.aliases"` | |
| 68 | +| `Stat Icons` menu | `"menu.view.stat_icons.aliases"` | |
| 69 | +| `Themes` menu | `"menu.view.themes.aliases"` | |
0 commit comments