diff --git a/doc/dev/documentation.org b/doc/dev/documentation.org index f7b4dbd8f6ab808dbba4de3b244925aa608218d9..fe817d41043d194f6b9063f9b80a09a18c5833d6 100644 --- a/doc/dev/documentation.org +++ b/doc/dev/documentation.org @@ -291,7 +291,7 @@ Some org-mode configuration used in documentations files are define in - {{{file(setup.el)}}}: GNUEmacs configuration to build documentations - {{{file(ref.bib)}}}: Bibtex files for documentations files -* TODO How to contribute? +* How to contribute? Pamhyr2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License[fn:license], either @@ -339,7 +339,44 @@ information for following contribution. https://gitlab.irstea.fr/theophile.terraz/pamhyr [fn:inrae] The INRAE web site: https://www.inrae.fr/ -** TODO Translate -** TODO Code contribution +** Translate + +You can improve or add translation for the project. To contribute to +Pamhyr2 translate, you need to use Qt Linguist[fn:qt-linguist]. Open +Qt-linguist and edite the translation ({{{file(.ts)}}}) file, finally, +commit the new version of file and make a merge request. + +If you want add a new language, edit the script +{{{file(src/lang/create_ts.sh)}}} like Listing [[ts-it]]. Run the script +and open the new file with Qt-linguist, setup target language (Figure +[[qt-linguist-setup]]) and complete translation. Finally, commit the new +file and make a merge request. + +#+NAME: ts-it +#+CAPTION: Example of modified {{{file(src/lang/create_ts.sh)}}} to add italian (it) translate for Pamhyr2 +#+begin_src shell + ... + LANG="fr it" + ... +#+end_src + +#+NAME: qt-linguist-setup +#+ATTR_HTML: :width 8cm +#+ATTR_LATEX: :width 8cm +#+CAPTION: Qt linguist lang setup example with italian. +[[../images/Qt-linguist-setup-lang.png]] + +[fn:qt-linguist] The Qt linguist documentation web page: +https://doc.qt.io/qt-5/qtlinguist-index.html (last access 2023-09-18) + +** Code contribution + +If you are developper you can improve and/or add features to +Pamhyr2. Please, follow the architecture described in section +[[Architecture]] as closely as possible. Keep the code simple, clear and +efficient as possible. The master branch is reserved for the project +maintainer; you can create a new branch or fork the project before the +request. + {{{biblio}}} diff --git a/doc/images/Qt-linguist-setup-lang.png b/doc/images/Qt-linguist-setup-lang.png new file mode 100644 index 0000000000000000000000000000000000000000..9ba375d1f4a0e451fd0055c85182353eda959d18 Binary files /dev/null and b/doc/images/Qt-linguist-setup-lang.png differ