summaryrefslogtreecommitdiffstats
path: root/doc/developer-guidelines.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/developer-guidelines.sgml')
-rw-r--r--doc/developer-guidelines.sgml53
1 files changed, 6 insertions, 47 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml
index 37c963ed..0afa733b 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -14,15 +14,8 @@
14 <pubdate>2013</pubdate> 14 <pubdate>2013</pubdate>
15 <title>Monitoring Plugins Development Guidelines</title> 15 <title>Monitoring Plugins Development Guidelines</title>
16 16
17 <revhistory>
18 <revision>
19 <revnumber>1796</revnumber>
20 <date>2007-09-24 14:51:07 -0400 (Mon, 24 Sep 2007)</date>
21 </revision>
22 </revhistory>
23
24 <copyright> 17 <copyright>
25 <year>2000 - 2013</year> 18 <year>2000 - 2024</year>
26 <holder>Monitoring Plugins Development Team</holder> 19 <holder>Monitoring Plugins Development Team</holder>
27 </copyright> 20 </copyright>
28 21
@@ -34,7 +27,7 @@
34 the plugin developers and encourage the standardization of the 27 the plugin developers and encourage the standardization of the
35 different kind of plugins: C, shell, perl, python, etc.</para> 28 different kind of plugins: C, shell, perl, python, etc.</para>
36 29
37 <para>Monitoring Plugins Development Guidelines Copyright (C) 2000-2013 30 <para>Monitoring Plugins Development Guidelines Copyright (C) 2000-2024
38 (Monitoring Plugins Team)</para> 31 (Monitoring Plugins Team)</para>
39 32
40 <para>Permission is granted to make and distribute verbatim 33 <para>Permission is granted to make and distribute verbatim
@@ -383,13 +376,6 @@
383 <para>It is up to third party programs to convert the Monitoring Plugins 376 <para>It is up to third party programs to convert the Monitoring Plugins
384 performance data into graphs.</para> 377 performance data into graphs.</para>
385 </section> 378 </section>
386
387 <section><title>Translations</title>
388 <para>If possible, use translation tools for all output to respect the user's language
389 settings. See <xref linkend="translationsdevelopers"> for guidelines
390 for the core plugins.
391 </para>
392 </section>
393</section> 379</section>
394 380
395<section id="SysCmdAuxFiles"><title>System Commands and Auxiliary Files</title> 381<section id="SysCmdAuxFiles"><title>System Commands and Auxiliary Files</title>
@@ -727,19 +713,18 @@ setup the tests. Run "make test" to run all the tests.
727</section> 713</section>
728<section id="CodingGuidelines"><title>Coding guidelines</title> 714<section id="CodingGuidelines"><title>Coding guidelines</title>
729 <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU 715 <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU
730 Coding standards</ulink> for general guidelines.</para> 716 Coding standards</ulink> for general guidelines.
717 Some parts of the guidelines (namely and explicitly the coding style)
718 are not seen as best practice by us.</para>
731 <section><title>C coding</title> 719 <section><title>C coding</title>
732 720
733 <para>Variables should be declared at the beginning of code blocks and
734 not inline because of portability with older compilers.</para>
735
736 <para>You should use the type "bool" and its values 721 <para>You should use the type "bool" and its values
737 "true" and "false" instead of the "int" type for booleans. 722 "true" and "false" instead of the "int" type for booleans.
738 </para> 723 </para>
739 </section> 724 </section>
740 725
741 <section><title>Crediting sources</title> 726 <section><title>Crediting sources</title>
742 <para>If you have copied a routine from another source, make sure the licence 727 <para>If you have copied a routine from another source, make sure the license
743 from your source allows this. Add a comment referencing the ACKNOWLEDGEMENTS 728 from your source allows this. Add a comment referencing the ACKNOWLEDGEMENTS
744 file, where you can put more detail about the source.</para> 729 file, where you can put more detail about the source.</para>
745 <para>For contributed code, do not add any named credits in the source code 730 <para>For contributed code, do not add any named credits in the source code
@@ -756,32 +741,6 @@ setup the tests. Run "make test" to run all the tests.
756 <para>All commits will be written to a ChangeLog at release time. 741 <para>All commits will be written to a ChangeLog at release time.
757 </para> 742 </para>
758 </section> 743 </section>
759
760 <section id="translationsdevelopers"><title>Translations for developers</title>
761 <para>To make the job easier for translators, please follow these guidelines:</para>
762 <orderedlist>
763 <listitem><para>
764 Before creating new strings, check the po/monitoring-plugins.pot file to
765 see if a similar string
766 already exists
767 </para></listitem>
768 <listitem><para>
769 For help texts, break into individual options so that these can be reused
770 between plugins
771 </para></listitem>
772 <listitem><para>Try to avoid linefeeds unless you are working on a block of text</para></listitem>
773 <listitem><para>Short help is not translated</para></listitem>
774 <listitem><para>Long help has options in English language, but text translated</para></listitem>
775 <listitem><para>"Copyright" kept in English</para></listitem>
776 <listitem><para>Copyright holder names kept in original text</para></listitem>
777 <listitem><para>Debugging output does not need to be translated</para></listitem>
778 </orderedlist>
779 </section>
780
781 <section><title>Translations for translators</title>
782 <para>To create an up to date list of translatable strings, run: tools/gen_locale.sh</para>
783 </section>
784
785</section> 744</section>
786 745
787<section id="SubmittingChanges"><title>Submission of new plugins and patches</title> 746<section id="SubmittingChanges"><title>Submission of new plugins and patches</title>