diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ba1a63..3b593ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,3 +20,34 @@ If you send a pull request, then discover that you have made a mistake, feel fre Pull requests and all commits to the prelude repository are automatically run through a validator to check for syntax errors. Nevertheless, it is advisable to test your changes on your own LOOT install before sending a pull request, as they may have valid syntax but not have the intended effect. Instructions on how to do so can be found on [LOOT's wiki](https://loot.github.io/docs/contributing/Quickly-Testing-Your-Masterlist-Changes). + +### Translations + +`prelude.yaml` contains localised messages that are used by LOOT, and the data structure used to localise messages in LOOT's metadata files (including the prelude) is described [here](https://loot-api.readthedocs.io/en/stable/metadata/data_structures/localised_content.html). The localized content data structures should be sorted alphabetically by locale code with the exception of `en` at the beginning since it is LOOT's default language. + +The `translations` directory is used to integrate with [Weblate](https://hosted.weblate.org/projects/loot/prelude/) so that translations can be managed and maintained there. The `translations` directory contains `messages..yaml` files, where `` is a POSIX locale code (see the table below for examples). Each file contains a map where the keys are anchor names and the values are the localised text for that language. + +The anchor names correspond to the YAML anchors used for localised messages in `prelude.yaml`, but the contents of the `translations` directory are **not** automatically synchronised with `prelude.yaml`: that must be done by a maintainer. There are scripts available to help synchronise translations, see [README.md](./README.md#synchronising-weblate-translations) for details. + +**Note:** If adding a translation for a new language, you need to add support for it to LOOT before it will be usable: see [LOOT's contributing guide](https://github.com/loot/loot/blob/master/CONTRIBUTING.md#translating-loot) for more information. + +| Locale Code | Language | +| ------------- | ----------- | +| `bg` | Bulgarian | +| `cs` | Czech | +| `da` | Danish | +| `de` | German | +| `es` | Spanish | +| `fi` | Finnish | +| `fr` | French | +| `it` | Italian | +| `ja` | Japanese | +| `ko` | Korean | +| `pl` | Polish | +| `pt_BR` | Portuguese (Brazil) | +| `pt_PT` | Portuguese | +| `ru` | Russian | +| `sv` | Swedish | +| `tr_TR` | Turkish | +| `uk_UA` | Ukrainian | +| `zh_CN` | Chinese (Simplified) |