From e53a1aaf7b7f28510c716a8eb8aaab48384087e1 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 11 Feb 2017 07:55:24 +0000 Subject: [PATCH] Add missing language section to CONTRIBUTING.md --- CONTRIBUTING.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4c1d820..ed52a543 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ -Contributing To LOOT -==================== +Contributing To the LOOT API +============================ -A general guide to contributing to LOOT, may be found on [LOOT's website](https://loot.github.io/docs/contributing/How-To-Contribute). Information more specific to this repository is found here. +A general guide to contributing to LOOT may be found on [LOOT's website](https://loot.github.io/docs/contributing/How-To-Contribute). Information more specific to this repository is found here. ## Repository Branching Structure @@ -19,6 +19,14 @@ Surprise pull requests aren't recommended because everything you touched may hav When you do make a pull request, please do so from a branch which doesn't have the same name as they branch you're requesting your changes to be merged into. It's a lot easier to keep track of what pull request branches do when they're named something like `you:specific-cool-feature` rather than `you:master`. +### Adding Support For A New Language + +If you're adding support for a new language, the LOOT API's source code must be updated to recognise it. The files and functions which must be updated are given below. + +* In [language_code.h](include/loot/enum/language_code.h), append a value for the language to the `LanguageCode` enum. +* In [language.cpp](src/api/helpers/language.cpp), define the value for the constant you added, and update `Language::Language(LanguageCode code)` and `Language::codes({...})` to include lines for your language. +* In [localised_content.rst](docs/metadata/data_structures/localised_content.rst), add a row for your language to the Language Codes table. + ## Code Style LOOT's JavaScript uses a slightly tweaked version of the Airbnb style, and can be automatically linted by ESLint, so isn't covered here.