WIP: Expand the developer documentation #27

Draft
gremond wants to merge 77 commits from develop into developer_docs
4 changed files with 47 additions and 39 deletions
Showing only changes of commit fbb1446fa3 - Show all commits

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2024-10-30 13:21+0100\n" "POT-Creation-Date: 2024-11-25 09:10+0100\n"
"PO-Revision-Date: 2024-10-30 13:39+0100\n" "PO-Revision-Date: 2024-11-25 09:11+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -16,31 +16,31 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n" "X-Generator: Poedit 3.5\n"
#: src/rougail/annotator/family.py:142 #: src/rougail/annotator/family.py:141
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}" msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
msgstr "" msgstr ""
"le mode d'une variable par défaut \"{0}\" n'est pas un mode valide, les " "le mode d'une variable par défaut \"{0}\" n'est pas un mode valide, les "
"modes valides sont {1}" "modes valides sont {1}"
#: src/rougail/annotator/family.py:148 #: src/rougail/annotator/family.py:147
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}" msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
msgstr "" msgstr ""
"le mode d'une famille par défaut \"{0}\" n'est pas un mode valide, les modes " "le mode d'une famille par défaut \"{0}\" n'est pas un mode valide, les modes "
"valides sont {1}" "valides sont {1}"
#: src/rougail/annotator/family.py:180 #: src/rougail/annotator/family.py:179
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}" msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
msgstr "" msgstr ""
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, les modes valides " "le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, les modes valides "
"sont {2}" "sont {2}"
#: src/rougail/annotator/family.py:184 #: src/rougail/annotator/family.py:183
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available" msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
msgstr "" msgstr ""
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, aucun mode ne sont " "le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, aucun mode ne sont "
"définis" "définis"
#: src/rougail/annotator/family.py:248 #: src/rougail/annotator/family.py:247
msgid "" msgid ""
"the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the " "the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the "
"higher family mode \"{2}\"" "higher family mode \"{2}\""
@ -48,7 +48,7 @@ msgstr ""
"la variable \"{0}\" est obligatoire donc dans le mode \"{1}\" mais la " "la variable \"{0}\" est obligatoire donc dans le mode \"{1}\" mais la "
"famille a un mode supérieur \"{2}\"" "famille a un mode supérieur \"{2}\""
#: src/rougail/annotator/family.py:286 #: src/rougail/annotator/family.py:285
msgid "" msgid ""
"the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode " "the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode "
"\"{2}\"" "\"{2}\""
@ -56,7 +56,7 @@ msgstr ""
"la variable suiveuse \"{0}\" a le mode \"{1}\" mais la variable leader a un " "la variable suiveuse \"{0}\" a le mode \"{1}\" mais la variable leader a un "
"mode supérieur \"{2}\"" "mode supérieur \"{2}\""
#: src/rougail/annotator/family.py:319 #: src/rougail/annotator/family.py:318
msgid "" msgid ""
"the family \"{0}\" is in \"{1}\" mode but variables and families inside have " "the family \"{0}\" is in \"{1}\" mode but variables and families inside have "
"the higher modes \"{2}\"" "the higher modes \"{2}\""
@ -64,7 +64,7 @@ msgstr ""
"la famille \"{0}\" a le mode \"{1}\" mais les variables et les familles à " "la famille \"{0}\" a le mode \"{1}\" mais les variables et les familles à "
"l'intérieur ont des modes supérieurs \"{2}\"" "l'intérieur ont des modes supérieurs \"{2}\""
#: src/rougail/annotator/family.py:337 #: src/rougail/annotator/family.py:336
msgid "" msgid ""
"the variable \"{0}\" is in \"{1}\" mode but family has the higher family " "the variable \"{0}\" is in \"{1}\" mode but family has the higher family "
"mode \"{2}\"" "mode \"{2}\""
@ -72,37 +72,37 @@ msgstr ""
"la variable \"{0}\" est dans le mode \"{1}\" mais la famille a le mode " "la variable \"{0}\" est dans le mode \"{1}\" mais la famille a le mode "
"supérieur \"{2}\"" "supérieur \"{2}\""
#: src/rougail/annotator/value.py:80 #: src/rougail/annotator/value.py:77
msgid "the follower \"{0}\" without multi attribute can only have one value" msgid "the follower \"{0}\" without multi attribute can only have one value"
msgstr "" msgstr ""
"la variable suiveuse \"{0}\" sans l'attribut multi peut avoir seulement une " "la variable suiveuse \"{0}\" sans l'attribut multi peut avoir seulement une "
"valeur" "valeur"
#: src/rougail/annotator/value.py:96 #: src/rougail/annotator/value.py:93
msgid "the variable \"{0}\" is multi but has a non list default value" msgid "the variable \"{0}\" is multi but has a non list default value"
msgstr "" msgstr ""
"la variable \"{0}\" est multiple mais a une valeur par défaut sans être une " "la variable \"{0}\" est multiple mais a une valeur par défaut sans être une "
"liste" "liste"
#: src/rougail/annotator/variable.py:192 #: src/rougail/annotator/variable.py:189
msgid "" msgid ""
"the variable \"{0}\" has regexp attribut but has not the \"regexp\" type" "the variable \"{0}\" has regexp attribut but has not the \"regexp\" type"
msgstr "" msgstr ""
"la variable \"{0}\" a un attribut regexp mais n'a pas le type \"regexp\"" "la variable \"{0}\" a un attribut regexp mais n'a pas le type \"regexp\""
#: src/rougail/annotator/variable.py:235 #: src/rougail/annotator/variable.py:232
msgid "" msgid ""
"the variable \"{0}\" has choices attribut but has not the \"choice\" type" "the variable \"{0}\" has choices attribut but has not the \"choice\" type"
msgstr "" msgstr ""
"la variable \"{0}\" a un attribut choices mais n'a pas le type \"choice\"" "la variable \"{0}\" a un attribut choices mais n'a pas le type \"choice\""
#: src/rougail/annotator/variable.py:263 #: src/rougail/annotator/variable.py:260
msgid "" msgid ""
"the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}" "the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}"
msgstr "" msgstr ""
"la variable \"{0}\" a la valeur par défaut invalide \"{1}\" devrait être {2}" "la variable \"{0}\" a la valeur par défaut invalide \"{1}\" devrait être {2}"
#: src/rougail/convert.py:268 #: src/rougail/convert.py:281
msgid "" msgid ""
"A variable or a family located in the \"{0}\" namespace shall not be used in " "A variable or a family located in the \"{0}\" namespace shall not be used in "
"the \"{1}\" namespace" "the \"{1}\" namespace"
@ -110,38 +110,38 @@ msgstr ""
"Une variable ou une famille localisé dans l'espace de nom \"{0}\" ne devrait " "Une variable ou une famille localisé dans l'espace de nom \"{0}\" ne devrait "
"pas être utilisé dans l'espace de nom \"{1}\"" "pas être utilisé dans l'espace de nom \"{1}\""
#: src/rougail/convert.py:462 #: src/rougail/convert.py:477
msgid "unknown type {0} for {1}" msgid "unknown type {0} for {1}"
msgstr "type {0} inconnu pour {1}" msgstr "type {0} inconnu pour {1}"
#: src/rougail/convert.py:1323 #: src/rougail/convert.py:1347
msgid "duplicate dictionary file name {0}" msgid "duplicate dictionary file name {0}"
msgstr "nom de fichier {0} de dictionnaire dupliqué" msgstr "nom de fichier {0} de dictionnaire dupliqué"
#: src/rougail/convert.py:1370 #: src/rougail/convert.py:1394
msgid "Cannot execute annotate multiple time" msgid "Cannot execute annotate multiple time"
msgstr "Ne peut exécuter l'annotation plusieurs fois" msgstr "Ne peut exécuter l'annotation plusieurs fois"
#: src/rougail/error.py:70 #: src/rougail/error.py:67
msgid "{0} in {1}" msgid "{0} in {1}"
msgstr "{0} dans {1}" msgstr "{0} dans {1}"
#: src/rougail/structural_commandline/annotator.py:70 #: src/rougail/structural_commandline/annotator.py:67
msgid "alternative_name \"{0}\" conflict with \"--help\"" msgid "alternative_name \"{0}\" conflict with \"--help\""
msgstr "alternative_name \"{0}\" est en conflit avec \"--help\"" msgstr "alternative_name \"{0}\" est en conflit avec \"--help\""
#: src/rougail/structural_commandline/annotator.py:73 #: src/rougail/structural_commandline/annotator.py:72
msgid "conflict alternative_name \"{0}\": \"{1}\" and \"{2}\"" msgid "conflict alternative_name \"{0}\": \"{1}\" and \"{2}\""
msgstr "conflit dans les \"alternative_name\" \"{0}\": \"{1}\" et \"{2}\"" msgstr "conflit dans les \"alternative_name\" \"{0}\": \"{1}\" et \"{2}\""
#: src/rougail/structural_commandline/annotator.py:96 #: src/rougail/structural_commandline/annotator.py:95
msgid "" msgid ""
"negative_description is mandatory for boolean variable, but \"{0}\" hasn't" "negative_description is mandatory for boolean variable, but \"{0}\" hasn't"
msgstr "" msgstr ""
"l'attribut negative_description est obligatoire pour des variables " "l'attribut negative_description est obligatoire pour des variables "
"\"boolean\", mais \"{0}\" n'en a pas" "\"boolean\", mais \"{0}\" n'en a pas"
#: src/rougail/structural_commandline/annotator.py:105 #: src/rougail/structural_commandline/annotator.py:104
msgid "" msgid ""
"negative_description is only available for boolean variable, but \"{0}\" is " "negative_description is only available for boolean variable, but \"{0}\" is "
"\"{1}\"" "\"{1}\""
@ -149,11 +149,11 @@ msgstr ""
"l'attribut negative_description est seulement valide pour des variables " "l'attribut negative_description est seulement valide pour des variables "
"\"boolean\", mais \"{0}\" est \"{1}\"" "\"boolean\", mais \"{0}\" est \"{1}\""
#: src/rougail/update/update.py:741 #: src/rougail/update/update.py:738
msgid "not a XML file: {0}" msgid "not a XML file: {0}"
msgstr "fichier XML invalid : {0}" msgstr "fichier XML invalid : {0}"
#: src/rougail/utils.py:58 #: src/rougail/utils.py:55
msgid "" msgid ""
"invalid variable or family name \"{0}\" must only contains lowercase ascii " "invalid variable or family name \"{0}\" must only contains lowercase ascii "
"character, number or _" "character, number or _"
@ -161,6 +161,6 @@ msgstr ""
"nom invalide pour la variable ou famille \"{0}\" doit seulement contenir des " "nom invalide pour la variable ou famille \"{0}\" doit seulement contenir des "
"caractères ascii minuscule, nombre or _" "caractères ascii minuscule, nombre or _"
#: src/rougail/utils.py:120 #: src/rougail/utils.py:117
msgid "error in jinja \"{0}\" for the variable \"{1}\": {2}" msgid "error in jinja \"{0}\" for the variable \"{1}\": {2}"
msgstr "erreur dans Jinja \"{0}\" pour la variable \"{1}\": {2}" msgstr "erreur dans Jinja \"{0}\" pour la variable \"{1}\": {2}"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-11-04 12:04+0100\n" "POT-Creation-Date: 2024-11-25 09:10+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,35 +15,35 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
#: src/rougail/annotator/family.py:139 #: src/rougail/annotator/family.py:141
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}" msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:145 #: src/rougail/annotator/family.py:147
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}" msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:177 #: src/rougail/annotator/family.py:179
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}" msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:181 #: src/rougail/annotator/family.py:183
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available" msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:245 #: src/rougail/annotator/family.py:247
msgid "the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the higher family mode \"{2}\"" msgid "the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the higher family mode \"{2}\""
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:283 #: src/rougail/annotator/family.py:285
msgid "the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode \"{2}\"" msgid "the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode \"{2}\""
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:316 #: src/rougail/annotator/family.py:318
msgid "the family \"{0}\" is in \"{1}\" mode but variables and families inside have the higher modes \"{2}\"" msgid "the family \"{0}\" is in \"{1}\" mode but variables and families inside have the higher modes \"{2}\""
msgstr "" msgstr ""
#: src/rougail/annotator/family.py:334 #: src/rougail/annotator/family.py:336
msgid "the variable \"{0}\" is in \"{1}\" mode but family has the higher family mode \"{2}\"" msgid "the variable \"{0}\" is in \"{1}\" mode but family has the higher family mode \"{2}\""
msgstr "" msgstr ""
@ -71,15 +71,15 @@ msgstr ""
msgid "A variable or a family located in the \"{0}\" namespace shall not be used in the \"{1}\" namespace" msgid "A variable or a family located in the \"{0}\" namespace shall not be used in the \"{1}\" namespace"
msgstr "" msgstr ""
#: src/rougail/convert.py:475 #: src/rougail/convert.py:477
msgid "unknown type {0} for {1}" msgid "unknown type {0} for {1}"
msgstr "" msgstr ""
#: src/rougail/convert.py:1345 #: src/rougail/convert.py:1347
msgid "duplicate dictionary file name {0}" msgid "duplicate dictionary file name {0}"
msgstr "" msgstr ""
#: src/rougail/convert.py:1392 #: src/rougail/convert.py:1394
msgid "Cannot execute annotate multiple time" msgid "Cannot execute annotate multiple time"
msgstr "" msgstr ""

View file

@ -71,6 +71,11 @@ class SpaceAnnotator: # pylint: disable=R0903
if extra_annotator in ANNOTATORS: if extra_annotator in ANNOTATORS:
continue continue
get_annotators(ANNOTATORS, extra_annotator) get_annotators(ANNOTATORS, extra_annotator)
for user_data in objectspace.user_datas:
try:
get_annotators(ANNOTATORS, f"rougail.user_data_{user_data}", "annotator")
except ModuleNotFoundError:
pass
for plugin in objectspace.plugins: for plugin in objectspace.plugins:
try: try:
get_annotators(ANNOTATORS, f"rougail.{plugin}", "annotator") get_annotators(ANNOTATORS, f"rougail.{plugin}", "annotator")
@ -81,6 +86,8 @@ class SpaceAnnotator: # pylint: disable=R0903
annotators.extend(ANNOTATORS[extra_annotator]) annotators.extend(ANNOTATORS[extra_annotator])
for plugin in objectspace.plugins: for plugin in objectspace.plugins:
annotators.extend(ANNOTATORS[f"rougail.{plugin}.annotator"]) annotators.extend(ANNOTATORS[f"rougail.{plugin}.annotator"])
for user_data in objectspace.user_datas:
annotators.extend(ANNOTATORS[f"rougail.user_data_{user_data}.annotator"])
annotators = sorted(annotators, key=get_level) annotators = sorted(annotators, key=get_level)
functions = {} functions = {}
functions_files = objectspace.functions_files functions_files = objectspace.functions_files

View file

@ -394,6 +394,7 @@ class ParserVariable:
self.add_extra_options = rougailconfig[ self.add_extra_options = rougailconfig[
"structural_commandline.add_extra_options" "structural_commandline.add_extra_options"
] ]
self.user_datas = rougailconfig["step.user_data"]
self.plugins = rougailconfig["plugins"] self.plugins = rougailconfig["plugins"]
def _init(self): def _init(self):