diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-08-18 17:55:09 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-08-18 17:55:09 -0700 |
commit | 5da8cf8a8f1f30f084fcd85d78bd8ff43675f1e7 (patch) | |
tree | 722b967af5b12f51feb5d965ccf3e849d7a7bb2f /docs | |
parent | 995a1a262a2f86bbaaa5d8b78569a2111bde4124 (diff) |
Add some doc for contributors
Diffstat (limited to 'docs')
-rw-r--r-- | docs/coding-standards.markdown | 23 | ||||
-rw-r--r-- | docs/translations.markdown | 28 |
2 files changed, 51 insertions, 0 deletions
diff --git a/docs/coding-standards.markdown b/docs/coding-standards.markdown new file mode 100644 index 00000000..a6975190 --- /dev/null +++ b/docs/coding-standards.markdown @@ -0,0 +1,23 @@ +Coding standards +================ + +PHP code +-------- + +- Indentation: 4 spaces +- Line return: Unix => `\n` +- Encoding: UTF-8 +- Always write PHPdoc comments for methods and class properties +- Coding style: Try to follow [PSR-1](http://www.php-fig.org/psr/psr-1/) and [PSR-2](http://www.php-fig.org/psr/psr-2/) otherwise follow the actual style. + +Javascript code +--------------- + +- Indentation: 4 spaces +- Line return: Unix => `\n` + +CSS code +-------- + +- Indentation: 4 spaces +- Line return: Unix => `\n` diff --git a/docs/translations.markdown b/docs/translations.markdown new file mode 100644 index 00000000..ec7162be --- /dev/null +++ b/docs/translations.markdown @@ -0,0 +1,28 @@ +Translations +============ + +How to translate Kanboard to a new language? +-------------------------------------------- + +- Translations are stored inside the directory `app/Locales` +- There is sub-directory for each language, by example for the French we have `fr_FR`, Italian `it_IT` etc... +- A translation is a PHP file that return an Array with a key-value pairs +- The key is the original text in english and the value is the translation for the corresponding language +- **French translations are always up to date** +- Always use the last version (branch master) + +### Create a new translation: + +1. Make a new directory: `app/Locales/xx_XX` by example `app/Locales/fr_CA` for French Canadian +2. Create a new file for the translation: `app/Locales/xx_XX/translations.php` +3. Use the content of the French locales and replace the values +4. Inside the file `app/Model/Config.php`, add a new entry for your translation inside the function `getLanguages()` +5. Check with your local installation of Kanboard if everything is ok +6. Send a pull-request with Github + +How to update an existing translation? +-------------------------------------- + +1. Open the translation file `app/Locales/xx_XX/translations.php` +2. Missing translations are commented with `//` and the values are empty, just fill blank and remove comments +3. Check with your local installation of Kanboard and send a pull-request |