diff --git a/contributordoc_fr.md b/contributordoc_fr.md index 80611ac9..6e5bd3b0 100644 --- a/contributordoc_fr.md +++ b/contributordoc_fr.md @@ -9,7 +9,7 @@ * [Développer avec Docker](/docker_fr) * [Builder OpenResty (serveur Web) pour Raspberry Pi](/build_openresty_fr) * [Présentation du fonctionnement de YunoHost](/package_list_fr) - * [Se créer un environnement de développement](/dev_fr) + * [Se créer un environnement de développement](/ynh_dev_fr) * Documentation * [Création d’un compte pour l’édition de la documentation](/accounting_fr) - * [Écrire de la documentation](/write_documentation_fr) \ No newline at end of file + * [Écrire de la documentation](/write_documentation_fr) diff --git a/dev.md b/dev.md index 9bbc7536..f16ac4f6 100644 --- a/dev.md +++ b/dev.md @@ -1,29 +1,34 @@ -# Contributing to the Yunohost core +## Contributing to the Yunohost core -You wish to implement a new feature in the Yunohost core, but don't know how to +You wish to add a new feature in the Yunohost core, but don't know how to proceed ? This guide takes you through the various steps of the development and contribution process. -If you're looking for stuff to implement or fix, the bugtracker is +If you're looking for stuff to implement or fix, the bug-tracker is [here](https://dev.yunohost.org/issues/) ! -## Setting up a development environment +**Come say hi to us in the [dev chatroom](xmpp:dev@conference.yunohost.org?join)** ! If you don't have an XMPP client, you can join using the widget at the bottom right of this page. + +### Setting up a development environment - **Use [ynh-dev](https://github.com/YunoHost/ynh-dev)** (see the README) to setup a development environment - locally in a virtual machine, or on a VPS. - This will setup a working Yunohost instance, using git repositories and - symlinks. That way, you will be able to edit files, test your changes, commit - stuff and push/pull directly from your development environment. + This will setup a working Yunohost instance, using directly the git repositories + (with symlinks). That way, you will be able to edit files, test your changes in real + time, commit stuff and push/pull directly from your development environment. -- Implement and test your feature. Depending on what you want to develop, you +- **Implement and test your feature**. Depending on what you want to develop, you will want to : - - **Python/CLI core** : work in `/vagrant/yunohost/`, i.e. the Python/CLI core + - **Python/CLI core** : work in `/vagrant/yunohost/` - **Web administration interface** : work in `/vagrant/yunohost-admin/` - - You can also work on the other projects (SSOwat, moulinette) in similar ways + - You can also work on the other projects on which Yunohost is built + (SSOwat, moulinette) in similar ways -## Developping on the Yunohost Python/CLI core +### Working on the Yunohost Python/CLI core -- Work in `/vagrant/yunohost/` +- Work in `/vagrant/yunohost/`. + +- Run `/vagrant/ynh-dev use-git yunohost`. - The actionsmap file (`data/actionsmap/yunohost.yml`) defines the various categories, actions and arguments of the yunohost CLI. Define how you want @@ -38,33 +43,29 @@ If you're looking for stuff to implement or fix, the bugtracker is `domain_add(domainName)` in `domain.py`, with the argument `domainName` equal to `"some.domain.tld"`. -#### Helpers / coding style +##### Helpers / coding style - To handle exceptions, you should raise some `MoulinetteError()` - To help with internationalizing the messages, use `m18n.n('some-message-id')` and put your string in `locales/en.json`. You can also put arguments and use them in the string with `{{some-argument:s}}`. Don't edit other locales files, - only the en.json ! + this will be done using [weblate](https://translate.yunohost.org/) ! - Yunohost tries to follow the [pep8](http://pep8.org/) coding style. Tools exist to automatically check conformity. - Name of "private" functions should start with a `_` -#### Don't forget +##### Don't forget - (Might not be necessary anymore) Each time you edit the actionsmap, you should force the refresh of the cache with `rm /var/cache/moulinette/actionsmap/yunohost.pkl` -## Adding stuff to the Yunohost web administration interface +### Working on the Yunohost web administration interface -- Work in `/vagrant/yunohost-admin/src/` - -- Make sure the web admin interface of your development environment works, by - opening `https://domain.tld/yunohost/admin`. If not, run `npm install` and - `npm run build` in `yunohost-admin/src/`. [Not sure about this, to be checked] +- Work in `/vagrant/yunohost-admin/src/`. - Run `/vagrant/ynh-dev use-git yunohost-admin`. It launches gulp, such as each time you modify sources, it recompiles the code and you can use it by @@ -89,14 +90,14 @@ If you're looking for stuff to implement or fix, the bugtracker is `{{some-variable}}`, which will be replaced when building/accessing the page. It is also possible to have conditions using the [handlebars.js](http://handlebarsjs.com) syntax : ```{{#if - some-variable}}
Some conditionnal HTML code here !
{{/if}}``` + some-variable}}Some conditional HTML code here !
{{/if}}``` - For internationalized strings, use `y18n.t('some-string-code')` in the javascript, or `{{t 'some-string-code'}}` in the HTML template, and put your - string in `locales/en.json`. Don't edit other locales files, only the - en.json ! + string in `locales/en.json`. Don't edit other locales files, + this will be done using [weblate](https://translate.yunohost.org/) ! -#### Don't forget +##### Don't forget - Each time you edit the actionsmap, you should restart the yunohost-api : ```service yunohost-api restart``` @@ -106,19 +107,49 @@ If you're looking for stuff to implement or fix, the bugtracker is the javascript and/or html (so each time you edit something in `js` or `views`). -## Your feature is working and you want it to be integrated in Yunohost +### Your feature is ready and you want it to be integrated in Yunohost - Fork the relevant repo on Github, and commit stuff to a new branch. We recommend to name the branch with the following convention : - - For an enhancement or new feature : `enh-REDMINETICKET-name-of-feature`, where - REDMINETICKET is optional and is the id of a corresponding ticket on RedMine. - - For a bugfix fix-IDREDMINETICKET-description-of-fix", where - REDMINETICKET is optional and is the id of a corresponding ticket on RedMine. + - For an enhancement or new feature : `enh-REDMINETICKET-name-of-feature` + - For a bugfix `fix-REDMINETICKET-description-of-fix` + - `REDMINETICKET` is optional and is the id of a corresponding ticket on RedMine. -- Once you're ready, open a Pull Request (PR) on Github. Please include "[fix]" or - "[enh]" at the beginning of the title of your PR. +- Once you're ready, open a Pull Request (PR) on Github. Please include `[fix]` or + `[enh]` at the beginning of the title of your PR. - After reviewing, testing and validation by other contributors, your branch should be merged in `testing` (?) ! + + + + diff --git a/dev_fr.md b/dev_fr.md index fe8f99a9..4c91094e 100644 --- a/dev_fr.md +++ b/dev_fr.md @@ -1,91 +1,164 @@ -## Créer un environnement de développement +## Contribuer au coeur de Yunohost -du HTML conditionnel ici !
{{/if}}``` + +- Pour l'internationalisation des messages, utilisez `y18n.t('some-string-code')` + dans le javascript, ou `{{t 'some-string-code'}}` dans le template HTML, et + mettez votre message dans `locales/en.json`. Ne modifiez pas de fichiers de + locales autres que en.json, la traduction sera faite avec + [weblate](https://translate.yunohost.org/) ! + +##### N'oubliez pas + +- À chaque modification de l'actionsmap, il faut redémarrer l'API yunohost : + ```service yunohost-api restart``` + (Il faudra retaper le mot de passe administrateur dans l'interface web) + +- Il faudra peut-être régulièrement forcer le rafraichissement du cache + navigateur pour propager correctement le javascript et/ou HTML (à chaque fois + que l'on change quelque chose dans `js` ou `views`, donc). + + +### Votre fonctionnalité est prête et vous souhaitez qu'elle soit intégrée dans Yunohost + +- Forkez le dépòt correspondant sur Github, et commitez votre changements dans + une nouvelle branche, Il est recommandé de nommer la branche avec la + convention : + - Pour une nouvelle fonctionnalité ou amélioration : `enh-TICKETREDMINE-description-fonctionnalité` + - Pour une correction de bug : `fix-REDMINETICKET-description-correctif` + - `TICKETREDMINE` est optionnel et correspond au numéro du ticket sur RedMine + +- Une fois prêt, ouvrez une Pull Request (PR) sur Github. De préférence, inclure + `[fix]` ou `[enh]` au début du titre de la PR. + +- Après relecture, test et validation par les autres contributeurs, votre + branche sera mergée dans `testing` (?) ! + + + -##### Déployer les sources au fur et à mesure des modifications -```bash -root@yunohost:/yunohost/# ./ynh-dev watch -``` -Astuce : dans le cas de modification sur yunohost-admin, cette commande est très pratique couplée avec un `gulp watch` sur la machine hôte. diff --git a/sitemap.md b/sitemap.md index 333e5d81..21b98050 100644 --- a/sitemap.md +++ b/sitemap.md @@ -80,16 +80,18 @@ * [Contributor guide](/contribute) * Developement - * [Package new application](/packaging_apps) - * [Manifest](packaging_apps_manifest_en) - * [Scripts](packaging_apps_scripts_en) - * [Arguments management](packaging_apps_arguments_management_en) - * [Nginx configuration](packaging_apps_nginx_conf_en) - * [Multi-instance](packaging_apps_multiinstance_en) - * [Helpers](packaging_apps_helpers_en) - * [Trap usage](packaging_apps_trap_fr) - * [Applications in progress](/apps_in_progress_en) - * [Wishlist of applications](/apps_wishlist_en) + * Applications + * [Package new application](/packaging_apps) + * [Manifest](packaging_apps_manifest_en) + * [Scripts](packaging_apps_scripts_en) + * [Arguments management](packaging_apps_arguments_management_en) + * [Nginx configuration](packaging_apps_nginx_conf_en) + * [Multi-instance](packaging_apps_multiinstance_en) + * [Helpers](packaging_apps_helpers_en) + * [Trap usage](packaging_apps_trap_fr) + * [Applications in progress](/apps_in_progress_en) + * [Wishlist of applications](/apps_wishlist_en) + * [Contributing to the Yunohost core](/dev) * [Creation of system packages](/build_system_en) * [Creation of Debian packages](/build_packages_en) * [Create an ARM board image](/build_arm_image_en) diff --git a/sitemap_fr.md b/sitemap_fr.md index 816cf16d..6d81cc79 100644 --- a/sitemap_fr.md +++ b/sitemap_fr.md @@ -90,7 +90,7 @@ * [Guide du contributeur](/contribute_fr) * Développement - * [Créer un environnement de développement](dev_fr) + * [Créer un environnement de développement](ynh_dev_fr) * [Présentation du fonctionnement de YunoHost](/package_list_fr) * Applications : * [Packager des applications](/packaging_apps_fr) @@ -103,6 +103,7 @@ * [Usage de trap](packaging_apps_trap_fr) * [Packages d’applications en cours de développement](/apps_in_progress_fr) * [Liste de proposition d’applications](/apps_wishlist_fr) + * [Contribuer au coeur de Yunohost](/dev_fr) * [Création de paquets système](/build_system_fr) * [Création de paquets Debian](/build_packages_fr) * [Créer une image pour carte ARM](/build_arm_image_en) diff --git a/ynh_dev_fr.md b/ynh_dev_fr.md new file mode 100644 index 00000000..fe8f99a9 --- /dev/null +++ b/ynh_dev_fr.md @@ -0,0 +1,91 @@ +## Créer un environnement de développement + +