Compare commits

..

No commits in common. "379630fc387691ed51cc6ea1265d868f30359b98" and "c14a34f2326287e955c2d5b53de5c9b6ce6248ca" have entirely different histories.

21 changed files with 603 additions and 872 deletions

View file

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tiramisu\n" "Project-Id-Version: Tiramisu\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-12 09:04+0200\n" "POT-Creation-Date: 2025-04-29 23:01+0200\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: Emmanuel Garette <egarette@cadoles.com>\n" "Last-Translator: Emmanuel Garette <egarette@cadoles.com>\n"
"Language-Team: Tiramisu's team <egarette@cadoles.com>\n" "Language-Team: Tiramisu's team <egarette@cadoles.com>\n"
@ -34,7 +34,7 @@ msgstr "Ne peut avoir de warnings durant une validation"
msgid "Commands:" msgid "Commands:"
msgstr "Commandes :" msgstr "Commandes :"
#: tiramisu/api.py:111 tiramisu/api.py:1857 #: tiramisu/api.py:111 tiramisu/api.py:1849
msgid "please specify a valid sub function ({0}.{1})" msgid "please specify a valid sub function ({0}.{1})"
msgstr "veuillez spécifier une sous fonction valide ({0}.{1})" msgstr "veuillez spécifier une sous fonction valide ({0}.{1})"
@ -42,7 +42,7 @@ msgstr "veuillez spécifier une sous fonction valide ({0}.{1})"
msgid "please do not specify index ({0}.{1})" msgid "please do not specify index ({0}.{1})"
msgstr "veuillez ne pas spécifier d'index ({0}.{1})" msgstr "veuillez ne pas spécifier d'index ({0}.{1})"
#: tiramisu/api.py:201 tiramisu/api.py:856 #: tiramisu/api.py:201 tiramisu/api.py:848
msgid "please specify index with a follower option ({0}.{1})" msgid "please specify index with a follower option ({0}.{1})"
msgstr "veuillez spécifier un index avec une option suiveuse ({0}.{1})" msgstr "veuillez spécifier un index avec une option suiveuse ({0}.{1})"
@ -50,7 +50,7 @@ msgstr "veuillez spécifier un index avec une option suiveuse ({0}.{1})"
msgid "please specify a valid sub function ({0}.{1}): {2}" msgid "please specify a valid sub function ({0}.{1}): {2}"
msgstr "veuillez spécifier une sous fonction valide ({0}.{1}): {2}" msgstr "veuillez spécifier une sous fonction valide ({0}.{1}): {2}"
#: tiramisu/api.py:446 #: tiramisu/api.py:434
msgid "" msgid ""
"the option {0} is not a dynamic option, cannot get identifiers with " "the option {0} is not a dynamic option, cannot get identifiers with "
"only_self parameter to True" "only_self parameter to True"
@ -58,15 +58,15 @@ msgstr ""
"l'option {0} n'est pas une option dynamique, ne peut retrouver l'identifiant " "l'option {0} n'est pas une option dynamique, ne peut retrouver l'identifiant "
"avec le paramètre only_self à True" "avec le paramètre only_self à True"
#: tiramisu/api.py:532 #: tiramisu/api.py:520
msgid "cannot get option from a follower symlink without index" msgid "cannot get option from a follower symlink without index"
msgstr "ne peut avoir d'option pour une symlink suiveuse sans index" msgstr "ne peut avoir d'option pour une symlink suiveuse sans index"
#: tiramisu/api.py:607 #: tiramisu/api.py:595
msgid "cannot add this property: \"{0}\"" msgid "cannot add this property: \"{0}\""
msgstr "ne peut pas ajouter cette propriété : \"{0}\"" msgstr "ne peut pas ajouter cette propriété : \"{0}\""
#: tiramisu/api.py:634 #: tiramisu/api.py:622
msgid "" msgid ""
"cannot remove option's property \"{0}\", use permissive instead in option " "cannot remove option's property \"{0}\", use permissive instead in option "
"\"{1}\"" "\"{1}\""
@ -74,11 +74,11 @@ msgstr ""
"ne supprimer la propriété \"{0}\" de l'option, utiliser plutôt permissive " "ne supprimer la propriété \"{0}\" de l'option, utiliser plutôt permissive "
"dans l'option \"{1}\"" "dans l'option \"{1}\""
#: tiramisu/api.py:638 #: tiramisu/api.py:626
msgid "cannot find \"{0}\" in option \"{1}\"" msgid "cannot find \"{0}\" in option \"{1}\""
msgstr "ne peut trouver \"{0}\" dans l'option \"{1}\"" msgstr "ne peut trouver \"{0}\" dans l'option \"{1}\""
#: tiramisu/api.py:643 #: tiramisu/api.py:631
msgid "" msgid ""
"cannot remove option's property \"{0}\", use permissive instead in option " "cannot remove option's property \"{0}\", use permissive instead in option "
"\"{1}\" at index \"{2}\"" "\"{1}\" at index \"{2}\""
@ -86,147 +86,161 @@ msgstr ""
"ne peut supprimer la propriété \"{0}\" de l'option, utilisez plutôt " "ne peut supprimer la propriété \"{0}\" de l'option, utilisez plutôt "
"permissive dans l'option \"{1}\" a l'index \"{2}\"" "permissive dans l'option \"{1}\" a l'index \"{2}\""
#: tiramisu/api.py:647 #: tiramisu/api.py:635
msgid "cannot find \"{0}\" in option \"{1}\" at index \"{2}\"" msgid "cannot find \"{0}\" in option \"{1}\" at index \"{2}\""
msgstr "ne peut trouver \"{0}\" dans l'option \"{1}\" à l'index \"{2}\"" msgstr "ne peut trouver \"{0}\" dans l'option \"{1}\" à l'index \"{2}\""
#: tiramisu/api.py:691 #: tiramisu/api.py:679 tiramisu/option/optiondescription.py:283
msgid "cannot find \"{0}\"" msgid "cannot find \"{0}\""
msgstr "ne peut trouver \"{0}\"" msgstr "ne peut trouver \"{0}\""
#: tiramisu/api.py:873 #: tiramisu/api.py:812
msgid "cannot reduce length of the leader {}"
msgstr "il est impossible de réduire la longueur du leader \"{}\""
#: tiramisu/api.py:865
msgid "only multi value has defaultmulti" msgid "only multi value has defaultmulti"
msgstr "seule les valeurs multiple a l'attribut defaultmulti" msgstr "seule les valeurs multiple a l'attribut defaultmulti"
#: tiramisu/api.py:1037 #: tiramisu/api.py:1029
msgid "please specify a valid sub function ({0}.{1}) for {2}" msgid "please specify a valid sub function ({0}.{1}) for {2}"
msgstr "veuillez spécifier une sous fonction valide ({0}.{1}) pour {2}" msgstr "veuillez spécifier une sous fonction valide ({0}.{1}) pour {2}"
#: tiramisu/api.py:1424 #: tiramisu/api.py:1416
msgid "properties must be a frozenset" msgid "properties must be a frozenset"
msgstr "une propriété doit être de type frozenset" msgstr "une propriété doit être de type frozenset"
#: tiramisu/api.py:1428 tiramisu/api.py:1455 #: tiramisu/api.py:1420 tiramisu/api.py:1447
msgid "unknown when {} (must be in append or remove)" msgid "unknown when {} (must be in append or remove)"
msgstr "value {} inconsistent (doit être append ou remove)" msgstr "value {} inconsistent (doit être append ou remove)"
#: tiramisu/api.py:1441 tiramisu/api.py:1465 tiramisu/config.py:1676 #: tiramisu/api.py:1433 tiramisu/api.py:1457 tiramisu/config.py:1681
msgid "unknown type {}" msgid "unknown type {}"
msgstr "type inconnu {}" msgstr "type inconnu {}"
#: tiramisu/api.py:1829 #: tiramisu/api.py:1821
msgid "do not use unrestraint, nowarnings or forcepermissive together" msgid "do not use unrestraint, nowarnings or forcepermissive together"
msgstr "" msgstr ""
"il ne faut pas utiliser unrestraint, nowarnings ou forcepermissive ensemble" "il ne faut pas utiliser unrestraint, nowarnings ou forcepermissive ensemble"
#: tiramisu/autolib.py:89 #: tiramisu/autolib.py:81
msgid "args in params must be a tuple" msgid "args in params must be a tuple"
msgstr "args dans params doit être un tuple" msgstr "args dans params doit être un tuple"
#: tiramisu/autolib.py:92 tiramisu/autolib.py:97 #: tiramisu/autolib.py:84 tiramisu/autolib.py:89
msgid "arg in params must be a Param" msgid "arg in params must be a Param"
msgstr "arg dans params doit être un Param" msgstr "arg dans params doit être un Param"
#: tiramisu/autolib.py:94 #: tiramisu/autolib.py:86
msgid "kwargs in params must be a dict" msgid "kwargs in params must be a dict"
msgstr "kwargs dans params doit être un dict" msgstr "kwargs dans params doit être un dict"
#: tiramisu/autolib.py:122 #: tiramisu/autolib.py:114
msgid "paramoption needs an option not {}" msgid "paramoption needs an option not {}"
msgstr "paramoption doit être une option pas {0}" msgstr "paramoption doit être une option pas {0}"
#: tiramisu/autolib.py:128 #: tiramisu/autolib.py:120
msgid "param must have a boolean not a {} for notraisepropertyerror" msgid "param must have a boolean not a {} for notraisepropertyerror"
msgstr "param doit avoir un booléan pas un {} pour notraisepropertyerror" msgstr "param doit avoir un booléan pas un {} pour notraisepropertyerror"
#: tiramisu/autolib.py:131 #: tiramisu/autolib.py:123
msgid "param must have a boolean not a {} for raisepropertyerror" msgid "param must have a boolean not a {} for raisepropertyerror"
msgstr "param doit avoir un booléan pas un {} pour raisepropertyerror" msgstr "param doit avoir un booléan pas un {} pour raisepropertyerror"
#: tiramisu/autolib.py:160 #: tiramisu/autolib.py:152
msgid "identifiers in ParamDynOption must be a list, not {0}" msgid "identifiers in ParamDynOption must be a list, not {0}"
msgstr "" msgstr ""
"les identifiants d'un ParamDynOption doivent être une liste, donc pas {0}" "les identifiants d'un ParamDynOption doivent être une liste, donc pas {0}"
#: tiramisu/autolib.py:166 #: tiramisu/autolib.py:156
msgid "optional in ParamDynOption must be a boolean, not {0}" msgid "optional in ParamDynOption must be a boolean, not {0}"
msgstr "" msgstr ""
"le paramètre optional dans ParamDynOption doit être un booléen, pas {0}" "le paramètre optional dans ParamDynOption doit être un booléen, pas {0}"
#: tiramisu/autolib.py:220 #: tiramisu/autolib.py:207
msgid "cannot add option in information after creating config" msgid "cannot add option in information after creating config"
msgstr "" msgstr ""
"ne peut ajouter une option dans une information après la création de la " "ne peut ajouter une option dans une information après la création de la "
"configuration" "configuration"
#: tiramisu/autolib.py:223 #: tiramisu/autolib.py:209
msgid "cannot redefine option in information" msgid "cannot redefine option in information"
msgstr "on ne peu pas redéfinir une option dans une information" msgstr "on ne peu pas redéfinir une option dans une information"
#: tiramisu/autolib.py:227 #: tiramisu/autolib.py:213
msgid "option in ParamInformation cannot be a symlinkoption" msgid "option in ParamInformation cannot be a symlinkoption"
msgstr "l'option dans ParamInformation ne peut pas être un symlinkoption" msgstr "l'option dans ParamInformation ne peut pas être un symlinkoption"
#: tiramisu/autolib.py:230 #: tiramisu/autolib.py:216
msgid "option in ParamInformation cannot be a follower" msgid "option in ParamInformation cannot be a follower"
msgstr "l'option dans ParamInformation ne peut pas être suiveuse" msgstr "l'option dans ParamInformation ne peut pas être suiveuse"
#: tiramisu/autolib.py:233 #: tiramisu/autolib.py:219
msgid "option in ParamInformation cannot be a dynamic option" msgid "option in ParamInformation cannot be a dynamic option"
msgstr "l'option dans ParamInformation ne peut pas être une option dynamique" msgstr "l'option dans ParamInformation ne peut pas être une option dynamique"
#: tiramisu/autolib.py:294 #: tiramisu/autolib.py:280
msgid "first argument ({0}) must be a function" msgid "first argument ({0}) must be a function"
msgstr "le premier argument ({0}) doit être une fonction" msgstr "le premier argument ({0}) doit être une fonction"
#: tiramisu/autolib.py:298 #: tiramisu/autolib.py:284
msgid "help_function ({0}) must be a function" msgid "help_function ({0}) must be a function"
msgstr "help_function ({0}) doit être une fonction" msgstr "help_function ({0}) doit être une fonction"
#: tiramisu/autolib.py:469 tiramisu/autolib.py:524 #: tiramisu/autolib.py:455 tiramisu/autolib.py:503
msgid "the option {0} is used in a calculation but is invalid ({1})" msgid "the option {0} is used in a calculation but is invalid ({1})"
msgstr "l'option {0} est utilisé dans un calcul mais est invalide ({1})" msgstr "l'option {0} est utilisé dans un calcul mais est invalide ({1})"
#: tiramisu/autolib.py:482 tiramisu/autolib.py:538 tiramisu/autolib.py:588 #: tiramisu/autolib.py:467 tiramisu/autolib.py:515 tiramisu/autolib.py:554
msgid "unable to get value for calculating {0}, {1}" msgid "unable to get value for calculating {0}, {1}"
msgstr "impossible de trouver la valeur pour calculer {0}, {1}" msgstr "impossible de trouver la valeur pour calculer {0}, {1}"
#: tiramisu/autolib.py:517 #: tiramisu/autolib.py:499
msgid "unable to carry out a calculation for {0}, {1}" msgid "unable to carry out a calculation for {0}, {1}"
msgstr "impossible d'effectuer le calcul pour {0}, {1}" msgstr "impossible d'effectuer le calcul pour {0}, {1}"
#: tiramisu/autolib.py:563 #: tiramisu/autolib.py:535
msgid "cannot find information for {0}, {1} is a dynamic option" msgid "cannot find information for {0}, {1} is a dynamic option"
msgstr "ne peut trouver l'information pour {0}, {1} est une option dynamique" msgstr "ne peut trouver l'information pour {0}, {1} est une option dynamique"
#: tiramisu/autolib.py:603 #: tiramisu/autolib.py:564
msgid "option {0} is not a dynoptiondescription or in a dynoptiondescription" msgid "option {0} is not a dynoptiondescription or in a dynoptiondescription"
msgstr "" msgstr ""
"l'option {0} n'est pas une dynoptiondescription ou n'est pas dans une " "l'option {0} n'est pas une dynoptiondescription ou n'est pas dans une "
"dynoptiondescription" "dynoptiondescription"
#: tiramisu/autolib.py:696 #: tiramisu/autolib.py:650
msgid "" msgid ""
"cannot calculate arguments for {0}, {1} with identifier \"{2}\", there is no " "cannot calculate arguments for \"{0}\", cannot find dynamic variable \"{1}\" "
"identifiers" "with identifier \"{2}\", list of valid identifiers: {3}"
msgstr "" msgstr ""
"impossible de calculer les arguments de {0}, {1} avec l'identifiant \"{2}\", " "impossible de calculer les arguments de \"{0}\", ne peut trouver la variable "
"il n'y a pas d'identifiants" "dynamique \"{1}\" avec l'identifiant \"{2}\", voici la liste des "
"identifiants valables : {3}"
#: tiramisu/autolib.py:708 #: tiramisu/autolib.py:754
msgid ""
"cannot calculate arguments for {0}, {1} with identifier \"{2}\", list of "
"valid identifiers: {3}"
msgstr ""
"impossible de calculer les arguments de {0}, {1} avec l'identifiant \"{2}\", "
"voici la liste des identifiants valables : {3}"
#: tiramisu/autolib.py:819
msgid "the follower {0} must have index in carry_out_calculation!" msgid "the follower {0} must have index in carry_out_calculation!"
msgstr "" msgstr ""
"la variable suiveuse {0} doit avoir un index dans carry_out_calculation!" "la variable suiveuse {0} doit avoir un index dans carry_out_calculation!"
#: tiramisu/autolib.py:931 #: tiramisu/autolib.py:826
msgid ""
"the \"{}\" function with positional arguments \"{}\" and keyword arguments "
"\"{}\" must not return a list (\"{}\") for the follower option {}"
msgstr ""
"la fonction \"{}\" avec les arguments positionnels \"{}\" et les arguments "
"nommés \"{}\" ne doit pas retourner une liste (\"{}\") pour l'option "
"suiveuse {}"
#: tiramisu/autolib.py:841
msgid ""
"the \"{}\" function must not return a list (\"{}\") for the follower option "
"{}"
msgstr ""
"la fonction \"{}\" ne doit pas retourner une liste (\"{}\") pour l'option "
"suiveuse {}"
#: tiramisu/autolib.py:882
msgid "" msgid ""
"unexpected error \"{1}\" in function \"{2}\" with arguments \"{3}\" and " "unexpected error \"{1}\" in function \"{2}\" with arguments \"{3}\" and "
"\"{4}\" for option {0}" "\"{4}\" for option {0}"
@ -234,50 +248,64 @@ msgstr ""
"erreur inattendue \"{1}\" dans la fonction \"{2}\" avec les arguments " "erreur inattendue \"{1}\" dans la fonction \"{2}\" avec les arguments "
"\"{3}\" et \"{4}\" pour l'option {0}" "\"{3}\" et \"{4}\" pour l'option {0}"
#: tiramisu/autolib.py:941 #: tiramisu/autolib.py:891
msgid "unexpected error \"{1}\" in function \"{2}\" for option {0}" msgid "unexpected error \"{1}\" in function \"{2}\" for option {0}"
msgstr "erreur inattendue \"{1}\" dans la fonction \"{2}\" pour l'option {0}" msgstr "erreur inattendue \"{1}\" dans la fonction \"{2}\" pour l'option {0}"
#: tiramisu/config.py:574 #: tiramisu/config.py:420
msgid ""
"index \"{0}\" is greater than the leadership length \"{1}\" for option {2}"
msgstr ""
"l'index \"{0}\" est supérieur à la longueur de la leadership \"{1}\" pour "
"l'option {2}"
#: tiramisu/config.py:580
msgid "there is no option description for this config (may be GroupConfig)" msgid "there is no option description for this config (may be GroupConfig)"
msgstr "" msgstr ""
"il n'y a pas d'option description trouvé pour cette config (peut être un " "il n'y a pas d'option description trouvé pour cette config (peut être un "
"GroupConfig)" "GroupConfig)"
#: tiramisu/config.py:663 #: tiramisu/config.py:669
msgid "no option found in config with these criteria" msgid "no option found in config with these criteria"
msgstr "aucune option trouvée dans la config avec ces critères" msgstr "aucune option trouvée dans la config avec ces critères"
#: tiramisu/config.py:978 tiramisu/option/optiondescription.py:74 #: tiramisu/config.py:872
msgid ""
"the follower option {0} has greater length ({1}) than the leader length ({2})"
msgstr ""
"l'option suiveuse {0} a une longueur supérieur ({1}) à la longueur de "
"l'option leader ({2})"
#: tiramisu/config.py:983 tiramisu/option/optiondescription.py:74
msgid "option description seems to be part of an other config" msgid "option description seems to be part of an other config"
msgstr "l'option description semble faire parti d'une autre config" msgstr "l'option description semble faire parti d'une autre config"
#: tiramisu/config.py:1140 #: tiramisu/config.py:1145
msgid "parent of {0} not already exists" msgid "parent of {0} not already exists"
msgstr "le parent de {0} n'existe plus" msgstr "le parent de {0} n'existe plus"
#: tiramisu/config.py:1187 #: tiramisu/config.py:1192
msgid "cannot set leadership object has root optiondescription" msgid "cannot set leadership object has root optiondescription"
msgstr "ne peut assigner un objet leadership comme optiondescription racine" msgstr "ne peut assigner un objet leadership comme optiondescription racine"
#: tiramisu/config.py:1190 #: tiramisu/config.py:1195
msgid "cannot set dynoptiondescription object has root optiondescription" msgid "cannot set dynoptiondescription object has root optiondescription"
msgstr "" msgstr ""
"ne peut assigner un objet dynoptiondescription comme optiondescription racine" "ne peut assigner un objet dynoptiondescription comme optiondescription racine"
#: tiramisu/config.py:1242 #: tiramisu/config.py:1247
msgid "config name must be uniq in groupconfig for \"{0}\"" msgid "config name must be uniq in groupconfig for \"{0}\""
msgstr "le nom d'un config doit être unique dans un groupconfig pour \"{0}\"" msgstr "le nom d'un config doit être unique dans un groupconfig pour \"{0}\""
#: tiramisu/config.py:1453 #: tiramisu/config.py:1458
msgid "unknown config \"{}\"" msgid "unknown config \"{}\""
msgstr "config \"{}\" inconnue" msgstr "config \"{}\" inconnue"
#: tiramisu/config.py:1478 #: tiramisu/config.py:1483
msgid "child must be a Config, MixConfig or MetaConfig" msgid "child must be a Config, MixConfig or MetaConfig"
msgstr "l'enfant doit être une Config, MixConfig ou MetaConfig" msgstr "l'enfant doit être une Config, MixConfig ou MetaConfig"
#: tiramisu/config.py:1513 #: tiramisu/config.py:1518
msgid "" msgid ""
"force_default, force_default_if_same or force_dont_change_value cannot be " "force_default, force_default_if_same or force_dont_change_value cannot be "
"set with only_config" "set with only_config"
@ -285,194 +313,108 @@ msgstr ""
"force_default, force_default_if_same ou force_dont_change_value ne peuvent " "force_default, force_default_if_same ou force_dont_change_value ne peuvent "
"pas être spécifié avec only_config" "pas être spécifié avec only_config"
#: tiramisu/config.py:1523 #: tiramisu/config.py:1528
msgid "force_default and force_dont_change_value cannot be set together" msgid "force_default and force_dont_change_value cannot be set together"
msgstr "" msgstr ""
"force_default et force_dont_change_value ne peuvent pas être mis ensemble" "force_default et force_dont_change_value ne peuvent pas être mis ensemble"
#: tiramisu/config.py:1672 #: tiramisu/config.py:1677
msgid "config name must be uniq in groupconfig for {0}" msgid "config name must be uniq in groupconfig for {0}"
msgstr "le nom de la config doit être unique dans un groupconfig pour {0}" msgstr "le nom de la config doit être unique dans un groupconfig pour {0}"
#: tiramisu/config.py:1717 #: tiramisu/config.py:1722
msgid "config added has no name, the name is mandatory" msgid "config added has no name, the name is mandatory"
msgstr "la config ajoutée n'a pas de nom, le nom est obligatoire" msgstr "la config ajoutée n'a pas de nom, le nom est obligatoire"
#: tiramisu/config.py:1722 #: tiramisu/config.py:1727
msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\"" msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\""
msgstr "" msgstr ""
"le nom d'un config \"{0}\" n'est pas unique dans le groupconfig \"{1}\"" "le nom d'un config \"{0}\" n'est pas unique dans le groupconfig \"{1}\""
#: tiramisu/config.py:1740 tiramisu/config.py:1746 #: tiramisu/config.py:1745 tiramisu/config.py:1751
msgid "cannot find the config {0}" msgid "cannot find the config {0}"
msgstr "ne peut pas trouver la config {0}" msgstr "ne peut pas trouver la config {0}"
#: tiramisu/config.py:1772 #: tiramisu/config.py:1777
msgid "MetaConfig with optiondescription must have string has child, not {}" msgid "MetaConfig with optiondescription must have string has child, not {}"
msgstr "" msgstr ""
"MetaConfig avec une optiondescription doit avoir un nom comme enfant, pas {}" "MetaConfig avec une optiondescription doit avoir un nom comme enfant, pas {}"
#: tiramisu/config.py:1784 #: tiramisu/config.py:1789
msgid "child must be a Config or MetaConfig" msgid "child must be a Config or MetaConfig"
msgstr "enfant doit être une une Config ou une MetaConfig" msgstr "enfant doit être une une Config ou une MetaConfig"
#: tiramisu/config.py:1789 #: tiramisu/config.py:1794
msgid "all config in metaconfig must have the same optiondescription" msgid "all config in metaconfig must have the same optiondescription"
msgstr "" msgstr ""
"toutes les configs d'une metaconfig doivent avoir la même optiondescription" "toutes les configs d'une metaconfig doivent avoir la même optiondescription"
#: tiramisu/config.py:1806 #: tiramisu/config.py:1811
msgid "metaconfig must have the same optiondescription" msgid "metaconfig must have the same optiondescription"
msgstr "metaconfig doivent avoir la même optiondescription" msgstr "metaconfig doivent avoir la même optiondescription"
#: tiramisu/error.py:48 #: tiramisu/error.py:31
msgid "and" msgid "and"
msgstr "et" msgstr "et"
#: tiramisu/error.py:50 #: tiramisu/error.py:33
msgid "or" msgid "or"
msgstr "ou" msgstr "ou"
#: tiramisu/error.py:72 #: tiramisu/error.py:55
msgid " {} " msgid " {} "
msgstr " {} " msgstr " {} "
#: tiramisu/error.py:145 #: tiramisu/error.py:108
msgid "cannot modify the {0} {1} at index \"{2}\" because {3} is frozen"
msgstr "ne peut modifier {0} {1} à l'index \"{2}\" parce que {3} est frozen"
#: tiramisu/error.py:149
msgid "cannot modify the {0} {1} at index \"{2}\" because is frozen"
msgstr "ne peut modifier {0} {1} à l'index \"{2}\" parce que frozen"
#: tiramisu/error.py:154
msgid "cannot modify the {0} {1} because {2} is frozen"
msgstr "ne peut modifier {0} {1} parce que {2} est frozen"
#: tiramisu/error.py:156
msgid "cannot modify the {0} {1} because is frozen"
msgstr "ne peut modifier {0} {1} parce qu'est frozen"
#: tiramisu/error.py:160
#, fuzzy
#| msgid "cannot access to {0} {1} at index \"{2}\" because {2} hasn't value"
msgid "cannot access to {0} {1} at index \"{2}\" because {3} hasn't value"
msgstr ""
"ne peut accéder à {0} {1} à l'index \"{2}\" parce que {3} n'a pas de valeur"
#: tiramisu/error.py:164
msgid "{0} {1} at index \"{2}\" is mandatory but hasn't value"
msgstr "{0} {1} à l'index \"{2}\" est obligatoire mais n'a pas de valeur"
#: tiramisu/error.py:167
msgid "cannot access to {0} {1} because {2} hasn't value"
msgstr "ne peut accéder à {0} {1} parce que {2} n'a pas de valeur"
#: tiramisu/error.py:169
msgid "{0} {1} is mandatory but hasn't value"
msgstr "{0} {1} est obligatoire mais n'a pas de valeur"
#: tiramisu/error.py:173
msgid "cannot access to {0} {1} at index \"{2}\" because {3} has {4} {5}"
msgstr "ne peut accéder à {0} {1} à l'index \"{2}\" parce que {3} a {4} {5}"
#: tiramisu/error.py:177
msgid "cannot access to {0} {1} at index \"{2}\" because has {3} {4}"
msgstr "ne peut accéder à {0} {1} à l'index \"{2}\" parce que a {3} {4}"
#: tiramisu/error.py:182
msgid "cannot access to {0} {1} because {2} has {3} {4}"
msgstr "ne peut accéder à {0} {1} parce que {2} a {3} {4}"
#: tiramisu/error.py:184
msgid "cannot access to {0} {1} because has {2} {3}"
msgstr "ne peut accéder à l'{0} {1} à cause {2} {3}"
#: tiramisu/error.py:187
msgid "property" msgid "property"
msgstr "de la propriété" msgstr "de la propriété"
#: tiramisu/error.py:189 #: tiramisu/error.py:110
msgid "properties" msgid "properties"
msgstr "des propriétés" msgstr "des propriétés"
#: tiramisu/error.py:204 #: tiramisu/error.py:113
msgid "cannot access to \"{0}\" it's a dynamic option" msgid "cannot modify the {0} {1} because \"{2}\" has {3} {4}"
msgstr "ne peut accéder à \"{0}\" c'est une option dynamique" msgstr "ne peut modifier {0} \"{1}\" parce que \"{2}\" a {3} {4}"
#: tiramisu/error.py:205 #: tiramisu/error.py:115
msgid "\"{0}\" is not an option" msgid "cannot modify the {0} {1} because has {2} {3}"
msgstr "\"{0}\" n'est pas une option" msgstr "ne peut modifier {0} \"{1}\" à cause {2} {3}"
#: tiramisu/error.py:269 #: tiramisu/error.py:118
msgid "cannot set \"group_type\" attribute for the Leadership {0}" msgid "cannot access to {0} {1} because \"{2}\" hasn't value"
msgstr "ne peut mettre l'attribut \"group_type\" pour la Leadership {0}" msgstr "ne peut accéder à {0} {1} parce que \"{2}\" n'a pas de valeur"
#: tiramisu/error.py:273 #: tiramisu/error.py:120
msgid "the leader {0} cannot have \"{1}\" property" msgid "{0} {1} is mandatory but hasn't value"
msgstr "l'option leader {0} ne peut avoir la propriété \"{1}\"" msgstr "{0} {1} est obligatoire mais n'a pas de valeur"
#: tiramisu/error.py:277 #: tiramisu/error.py:123
msgid "" msgid "cannot access to {0} {1} because \"{2}\" has {3} {4}"
"the leader {0} cannot have \"force_default_on_freeze\" or " msgstr "ne peut accéder à {0} {1} parce que \"{2}\" a {3} {4}"
"\"force_metaconfig_on_freeze\" property without \"frozen\""
msgstr ""
"l'option leader {0} ne peut avoir de propriété \"force_default_on_freeze\" "
"ou \"force_metaconfig_on_freeze\" sans \"frozen\""
#: tiramisu/error.py:281 #: tiramisu/error.py:125
msgid "cannot reduce length of the leader {0}" msgid "cannot access to {0} {1} because has {2} {3}"
msgstr "il est impossible de réduire la longueur du leader {0}" msgstr "ne peut accéder à l'{0} {1} à cause {2} {3}"
#: tiramisu/error.py:283 #: tiramisu/error.py:197
msgid ""
"index \"{0}\" is greater than the leadership length \"{1}\" for option {2}"
msgstr ""
"l'index \"{0}\" est supérieur à la longueur de la leadership \"{1}\" pour "
"l'option {2}"
#: tiramisu/error.py:287
msgid ""
"the follower option {0} has greater length ({1}) than the leader length ({2})"
msgstr ""
"l'option suiveuse {0} a une longueur supérieur ({1}) à la longueur de "
"l'option leader ({2})"
#: tiramisu/error.py:292
msgid ""
"the \"{0}\" function with positional arguments \"{1}\" and keyword arguments "
"\"{2}\" must not return a list (\"{3}\") for the follower option {4}"
msgstr ""
"la fonction \"{0}\" avec les arguments positionnels \"{1}\" et les arguments "
"nommés \"{2}\" ne doit pas retourner une liste (\"{3}\") pour l'option "
"suiveuse {4}"
#: tiramisu/error.py:297
msgid ""
"the \"{0}\" function must not return a list (\"{1}\") for the follower "
"option {2}"
msgstr ""
"la fonction \"{0}\" ne doit pas retourner une liste (\"{1}\") pour l'option "
"suiveuse {2}"
#: tiramisu/error.py:331
msgid "invalid value" msgid "invalid value"
msgstr "valeur invalide" msgstr "valeur invalide"
#: tiramisu/error.py:341 #: tiramisu/error.py:207
msgid "attention, \"{0}\" could be an invalid {1} for {2}" msgid "attention, \"{0}\" could be an invalid {1} for {2}"
msgstr "attention, \"{0}\" peut être un {1} invalide pour {2}" msgstr "attention, \"{0}\" peut être un {1} invalide pour {2}"
#: tiramisu/error.py:345 #: tiramisu/error.py:209
msgid "attention, \"{0}\" could be an invalid {1} for {2} at index \"{3}\"" msgid "attention, \"{0}\" could be an invalid {1} for {2} at index \"{3}\""
msgstr "" msgstr ""
"attention, \"{0}\" peut être un {1} invalide pour {2} à l'index \"{3}\"" "attention, \"{0}\" peut être un {1} invalide pour {2} à l'index \"{3}\""
#: tiramisu/error.py:366 tiramisu/error.py:377 #: tiramisu/error.py:228 tiramisu/error.py:239
msgid "\"{0}\" is an invalid {1} for {2}" msgid "\"{0}\" is an invalid {1} for {2}"
msgstr "\"{0}\" est une valeur invalide pour l'option {2} de type {1}" msgstr "\"{0}\" est une valeur invalide pour l'option {2} de type {1}"
#: tiramisu/error.py:368 #: tiramisu/error.py:230
msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\"" msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\""
msgstr "\"{0}\" est un {1} invalide pour {2} à l'index \"{3}\"" msgstr "\"{0}\" est un {1} invalide pour {2} à l'index \"{3}\""
@ -670,19 +612,19 @@ msgstr "doit avoir un point"
msgid "invalid length (max 255)" msgid "invalid length (max 255)"
msgstr "longueur invalide (max 255)" msgstr "longueur invalide (max 255)"
#: tiramisu/option/domainnameoption.py:179 #: tiramisu/option/domainnameoption.py:180
msgid "DNS resolution failed" msgid "DNS resolution failed"
msgstr "la résolution DNS a échoué" msgstr "la résolution DNS a échoué"
#: tiramisu/option/domainnameoption.py:182 #: tiramisu/option/domainnameoption.py:184
msgid "error resolving DNS: {1}" msgid "error resolving DNS: {1}"
msgstr "erreur de résolution DNS : {1}" msgstr "erreur de résolution DNS : {1}"
#: tiramisu/option/domainnameoption.py:189 #: tiramisu/option/domainnameoption.py:191
msgid "must not be an IP" msgid "must not be an IP"
msgstr "ne doit pas être une IP" msgstr "ne doit pas être une IP"
#: tiramisu/option/domainnameoption.py:212 #: tiramisu/option/domainnameoption.py:214
msgid "some characters are uppercase" msgid "some characters are uppercase"
msgstr "des caractères sont en majuscule" msgstr "des caractères sont en majuscule"
@ -713,15 +655,15 @@ msgstr ""
msgid "must starts with \"/\"" msgid "must starts with \"/\""
msgstr "doit débuter par \"/\"" msgstr "doit débuter par \"/\""
#: tiramisu/option/filenameoption.py:78 #: tiramisu/option/filenameoption.py:77
msgid "directory" msgid "directory"
msgstr "répertoire" msgstr "répertoire"
#: tiramisu/option/filenameoption.py:78 #: tiramisu/option/filenameoption.py:77
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: tiramisu/option/filenameoption.py:82 #: tiramisu/option/filenameoption.py:79
msgid "cannot find this {0}" msgid "cannot find this {0}"
msgstr "ce {0} est introuvable" msgstr "ce {0} est introuvable"
@ -773,28 +715,36 @@ msgstr "devrait être une IP privée"
msgid "must be private IP" msgid "must be private IP"
msgstr "doit être une IP privée" msgstr "doit être une IP privée"
#: tiramisu/option/leadership.py:65 #: tiramisu/option/leadership.py:55
msgid "cannot set \"group_type\" attribute for a Leadership"
msgstr "ne peut mettre l'attribut \"group_type\" pour une Leadership"
#: tiramisu/option/leadership.py:67
msgid "a leader and a follower are mandatories in leadership \"{}\"" msgid "a leader and a follower are mandatories in leadership \"{}\""
msgstr "" msgstr ""
"une option leader et une option suiveuse sont obligatoires dans une option " "une option leader et une option suiveuse sont obligatoires dans une option "
"leadership \"{}\"" "leadership \"{}\""
#: tiramisu/option/leadership.py:97 #: tiramisu/option/leadership.py:89
msgid "leader cannot have \"{}\" property"
msgstr "leader ne peut avoir la propriété \"{}\""
#: tiramisu/option/leadership.py:101
msgid "leadership {0} shall not have a symlinkoption" msgid "leadership {0} shall not have a symlinkoption"
msgstr "une option leadership \"{0}\" ne devrait pas avoir de symlinkoption" msgstr "une option leadership \"{0}\" ne devrait pas avoir de symlinkoption"
#: tiramisu/option/leadership.py:104 #: tiramisu/option/leadership.py:108
msgid "leadership {0} shall not have a subgroup" msgid "leadership {0} shall not have a subgroup"
msgstr "une option leadership \"{0}\" ne devrait pas avoir de sous-groupe" msgstr "une option leadership \"{0}\" ne devrait pas avoir de sous-groupe"
#: tiramisu/option/leadership.py:110 #: tiramisu/option/leadership.py:114
msgid "" msgid ""
"only multi option are allowed in leadership {0} but option {1} is not a multi" "only multi option are allowed in leadership {0} but option {1} is not a multi"
msgstr "" msgstr ""
"seules des options multiples sont autorisées dans l'option leadership {0} " "seules des options multiples sont autorisées dans l'option leadership {0} "
"alors que l'option {1} n'est pas une option multiple" "alors que l'option {1} n'est pas une option multiple"
#: tiramisu/option/leadership.py:137 #: tiramisu/option/leadership.py:141
msgid "not allowed default value for follower option {0} in leadership {1}" msgid "not allowed default value for follower option {0} in leadership {1}"
msgstr "" msgstr ""
"valeur par défaut non autorisée pour l'option suiveuse {0} dans l'option " "valeur par défaut non autorisée pour l'option suiveuse {0} dans l'option "
@ -845,19 +795,19 @@ msgstr ""
"valeur invalide pour default_multi \"{0}\" pour l'option {1}, doit être une " "valeur invalide pour default_multi \"{0}\" pour l'option {1}, doit être une "
"liste pour une submulti" "liste pour une submulti"
#: tiramisu/option/option.py:294 #: tiramisu/option/option.py:291
msgid "the value \"{}\" is not unique" msgid "the value \"{}\" is not unique"
msgstr "la valeur de \"{}\" n'est pas unique" msgstr "la valeur de \"{}\" n'est pas unique"
#: tiramisu/option/option.py:356 #: tiramisu/option/option.py:353
msgid "which must not be a list" msgid "which must not be a list"
msgstr "qui ne doit pas être une liste" msgstr "qui ne doit pas être une liste"
#: tiramisu/option/option.py:408 tiramisu/option/option.py:434 #: tiramisu/option/option.py:405 tiramisu/option/option.py:431
msgid "which must be a list" msgid "which must be a list"
msgstr "qui doit être une liste" msgstr "qui doit être une liste"
#: tiramisu/option/option.py:428 #: tiramisu/option/option.py:425
msgid "which \"{}\" must be a list of list" msgid "which \"{}\" must be a list of list"
msgstr "lequel \"{}\" doit être une liste de liste" msgstr "lequel \"{}\" doit être une liste de liste"
@ -865,26 +815,34 @@ msgstr "lequel \"{}\" doit être une liste de liste"
msgid "duplicate option: {0}" msgid "duplicate option: {0}"
msgstr "option dupliquée : {0}" msgstr "option dupliquée : {0}"
#: tiramisu/option/optiondescription.py:336 #: tiramisu/option/optiondescription.py:249
msgid "cannot access to \"{0}\" it's a dynamic option"
msgstr "ne peut accéder à \"{0}\" c'est une option dynamique"
#: tiramisu/option/optiondescription.py:286
msgid "cannot find \"{0}\" in \"{1}\""
msgstr "ne peut pas trouver \"{0}\" dans \"{1}\""
#: tiramisu/option/optiondescription.py:342
msgid "children in optiondescription \"{}\" must be a list" msgid "children in optiondescription \"{}\" must be a list"
msgstr "les enfants d'une optiondescription \"{}\" doivent être une liste" msgstr "les enfants d'une optiondescription \"{}\" doivent être une liste"
#: tiramisu/option/optiondescription.py:364 #: tiramisu/option/optiondescription.py:370
msgid "duplicate option name: \"{0}\"" msgid "duplicate option name: \"{0}\""
msgstr "nom de l'option dupliqué : \"{0}\"" msgstr "nom de l'option dupliqué : \"{0}\""
#: tiramisu/option/optiondescription.py:370 #: tiramisu/option/optiondescription.py:376
msgid "" msgid ""
"the option's name \"{0}\" start as the dynoptiondescription's name \"{1}\"" "the option's name \"{0}\" start as the dynoptiondescription's name \"{1}\""
msgstr "" msgstr ""
"le nom de l'option \"{0}\" commence comme le nom du dynoptiondescription " "le nom de l'option \"{0}\" commence comme le nom du dynoptiondescription "
"\"{1}\"" "\"{1}\""
#: tiramisu/option/optiondescription.py:413 #: tiramisu/option/optiondescription.py:419
msgid "cannot change group_type if already set (old {0}, new {1})" msgid "cannot change group_type if already set (old {0}, new {1})"
msgstr "ne peut changer group_type si déjà spécifié (ancien {0}, nouveau {1})" msgstr "ne peut changer group_type si déjà spécifié (ancien {0}, nouveau {1})"
#: tiramisu/option/optiondescription.py:418 #: tiramisu/option/optiondescription.py:424
msgid "group_type: {0} not allowed" msgid "group_type: {0} not allowed"
msgstr "group_type : {0} non autorisé" msgstr "group_type : {0} non autorisé"
@ -992,19 +950,35 @@ msgstr ""
"type {type(new_prop)} de la propriété invalide pour la fonction {subconfig." "type {type(new_prop)} de la propriété invalide pour la fonction {subconfig."
"option.impl_getname()} with {prop.function.__name__}" "option.impl_getname()} with {prop.function.__name__}"
#: tiramisu/setting.py:606 #: tiramisu/setting.py:479
msgid "leader cannot have \"{new_prop}\" property"
msgstr "une option leader ne peu avoir la propriété \"{new_prop}\""
#: tiramisu/setting.py:567
msgid "leader cannot have \"{0}\" property"
msgstr "leader ne peut avoir la propriété \"{0}\""
#: tiramisu/setting.py:576
msgid ""
"a leader ({0}) cannot have \"force_default_on_freeze\" or "
"\"force_metaconfig_on_freeze\" property without \"frozen\""
msgstr ""
"une option leader ({0}) ne peut avoir de propriété "
"\"force_default_on_freeze\" or \"force_metaconfig_on_freeze\" sans \"frozen\""
#: tiramisu/setting.py:610
msgid "permissive must be a frozenset" msgid "permissive must be a frozenset"
msgstr "une permissive doit être de type frozenset" msgstr "une permissive doit être de type frozenset"
#: tiramisu/setting.py:616 #: tiramisu/setting.py:620
msgid "cannot add those permissives: {0}" msgid "cannot add those permissives: {0}"
msgstr "ne peut ajouter ces permissives : {0}" msgstr "ne peut ajouter ces permissives : {0}"
#: tiramisu/setting.py:653 #: tiramisu/setting.py:657
msgid "can't reset properties to the symlinkoption \"{}\"" msgid "can't reset properties to the symlinkoption \"{}\""
msgstr "ne peut réinitialiser les propriétés de la symlinkoption \"{}\"" msgstr "ne peut réinitialiser les propriétés de la symlinkoption \"{}\""
#: tiramisu/setting.py:666 #: tiramisu/setting.py:670
msgid "can't reset permissives to the symlinkoption \"{}\"" msgid "can't reset permissives to the symlinkoption \"{}\""
msgstr "ne peut réinitialiser les permissive de la symlinkoption \"{}\"" msgstr "ne peut réinitialiser les permissive de la symlinkoption \"{}\""
@ -1034,17 +1008,17 @@ msgstr ""
msgid "unknown action {}" msgid "unknown action {}"
msgstr "action inconnue {}" msgstr "action inconnue {}"
#: tiramisu/value.py:570 tiramisu/value.py:872 #: tiramisu/value.py:566 tiramisu/value.py:863
msgid "set owner \"{0}\" is forbidden" msgid "set owner \"{0}\" is forbidden"
msgstr "assigner l'utilisateur \"{0}\" est interdit" msgstr "assigner l'utilisateur \"{0}\" est interdit"
#: tiramisu/value.py:577 #: tiramisu/value.py:573
msgid "\"{0}\" is a default value, so we cannot change owner to \"{1}\"" msgid "\"{0}\" is a default value, so we cannot change owner to \"{1}\""
msgstr "" msgstr ""
"\"{0}\" est une valeur par défaut, donc ne peut changer d'utilisateur à " "\"{0}\" est une valeur par défaut, donc ne peut changer d'utilisateur à "
"\"{1}\"" "\"{1}\""
#: tiramisu/value.py:751 #: tiramisu/value.py:742
msgid "" msgid ""
"index {index} is greater than the length {length} for option {subconfig." "index {index} is greater than the length {length} for option {subconfig."
"option.impl_get_display_name(with_quote=True)}" "option.impl_get_display_name(with_quote=True)}"
@ -1052,19 +1026,10 @@ msgstr ""
"l'index {index} est supérieur à la longueur \"{length}\" pour l'option " "l'index {index} est supérieur à la longueur \"{length}\" pour l'option "
"\"{subconfig.option.impl_get_display_name(with_quote=True)}\"" "\"{subconfig.option.impl_get_display_name(with_quote=True)}\""
#: tiramisu/value.py:858 #: tiramisu/value.py:849
msgid "information's item not found \"{}\"" msgid "information's item not found \"{}\""
msgstr "l'information de l'objet ne sont pas trouvé \"{}\"" msgstr "l'information de l'objet ne sont pas trouvé \"{}\""
#~ msgid "cannot find \"{0}\" in \"{1}\""
#~ msgstr "ne peut pas trouver \"{0}\" dans \"{1}\""
#~ msgid "leader cannot have \"{new_prop}\" property"
#~ msgstr "une option leader ne peu avoir la propriété \"{new_prop}\""
#~ msgid "leader cannot have \"{0}\" property"
#~ msgstr "leader ne peut avoir la propriété \"{0}\""
#~ msgid "unable to unable to get value for calculating {0}, {1}" #~ msgid "unable to unable to get value for calculating {0}, {1}"
#~ msgstr "impossible de trouver la valeur pour calculer {0}, {1}" #~ msgstr "impossible de trouver la valeur pour calculer {0}, {1}"

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: 2025-05-12 09:05+0200\n" "POT-Creation-Date: 2025-04-29 23:01+0200\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"
@ -35,7 +35,7 @@ msgstr ""
msgid "Commands:" msgid "Commands:"
msgstr "" msgstr ""
#: tiramisu/api.py:111 tiramisu/api.py:1857 #: tiramisu/api.py:111 tiramisu/api.py:1849
msgid "please specify a valid sub function ({0}.{1})" msgid "please specify a valid sub function ({0}.{1})"
msgstr "" msgstr ""
@ -43,7 +43,7 @@ msgstr ""
msgid "please do not specify index ({0}.{1})" msgid "please do not specify index ({0}.{1})"
msgstr "" msgstr ""
#: tiramisu/api.py:201 tiramisu/api.py:856 #: tiramisu/api.py:201 tiramisu/api.py:848
msgid "please specify index with a follower option ({0}.{1})" msgid "please specify index with a follower option ({0}.{1})"
msgstr "" msgstr ""
@ -51,363 +51,315 @@ msgstr ""
msgid "please specify a valid sub function ({0}.{1}): {2}" msgid "please specify a valid sub function ({0}.{1}): {2}"
msgstr "" msgstr ""
#: tiramisu/api.py:446 #: tiramisu/api.py:434
msgid "the option {0} is not a dynamic option, cannot get identifiers with only_self parameter to True" msgid "the option {0} is not a dynamic option, cannot get identifiers with only_self parameter to True"
msgstr "" msgstr ""
#: tiramisu/api.py:532 #: tiramisu/api.py:520
msgid "cannot get option from a follower symlink without index" msgid "cannot get option from a follower symlink without index"
msgstr "" msgstr ""
#: tiramisu/api.py:607 #: tiramisu/api.py:595
msgid "cannot add this property: \"{0}\"" msgid "cannot add this property: \"{0}\""
msgstr "" msgstr ""
#: tiramisu/api.py:634 #: tiramisu/api.py:622
msgid "cannot remove option's property \"{0}\", use permissive instead in option \"{1}\"" msgid "cannot remove option's property \"{0}\", use permissive instead in option \"{1}\""
msgstr "" msgstr ""
#: tiramisu/api.py:638 #: tiramisu/api.py:626
msgid "cannot find \"{0}\" in option \"{1}\"" msgid "cannot find \"{0}\" in option \"{1}\""
msgstr "" msgstr ""
#: tiramisu/api.py:643 #: tiramisu/api.py:631
msgid "cannot remove option's property \"{0}\", use permissive instead in option \"{1}\" at index \"{2}\"" msgid "cannot remove option's property \"{0}\", use permissive instead in option \"{1}\" at index \"{2}\""
msgstr "" msgstr ""
#: tiramisu/api.py:647 #: tiramisu/api.py:635
msgid "cannot find \"{0}\" in option \"{1}\" at index \"{2}\"" msgid "cannot find \"{0}\" in option \"{1}\" at index \"{2}\""
msgstr "" msgstr ""
#: tiramisu/api.py:691 #: tiramisu/api.py:679 tiramisu/option/optiondescription.py:283
msgid "cannot find \"{0}\"" msgid "cannot find \"{0}\""
msgstr "" msgstr ""
#: tiramisu/api.py:873 #: tiramisu/api.py:812
msgid "cannot reduce length of the leader {}"
msgstr ""
#: tiramisu/api.py:865
msgid "only multi value has defaultmulti" msgid "only multi value has defaultmulti"
msgstr "" msgstr ""
#: tiramisu/api.py:1037 #: tiramisu/api.py:1029
msgid "please specify a valid sub function ({0}.{1}) for {2}" msgid "please specify a valid sub function ({0}.{1}) for {2}"
msgstr "" msgstr ""
#: tiramisu/api.py:1424 #: tiramisu/api.py:1416
msgid "properties must be a frozenset" msgid "properties must be a frozenset"
msgstr "" msgstr ""
#: tiramisu/api.py:1428 tiramisu/api.py:1455 #: tiramisu/api.py:1420 tiramisu/api.py:1447
msgid "unknown when {} (must be in append or remove)" msgid "unknown when {} (must be in append or remove)"
msgstr "" msgstr ""
#: tiramisu/api.py:1441 tiramisu/api.py:1465 tiramisu/config.py:1676 #: tiramisu/api.py:1433 tiramisu/api.py:1457 tiramisu/config.py:1681
msgid "unknown type {}" msgid "unknown type {}"
msgstr "" msgstr ""
#: tiramisu/api.py:1829 #: tiramisu/api.py:1821
msgid "do not use unrestraint, nowarnings or forcepermissive together" msgid "do not use unrestraint, nowarnings or forcepermissive together"
msgstr "" msgstr ""
#: tiramisu/autolib.py:89 #: tiramisu/autolib.py:81
msgid "args in params must be a tuple" msgid "args in params must be a tuple"
msgstr "" msgstr ""
#: tiramisu/autolib.py:92 tiramisu/autolib.py:97 #: tiramisu/autolib.py:84 tiramisu/autolib.py:89
msgid "arg in params must be a Param" msgid "arg in params must be a Param"
msgstr "" msgstr ""
#: tiramisu/autolib.py:94 #: tiramisu/autolib.py:86
msgid "kwargs in params must be a dict" msgid "kwargs in params must be a dict"
msgstr "" msgstr ""
#: tiramisu/autolib.py:122 #: tiramisu/autolib.py:114
msgid "paramoption needs an option not {}" msgid "paramoption needs an option not {}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:128 #: tiramisu/autolib.py:120
msgid "param must have a boolean not a {} for notraisepropertyerror" msgid "param must have a boolean not a {} for notraisepropertyerror"
msgstr "" msgstr ""
#: tiramisu/autolib.py:131 #: tiramisu/autolib.py:123
msgid "param must have a boolean not a {} for raisepropertyerror" msgid "param must have a boolean not a {} for raisepropertyerror"
msgstr "" msgstr ""
#: tiramisu/autolib.py:160 #: tiramisu/autolib.py:152
msgid "identifiers in ParamDynOption must be a list, not {0}" msgid "identifiers in ParamDynOption must be a list, not {0}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:166 #: tiramisu/autolib.py:156
msgid "optional in ParamDynOption must be a boolean, not {0}" msgid "optional in ParamDynOption must be a boolean, not {0}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:220 #: tiramisu/autolib.py:207
msgid "cannot add option in information after creating config" msgid "cannot add option in information after creating config"
msgstr "" msgstr ""
#: tiramisu/autolib.py:223 #: tiramisu/autolib.py:209
msgid "cannot redefine option in information" msgid "cannot redefine option in information"
msgstr "" msgstr ""
#: tiramisu/autolib.py:227 #: tiramisu/autolib.py:213
msgid "option in ParamInformation cannot be a symlinkoption" msgid "option in ParamInformation cannot be a symlinkoption"
msgstr "" msgstr ""
#: tiramisu/autolib.py:230 #: tiramisu/autolib.py:216
msgid "option in ParamInformation cannot be a follower" msgid "option in ParamInformation cannot be a follower"
msgstr "" msgstr ""
#: tiramisu/autolib.py:233 #: tiramisu/autolib.py:219
msgid "option in ParamInformation cannot be a dynamic option" msgid "option in ParamInformation cannot be a dynamic option"
msgstr "" msgstr ""
#: tiramisu/autolib.py:294 #: tiramisu/autolib.py:280
msgid "first argument ({0}) must be a function" msgid "first argument ({0}) must be a function"
msgstr "" msgstr ""
#: tiramisu/autolib.py:298 #: tiramisu/autolib.py:284
msgid "help_function ({0}) must be a function" msgid "help_function ({0}) must be a function"
msgstr "" msgstr ""
#: tiramisu/autolib.py:469 tiramisu/autolib.py:524 #: tiramisu/autolib.py:455 tiramisu/autolib.py:503
msgid "the option {0} is used in a calculation but is invalid ({1})" msgid "the option {0} is used in a calculation but is invalid ({1})"
msgstr "" msgstr ""
#: tiramisu/autolib.py:482 tiramisu/autolib.py:538 tiramisu/autolib.py:588 #: tiramisu/autolib.py:467 tiramisu/autolib.py:515 tiramisu/autolib.py:554
msgid "unable to get value for calculating {0}, {1}" msgid "unable to get value for calculating {0}, {1}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:517 #: tiramisu/autolib.py:499
msgid "unable to carry out a calculation for {0}, {1}" msgid "unable to carry out a calculation for {0}, {1}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:563 #: tiramisu/autolib.py:535
msgid "cannot find information for {0}, {1} is a dynamic option" msgid "cannot find information for {0}, {1} is a dynamic option"
msgstr "" msgstr ""
#: tiramisu/autolib.py:603 #: tiramisu/autolib.py:564
msgid "option {0} is not a dynoptiondescription or in a dynoptiondescription" msgid "option {0} is not a dynoptiondescription or in a dynoptiondescription"
msgstr "" msgstr ""
#: tiramisu/autolib.py:696 #: tiramisu/autolib.py:650
msgid "cannot calculate arguments for {0}, {1} with identifier \"{2}\", there is no identifiers" msgid "cannot calculate arguments for \"{0}\", cannot find dynamic variable \"{1}\" with identifier \"{2}\", list of valid identifiers: {3}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:708 #: tiramisu/autolib.py:754
msgid "cannot calculate arguments for {0}, {1} with identifier \"{2}\", list of valid identifiers: {3}"
msgstr ""
#: tiramisu/autolib.py:819
msgid "the follower {0} must have index in carry_out_calculation!" msgid "the follower {0} must have index in carry_out_calculation!"
msgstr "" msgstr ""
#: tiramisu/autolib.py:931 #: tiramisu/autolib.py:826
msgid "the \"{}\" function with positional arguments \"{}\" and keyword arguments \"{}\" must not return a list (\"{}\") for the follower option {}"
msgstr ""
#: tiramisu/autolib.py:841
msgid "the \"{}\" function must not return a list (\"{}\") for the follower option {}"
msgstr ""
#: tiramisu/autolib.py:882
msgid "unexpected error \"{1}\" in function \"{2}\" with arguments \"{3}\" and \"{4}\" for option {0}" msgid "unexpected error \"{1}\" in function \"{2}\" with arguments \"{3}\" and \"{4}\" for option {0}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:941 #: tiramisu/autolib.py:891
msgid "unexpected error \"{1}\" in function \"{2}\" for option {0}" msgid "unexpected error \"{1}\" in function \"{2}\" for option {0}"
msgstr "" msgstr ""
#: tiramisu/config.py:574 #: tiramisu/config.py:420
msgid "there is no option description for this config (may be GroupConfig)"
msgstr ""
#: tiramisu/config.py:663
msgid "no option found in config with these criteria"
msgstr ""
#: tiramisu/config.py:978 tiramisu/option/optiondescription.py:74
msgid "option description seems to be part of an other config"
msgstr ""
#: tiramisu/config.py:1140
msgid "parent of {0} not already exists"
msgstr ""
#: tiramisu/config.py:1187
msgid "cannot set leadership object has root optiondescription"
msgstr ""
#: tiramisu/config.py:1190
msgid "cannot set dynoptiondescription object has root optiondescription"
msgstr ""
#: tiramisu/config.py:1242
msgid "config name must be uniq in groupconfig for \"{0}\""
msgstr ""
#: tiramisu/config.py:1453
msgid "unknown config \"{}\""
msgstr ""
#: tiramisu/config.py:1478
msgid "child must be a Config, MixConfig or MetaConfig"
msgstr ""
#: tiramisu/config.py:1513
msgid "force_default, force_default_if_same or force_dont_change_value cannot be set with only_config"
msgstr ""
#: tiramisu/config.py:1523
msgid "force_default and force_dont_change_value cannot be set together"
msgstr ""
#: tiramisu/config.py:1672
msgid "config name must be uniq in groupconfig for {0}"
msgstr ""
#: tiramisu/config.py:1717
msgid "config added has no name, the name is mandatory"
msgstr ""
#: tiramisu/config.py:1722
msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\""
msgstr ""
#: tiramisu/config.py:1740 tiramisu/config.py:1746
msgid "cannot find the config {0}"
msgstr ""
#: tiramisu/config.py:1772
msgid "MetaConfig with optiondescription must have string has child, not {}"
msgstr ""
#: tiramisu/config.py:1784
msgid "child must be a Config or MetaConfig"
msgstr ""
#: tiramisu/config.py:1789
msgid "all config in metaconfig must have the same optiondescription"
msgstr ""
#: tiramisu/config.py:1806
msgid "metaconfig must have the same optiondescription"
msgstr ""
#: tiramisu/error.py:48
msgid "and"
msgstr ""
#: tiramisu/error.py:50
msgid "or"
msgstr ""
#: tiramisu/error.py:72
msgid " {} "
msgstr ""
#: tiramisu/error.py:145
msgid "cannot modify the {0} {1} at index \"{2}\" because {3} is frozen"
msgstr ""
#: tiramisu/error.py:149
msgid "cannot modify the {0} {1} at index \"{2}\" because is frozen"
msgstr ""
#: tiramisu/error.py:154
msgid "cannot modify the {0} {1} because {2} is frozen"
msgstr ""
#: tiramisu/error.py:156
msgid "cannot modify the {0} {1} because is frozen"
msgstr ""
#: tiramisu/error.py:160
msgid "cannot access to {0} {1} at index \"{2}\" because {3} hasn't value"
msgstr ""
#: tiramisu/error.py:164
msgid "{0} {1} at index \"{2}\" is mandatory but hasn't value"
msgstr ""
#: tiramisu/error.py:167
msgid "cannot access to {0} {1} because {2} hasn't value"
msgstr ""
#: tiramisu/error.py:169
msgid "{0} {1} is mandatory but hasn't value"
msgstr ""
#: tiramisu/error.py:173
msgid "cannot access to {0} {1} at index \"{2}\" because {3} has {4} {5}"
msgstr ""
#: tiramisu/error.py:177
msgid "cannot access to {0} {1} at index \"{2}\" because has {3} {4}"
msgstr ""
#: tiramisu/error.py:182
msgid "cannot access to {0} {1} because {2} has {3} {4}"
msgstr ""
#: tiramisu/error.py:184
msgid "cannot access to {0} {1} because has {2} {3}"
msgstr ""
#: tiramisu/error.py:187
msgid "property"
msgstr ""
#: tiramisu/error.py:189
msgid "properties"
msgstr ""
#: tiramisu/error.py:204
msgid "cannot access to \"{0}\" it's a dynamic option"
msgstr ""
#: tiramisu/error.py:205
msgid "\"{0}\" is not an option"
msgstr ""
#: tiramisu/error.py:269
msgid "cannot set \"group_type\" attribute for the Leadership {0}"
msgstr ""
#: tiramisu/error.py:273
msgid "the leader {0} cannot have \"{1}\" property"
msgstr ""
#: tiramisu/error.py:277
msgid "the leader {0} cannot have \"force_default_on_freeze\" or \"force_metaconfig_on_freeze\" property without \"frozen\""
msgstr ""
#: tiramisu/error.py:281
msgid "cannot reduce length of the leader {0}"
msgstr ""
#: tiramisu/error.py:283
msgid "index \"{0}\" is greater than the leadership length \"{1}\" for option {2}" msgid "index \"{0}\" is greater than the leadership length \"{1}\" for option {2}"
msgstr "" msgstr ""
#: tiramisu/error.py:287 #: tiramisu/config.py:580
msgid "there is no option description for this config (may be GroupConfig)"
msgstr ""
#: tiramisu/config.py:669
msgid "no option found in config with these criteria"
msgstr ""
#: tiramisu/config.py:872
msgid "the follower option {0} has greater length ({1}) than the leader length ({2})" msgid "the follower option {0} has greater length ({1}) than the leader length ({2})"
msgstr "" msgstr ""
#: tiramisu/error.py:292 #: tiramisu/config.py:983 tiramisu/option/optiondescription.py:74
msgid "the \"{0}\" function with positional arguments \"{1}\" and keyword arguments \"{2}\" must not return a list (\"{3}\") for the follower option {4}" msgid "option description seems to be part of an other config"
msgstr "" msgstr ""
#: tiramisu/error.py:297 #: tiramisu/config.py:1145
msgid "the \"{0}\" function must not return a list (\"{1}\") for the follower option {2}" msgid "parent of {0} not already exists"
msgstr "" msgstr ""
#: tiramisu/error.py:331 #: tiramisu/config.py:1192
msgid "cannot set leadership object has root optiondescription"
msgstr ""
#: tiramisu/config.py:1195
msgid "cannot set dynoptiondescription object has root optiondescription"
msgstr ""
#: tiramisu/config.py:1247
msgid "config name must be uniq in groupconfig for \"{0}\""
msgstr ""
#: tiramisu/config.py:1458
msgid "unknown config \"{}\""
msgstr ""
#: tiramisu/config.py:1483
msgid "child must be a Config, MixConfig or MetaConfig"
msgstr ""
#: tiramisu/config.py:1518
msgid "force_default, force_default_if_same or force_dont_change_value cannot be set with only_config"
msgstr ""
#: tiramisu/config.py:1528
msgid "force_default and force_dont_change_value cannot be set together"
msgstr ""
#: tiramisu/config.py:1677
msgid "config name must be uniq in groupconfig for {0}"
msgstr ""
#: tiramisu/config.py:1722
msgid "config added has no name, the name is mandatory"
msgstr ""
#: tiramisu/config.py:1727
msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\""
msgstr ""
#: tiramisu/config.py:1745 tiramisu/config.py:1751
msgid "cannot find the config {0}"
msgstr ""
#: tiramisu/config.py:1777
msgid "MetaConfig with optiondescription must have string has child, not {}"
msgstr ""
#: tiramisu/config.py:1789
msgid "child must be a Config or MetaConfig"
msgstr ""
#: tiramisu/config.py:1794
msgid "all config in metaconfig must have the same optiondescription"
msgstr ""
#: tiramisu/config.py:1811
msgid "metaconfig must have the same optiondescription"
msgstr ""
#: tiramisu/error.py:31
msgid "and"
msgstr ""
#: tiramisu/error.py:33
msgid "or"
msgstr ""
#: tiramisu/error.py:55
msgid " {} "
msgstr ""
#: tiramisu/error.py:108
msgid "property"
msgstr ""
#: tiramisu/error.py:110
msgid "properties"
msgstr ""
#: tiramisu/error.py:113
msgid "cannot modify the {0} {1} because \"{2}\" has {3} {4}"
msgstr ""
#: tiramisu/error.py:115
msgid "cannot modify the {0} {1} because has {2} {3}"
msgstr ""
#: tiramisu/error.py:118
msgid "cannot access to {0} {1} because \"{2}\" hasn't value"
msgstr ""
#: tiramisu/error.py:120
msgid "{0} {1} is mandatory but hasn't value"
msgstr ""
#: tiramisu/error.py:123
msgid "cannot access to {0} {1} because \"{2}\" has {3} {4}"
msgstr ""
#: tiramisu/error.py:125
msgid "cannot access to {0} {1} because has {2} {3}"
msgstr ""
#: tiramisu/error.py:197
msgid "invalid value" msgid "invalid value"
msgstr "" msgstr ""
#: tiramisu/error.py:341 #: tiramisu/error.py:207
msgid "attention, \"{0}\" could be an invalid {1} for {2}" msgid "attention, \"{0}\" could be an invalid {1} for {2}"
msgstr "" msgstr ""
#: tiramisu/error.py:345 #: tiramisu/error.py:209
msgid "attention, \"{0}\" could be an invalid {1} for {2} at index \"{3}\"" msgid "attention, \"{0}\" could be an invalid {1} for {2} at index \"{3}\""
msgstr "" msgstr ""
#: tiramisu/error.py:366 tiramisu/error.py:377 #: tiramisu/error.py:228 tiramisu/error.py:239
msgid "\"{0}\" is an invalid {1} for {2}" msgid "\"{0}\" is an invalid {1} for {2}"
msgstr "" msgstr ""
#: tiramisu/error.py:368 #: tiramisu/error.py:230
msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\"" msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\""
msgstr "" msgstr ""
@ -572,19 +524,19 @@ msgstr ""
msgid "invalid length (max 255)" msgid "invalid length (max 255)"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:179 #: tiramisu/option/domainnameoption.py:180
msgid "DNS resolution failed" msgid "DNS resolution failed"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:182 #: tiramisu/option/domainnameoption.py:184
msgid "error resolving DNS: {1}" msgid "error resolving DNS: {1}"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:189 #: tiramisu/option/domainnameoption.py:191
msgid "must not be an IP" msgid "must not be an IP"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:212 #: tiramisu/option/domainnameoption.py:214
msgid "some characters are uppercase" msgid "some characters are uppercase"
msgstr "" msgstr ""
@ -608,15 +560,15 @@ msgstr ""
msgid "must starts with \"/\"" msgid "must starts with \"/\""
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:78 #: tiramisu/option/filenameoption.py:77
msgid "directory" msgid "directory"
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:78 #: tiramisu/option/filenameoption.py:77
msgid "file" msgid "file"
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:82 #: tiramisu/option/filenameoption.py:79
msgid "cannot find this {0}" msgid "cannot find this {0}"
msgstr "" msgstr ""
@ -668,23 +620,31 @@ msgstr ""
msgid "must be private IP" msgid "must be private IP"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:65 #: tiramisu/option/leadership.py:55
msgid "cannot set \"group_type\" attribute for a Leadership"
msgstr ""
#: tiramisu/option/leadership.py:67
msgid "a leader and a follower are mandatories in leadership \"{}\"" msgid "a leader and a follower are mandatories in leadership \"{}\""
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:97 #: tiramisu/option/leadership.py:89
msgid "leader cannot have \"{}\" property"
msgstr ""
#: tiramisu/option/leadership.py:101
msgid "leadership {0} shall not have a symlinkoption" msgid "leadership {0} shall not have a symlinkoption"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:104 #: tiramisu/option/leadership.py:108
msgid "leadership {0} shall not have a subgroup" msgid "leadership {0} shall not have a subgroup"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:110 #: tiramisu/option/leadership.py:114
msgid "only multi option are allowed in leadership {0} but option {1} is not a multi" msgid "only multi option are allowed in leadership {0} but option {1} is not a multi"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:137 #: tiramisu/option/leadership.py:141
msgid "not allowed default value for follower option {0} in leadership {1}" msgid "not allowed default value for follower option {0} in leadership {1}"
msgstr "" msgstr ""
@ -728,19 +688,19 @@ msgstr ""
msgid "invalid default_multi value \"{0}\" for option {1}, must be a list for a submulti" msgid "invalid default_multi value \"{0}\" for option {1}, must be a list for a submulti"
msgstr "" msgstr ""
#: tiramisu/option/option.py:294 #: tiramisu/option/option.py:291
msgid "the value \"{}\" is not unique" msgid "the value \"{}\" is not unique"
msgstr "" msgstr ""
#: tiramisu/option/option.py:356 #: tiramisu/option/option.py:353
msgid "which must not be a list" msgid "which must not be a list"
msgstr "" msgstr ""
#: tiramisu/option/option.py:408 tiramisu/option/option.py:434 #: tiramisu/option/option.py:405 tiramisu/option/option.py:431
msgid "which must be a list" msgid "which must be a list"
msgstr "" msgstr ""
#: tiramisu/option/option.py:428 #: tiramisu/option/option.py:425
msgid "which \"{}\" must be a list of list" msgid "which \"{}\" must be a list of list"
msgstr "" msgstr ""
@ -748,23 +708,31 @@ msgstr ""
msgid "duplicate option: {0}" msgid "duplicate option: {0}"
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:336 #: tiramisu/option/optiondescription.py:249
msgid "cannot access to \"{0}\" it's a dynamic option"
msgstr ""
#: tiramisu/option/optiondescription.py:286
msgid "cannot find \"{0}\" in \"{1}\""
msgstr ""
#: tiramisu/option/optiondescription.py:342
msgid "children in optiondescription \"{}\" must be a list" msgid "children in optiondescription \"{}\" must be a list"
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:364 #: tiramisu/option/optiondescription.py:370
msgid "duplicate option name: \"{0}\"" msgid "duplicate option name: \"{0}\""
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:370 #: tiramisu/option/optiondescription.py:376
msgid "the option's name \"{0}\" start as the dynoptiondescription's name \"{1}\"" msgid "the option's name \"{0}\" start as the dynoptiondescription's name \"{1}\""
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:413 #: tiramisu/option/optiondescription.py:419
msgid "cannot change group_type if already set (old {0}, new {1})" msgid "cannot change group_type if already set (old {0}, new {1})"
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:418 #: tiramisu/option/optiondescription.py:424
msgid "group_type: {0} not allowed" msgid "group_type: {0} not allowed"
msgstr "" msgstr ""
@ -865,19 +833,31 @@ msgstr ""
msgid "invalid property type {type(new_prop)} for {subconfig.option.impl_getname()} with {prop.function.__name__} function" msgid "invalid property type {type(new_prop)} for {subconfig.option.impl_getname()} with {prop.function.__name__} function"
msgstr "" msgstr ""
#: tiramisu/setting.py:606 #: tiramisu/setting.py:479
msgid "leader cannot have \"{new_prop}\" property"
msgstr ""
#: tiramisu/setting.py:567
msgid "leader cannot have \"{0}\" property"
msgstr ""
#: tiramisu/setting.py:576
msgid "a leader ({0}) cannot have \"force_default_on_freeze\" or \"force_metaconfig_on_freeze\" property without \"frozen\""
msgstr ""
#: tiramisu/setting.py:610
msgid "permissive must be a frozenset" msgid "permissive must be a frozenset"
msgstr "" msgstr ""
#: tiramisu/setting.py:616 #: tiramisu/setting.py:620
msgid "cannot add those permissives: {0}" msgid "cannot add those permissives: {0}"
msgstr "" msgstr ""
#: tiramisu/setting.py:653 #: tiramisu/setting.py:657
msgid "can't reset properties to the symlinkoption \"{}\"" msgid "can't reset properties to the symlinkoption \"{}\""
msgstr "" msgstr ""
#: tiramisu/setting.py:666 #: tiramisu/setting.py:670
msgid "can't reset permissives to the symlinkoption \"{}\"" msgid "can't reset permissives to the symlinkoption \"{}\""
msgstr "" msgstr ""
@ -905,19 +885,19 @@ msgstr ""
msgid "unknown action {}" msgid "unknown action {}"
msgstr "" msgstr ""
#: tiramisu/value.py:570 tiramisu/value.py:872 #: tiramisu/value.py:566 tiramisu/value.py:863
msgid "set owner \"{0}\" is forbidden" msgid "set owner \"{0}\" is forbidden"
msgstr "" msgstr ""
#: tiramisu/value.py:577 #: tiramisu/value.py:573
msgid "\"{0}\" is a default value, so we cannot change owner to \"{1}\"" msgid "\"{0}\" is a default value, so we cannot change owner to \"{1}\""
msgstr "" msgstr ""
#: tiramisu/value.py:751 #: tiramisu/value.py:742
msgid "index {index} is greater than the length {length} for option {subconfig.option.impl_get_display_name(with_quote=True)}" msgid "index {index} is greater than the length {length} for option {subconfig.option.impl_get_display_name(with_quote=True)}"
msgstr "" msgstr ""
#: tiramisu/value.py:858 #: tiramisu/value.py:849
msgid "information's item not found \"{}\"" msgid "information's item not found \"{}\""
msgstr "" msgstr ""

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "tiramisu" name = "tiramisu"
version = "5.2.0a9" version = "5.2.0a8"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "an options controller tool" description = "an options controller tool"

View file

@ -788,19 +788,6 @@ def test_values_with_leader_and_followers_leader_pop():
# assert not list_sessions() # assert not list_sessions()
def test_values_with_leader_and_followers_leader_pop_default_value():
ip_admin_eth0 = StrOption('ip_admin_eth0', "ip réseau autorisé", default=["192.168.230.145", "192.168.230.146"], multi=True, properties=('notunique',))
netmask_admin_eth0 = StrOption('netmask_admin_eth0', "masque du sous-réseau", default_multi="255.255.255.0", multi=True)
interface1 = Leadership('ip_admin_eth0', '', [ip_admin_eth0, netmask_admin_eth0])
od1 = OptionDescription('toto', '', [interface1])
cfg = Config(od1)
cfg.property.read_write()
cfg.option('ip_admin_eth0.ip_admin_eth0').value.pop(0)
compare(cfg.value.exportation(), {'ip_admin_eth0.ip_admin_eth0': {None: [['192.168.230.146'], 'user']}})
assert cfg.option('ip_admin_eth0.ip_admin_eth0').value.get() == ["192.168.230.146"]
assert cfg.option('ip_admin_eth0.netmask_admin_eth0', 0).value.get() == '255.255.255.0'
def test_follower_unique(): def test_follower_unique():
ip_admin_eth0 = StrOption('ip_admin_eth0', "ip réseau autorisé", multi=True) ip_admin_eth0 = StrOption('ip_admin_eth0', "ip réseau autorisé", multi=True)
netmask_admin_eth0 = StrOption('netmask_admin_eth0', "masque du sous-réseau", multi=True, properties=('unique',)) netmask_admin_eth0 = StrOption('netmask_admin_eth0', "masque du sous-réseau", multi=True, properties=('unique',))

View file

@ -945,7 +945,7 @@ def test_consistency_leader_and_followers_leader_mandatory_transitive():
try: try:
cfg.option('val1.val2', 0).value.get() cfg.option('val1.val2', 0).value.get()
except PropertiesOptionError as error: except PropertiesOptionError as error:
assert str(error) == str(_('cannot access to {0} {1} at index "{2}" because has {3} {4}').format('option', '"val2"', 0, _('property'), '"disabled"')) assert str(error) == str(_('cannot access to {0} {1} because has {2} {3}').format('option', '"val2"', _('property'), '"disabled"'))
else: else:
raise Exception('must raises') raise Exception('must raises')
assert list(cfg.value.mandatory()) == [] assert list(cfg.value.mandatory()) == []

View file

@ -1 +1 @@
__version__ = "5.2.0a9" __version__ = "5.2.0a8"

View file

@ -271,18 +271,9 @@ class _TiramisuOptionWalk:
class _TiramisuOptionOptionDescription: class _TiramisuOptionOptionDescription:
"""Manage option""" """Manage option"""
_validate_properties = False _validate_properties = False
@option_type( @option_type(["optiondescription", "option", "with_or_without_index", "symlink", "allow_dynoption"])
[
"optiondescription",
"option",
"with_or_without_index",
"symlink",
"allow_dynoption",
]
)
def get(self): def get(self):
"""Get Tiramisu option""" """Get Tiramisu option"""
return self._subconfig.option return self._subconfig.option
@ -300,14 +291,11 @@ class _TiramisuOptionOptionDescription:
@option_type(["optiondescription", "option", "with_or_without_index", "symlink"]) @option_type(["optiondescription", "option", "with_or_without_index", "symlink"])
def description( def description(
self, self,
with_quote: bool = False,
uncalculated: bool = False, uncalculated: bool = False,
): ):
"""Get option description""" """Get option description"""
if not uncalculated: if not uncalculated:
return self._subconfig.option.impl_get_display_name( return self._subconfig.option.impl_get_display_name(self._subconfig)
self._subconfig, with_quote=with_quote
)
return self._subconfig.option._get_information( return self._subconfig.option._get_information(
self._subconfig, self._subconfig,
"doc", "doc",
@ -366,7 +354,7 @@ class _TiramisuOptionOptionDescription:
if option.impl_is_optiondescription(): if option.impl_is_optiondescription():
return "optiondescription" return "optiondescription"
if only_self and option.impl_is_symlinkoption(): if only_self and option.impl_is_symlinkoption():
return "symlink" return 'symlink'
return option.get_type() return option.get_type()
@option_type(["option", "symlink", "with_or_without_index"]) @option_type(["option", "symlink", "with_or_without_index"])
@ -820,7 +808,11 @@ class TiramisuOptionValue(CommonTiramisuOption, _TiramisuODGet):
and option.impl_is_leader() and option.impl_is_leader()
and len(value) < self._subconfig.parent.get_length_leadership() and len(value) < self._subconfig.parent.get_length_leadership()
): ):
raise LeadershipError(self._subconfig, "leadership-reduce") raise LeadershipError(
_("cannot reduce length of the leader {}" "").format(
option.impl_get_display_name(self._subconfig, with_quote=True)
)
)
values = self._config_bag.context.get_values() values = self._config_bag.context.get_values()
return values.set_value(self._subconfig, value) return values.set_value(self._subconfig, value)

View file

@ -22,15 +22,7 @@ from typing import Any, Optional, Union, Callable, Dict, List
from itertools import chain from itertools import chain
import weakref import weakref
from .error import ( from .error import PropertiesOptionError, ConfigError, LeadershipError, ValueWarning, CancelParam, display_list, errors
PropertiesOptionError,
ConfigError,
LeadershipError,
ValueWarning,
CancelParam,
display_list,
errors,
)
from .i18n import _ from .i18n import _
from .setting import undefined, ConfigBag from .setting import undefined, ConfigBag
from .function import FUNCTION_WAITING_FOR_DICT, FUNCTION_WAITING_FOR_ERROR from .function import FUNCTION_WAITING_FOR_DICT, FUNCTION_WAITING_FOR_ERROR
@ -157,15 +149,11 @@ class ParamDynOption(ParamOption):
) )
if not isinstance(identifiers, list): if not isinstance(identifiers, list):
raise Exception( raise Exception(
_("identifiers in ParamDynOption must be a list, not {0}").format( _("identifiers in ParamDynOption must be a list, not {0}").format(identifiers)
identifiers
)
) )
if not isinstance(optional, bool): if not isinstance(optional, bool):
raise Exception( raise Exception(
_("optional in ParamDynOption must be a boolean, not {0}").format( _("optional in ParamDynOption must be a boolean, not {0}").format(optional)
optional
)
) )
self.identifiers = identifiers self.identifiers = identifiers
self.optional = optional self.optional = optional
@ -216,9 +204,7 @@ class ParamInformation(Param):
def set_option(self, option: "Option" = None) -> None: def set_option(self, option: "Option" = None) -> None:
if not hasattr(self, "self_option"): if not hasattr(self, "self_option"):
raise ConfigError( raise ConfigError(_("cannot add option in information after creating config"))
_("cannot add option in information after creating config")
)
if self.option: if self.option:
raise ConfigError(_("cannot redefine option in information")) raise ConfigError(_("cannot redefine option in information"))
if not option.impl_is_optiondescription(): if not option.impl_is_optiondescription():
@ -478,9 +464,7 @@ def manager_callback(
["configerror"], ["configerror"],
config_bag.context.get_settings(), config_bag.context.get_settings(),
) )
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err)
subconfig, _("unable to get value for calculating {0}, {1}"), err
)
return value return value
def get_option_bag( def get_option_bag(
@ -512,12 +496,7 @@ def manager_callback(
# raise PropertiesOptionError (which is catched) because must not add value None in carry_out_calculation # raise PropertiesOptionError (which is catched) because must not add value None in carry_out_calculation
if param.notraisepropertyerror or param.raisepropertyerror: if param.notraisepropertyerror or param.raisepropertyerror:
raise err from err raise err from err
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("unable to carry out a calculation for {0}, {1}"), err, option=option)
subconfig,
_("unable to carry out a calculation for {0}, {1}"),
err,
option=option,
)
except ValueError as err: except ValueError as err:
display_name = option.impl_get_display_name(subconfig, with_quote=True) display_name = option.impl_get_display_name(subconfig, with_quote=True)
raise ValueError( raise ValueError(
@ -533,12 +512,7 @@ def manager_callback(
["configerror"], ["configerror"],
config_bag.context.get_settings(), config_bag.context.get_settings(),
) )
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err, option=option)
subconfig,
_("unable to get value for calculating {0}, {1}"),
err,
option=option,
)
return subsubconfig return subsubconfig
if isinstance(param, ParamValue): if isinstance(param, ParamValue):
@ -558,13 +532,7 @@ def manager_callback(
search_name = search_option.impl_get_display_name( search_name = search_option.impl_get_display_name(
None, with_quote=True None, with_quote=True
) )
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("cannot find information for {0}, {1} is a dynamic option"), None, option=option, extra_keys=[search_name])
subconfig,
_("cannot find information for {0}, {1} is a dynamic option"),
None,
option=option,
extra_keys=[search_name],
)
else: else:
isubconfig = get_option_bag( isubconfig = get_option_bag(
config_bag, config_bag,
@ -583,12 +551,7 @@ def manager_callback(
param.default_value, param.default_value,
) )
except ValueError as err: except ValueError as err:
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err, option=option)
subconfig,
_("unable to get value for calculating {0}, {1}"),
err,
option=option,
)
if isinstance(param, ParamIndex): if isinstance(param, ParamIndex):
return index return index
@ -598,14 +561,7 @@ def manager_callback(
not option.impl_is_optiondescription() not option.impl_is_optiondescription()
or not option.impl_is_dynoptiondescription() or not option.impl_is_dynoptiondescription()
): ):
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("option {0} is not a dynoptiondescription or in a dynoptiondescription"), None, option=option)
subconfig,
_(
"option {0} is not a dynoptiondescription or in a dynoptiondescription"
),
None,
option=option,
)
if subconfig.identifiers is None: if subconfig.identifiers is None:
# if uncalculated # if uncalculated
return return
@ -681,36 +637,18 @@ def manager_callback(
) )
except AttributeError as err: except AttributeError as err:
if parent.path: if parent.path:
child_path = parent.path + "." + name child_path = parent.path + '.' + name
else: else:
child_path = name child_path = name
if param.optional: if param.optional:
raise CancelParam( raise CancelParam(callbk_option.impl_getpath(), child_path)
callbk_option.impl_getpath(), child_path
)
identifiers = doption.get_identifiers(parent) identifiers = doption.get_identifiers(parent)
if not identifiers: if not identifiers:
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _('cannot calculate arguments for {0}, {1} with identifier "{2}", there is no identifiers'), err, extra_keys=[identifier])
subconfig,
_(
'cannot calculate arguments for {0}, {1} with identifier "{2}", there is no identifiers'
),
err,
extra_keys=[identifier],
)
else: else:
identifiers_list = display_list( identifiers_list = display_list(identifiers, add_quote=True)
identifiers, add_quote=True errors.raise_carry_out_calculation_error(subconfig, _('cannot calculate arguments for {0}, {1} with identifier "{2}", list of valid identifiers: {3}'), err, extra_keys=[identifier, identifiers_list])
)
errors.raise_carry_out_calculation_error(
subconfig,
_(
'cannot calculate arguments for {0}, {1} with identifier "{2}", list of valid identifiers: {3}'
),
err,
extra_keys=[identifier, identifiers_list],
)
new_parents.append( new_parents.append(
parent.get_child( parent.get_child(
doption, doption,
@ -814,12 +752,7 @@ def carry_out_calculation(
and option.impl_is_follower() and option.impl_is_follower()
and index is None and index is None
): ):
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, _("the follower {0} must have index in carry_out_calculation!"), None, option=option)
subconfig,
_("the follower {0} must have index in carry_out_calculation!"),
None,
option=option,
)
def fake_items(iterator): def fake_items(iterator):
return ((None, i) for i in iterator) return ((None, i) for i in iterator)
@ -889,13 +822,32 @@ def carry_out_calculation(
and option.impl_is_follower() and option.impl_is_follower()
and not option.impl_is_submulti() and not option.impl_is_submulti()
): ):
if args or kwargs:
raise LeadershipError( raise LeadershipError(
subconfig, _(
"leadership-follower-callback-list", 'the "{}" function with positional arguments "{}" '
callback=callback.__name__, 'and keyword arguments "{}" must not return '
args=args, 'a list ("{}") for the follower option {}'
kwargs=kwargs, ""
ret=ret, ).format(
callback.__name__,
args,
kwargs,
ret,
option.impl_get_display_name(subconfig, with_quote=True),
)
)
else:
raise LeadershipError(
_(
'the "{}" function must not return a list ("{}") '
"for the follower option {}"
""
).format(
callback.__name__,
ret,
option.impl_get_display_name(subconfig, with_quote=True),
)
) )
return ret return ret
@ -932,14 +884,11 @@ def calculate(
'unexpected error "{1}" in function "{2}" with arguments "{3}" and "{4}" ' 'unexpected error "{1}" in function "{2}" with arguments "{3}" and "{4}" '
"for option {0}" "for option {0}"
) )
extra_keys = [ extra_keys = [callback.__name__,
callback.__name__,
args, args,
kwargs, kwargs,
] ]
else: else:
msg = _('unexpected error "{1}" in function "{2}" for option {0}') msg = _('unexpected error "{1}" in function "{2}" for option {0}')
extra_keys = [callback.__name__] extra_keys = [callback.__name__]
errors.raise_carry_out_calculation_error( errors.raise_carry_out_calculation_error(subconfig, msg, error, extra_keys=extra_keys)
subconfig, msg, error, extra_keys=extra_keys
)

View file

@ -417,7 +417,13 @@ class SubConfig:
length = self.get_length_leadership() length = self.get_length_leadership()
if index >= length: if index >= length:
raise LeadershipError( raise LeadershipError(
subsubconfig, "leadership-greater", index=index, length=length _(
'index "{0}" is greater than the leadership length "{1}" for option {2}'
).format(
index,
length,
option.impl_get_display_name(subsubconfig, with_quote=True),
)
) )
return subsubconfig return subsubconfig
@ -863,10 +869,9 @@ class _Config(CCache):
subconfig, with_quote=True subconfig, with_quote=True
) )
raise LeadershipError( raise LeadershipError(
subconfig, _(
"leadership-follower-greater", "the follower option {0} has greater length ({1}) than the leader length ({2})"
index=follower_len, ).format(option_name, follower_len, length)
length=length,
) )
self.get_settings().validate_mandatory( self.get_settings().validate_mandatory(
subconfig, subconfig,

View file

@ -18,23 +18,6 @@
import weakref import weakref
from .i18n import _ from .i18n import _
from typing import Literal, Union
TiramisuErrorCode = Literal[
"option-dynamic",
"option-not-found",
"property-frozen",
"property-error",
"property-mandatory",
"leadership-group_type",
"leadership-wrong_property",
"leadership-force_default_on_freeze",
"leadership-greater",
"leadership-follower-greater",
"leadership-follower-callback-list",
]
def display_list( def display_list(
lst, lst,
@ -86,8 +69,6 @@ class PropertiesOptionError(AttributeError):
orig_opt=None, orig_opt=None,
help_properties=None, help_properties=None,
): ):
if orig_opt:
raise Exception("a la")
if opt_type: if opt_type:
self._opt_type = opt_type self._opt_type = opt_type
self._name = name self._name = name
@ -106,23 +87,10 @@ class PropertiesOptionError(AttributeError):
self.help_properties = help_properties self.help_properties = help_properties
self._settings = settings self._settings = settings
self.msg = None self.msg = None
if not self.help_properties:
self.help_properties = self.proptype
properties = list(self.help_properties)
if properties == ["frozen"]:
self.code = "property-frozen"
elif properties == ["mandatory"]:
self.code = "property-mandatory"
else:
self.code = "property-error"
super().__init__(None) super().__init__(None)
def display_properties(self, force_property=False, add_quote=True): def set_orig_opt(self, opt):
if force_property: self._orig_opt = opt
properties = self.proptype
else:
properties = self.help_properties
return display_list(list(properties), add_quote=add_quote)
def __str__(self): def __str__(self):
# this part is a bit slow, so only execute when display # this part is a bit slow, so only execute when display
@ -130,81 +98,47 @@ class PropertiesOptionError(AttributeError):
return self.msg return self.msg
if self._settings is None: if self._settings is None:
return "error" return "error"
arguments = [self._opt_type] if self.help_properties:
if self._orig_opt: properties = list(self.help_properties)
arguments.append(
self._orig_opt.impl_get_display_name(subconfig, with_quote=True)
)
arguments.append(self._name)
index = self._subconfig.index
if index is not None:
arguments.append(index)
if self.code == "property-frozen":
if index is not None:
if self._orig_opt:
msg = _(
'cannot modify the {0} {1} at index "{2}" because {3} is frozen'
)
else: else:
msg = _( properties = list(self.proptype)
'cannot modify the {0} {1} at index "{2}" because is frozen' only_one = len(properties) == 1
) properties_msg = display_list(properties, add_quote=True)
if only_one:
prop_msg = _("property")
else: else:
prop_msg = _("properties")
if properties == ["frozen"]:
if self._orig_opt: if self._orig_opt:
msg = _("cannot modify the {0} {1} because {2} is frozen") msg = _('cannot modify the {0} {1} because "{2}" has {3} {4}')
else: else:
msg = _("cannot modify the {0} {1} because is frozen") msg = _("cannot modify the {0} {1} because has {2} {3}")
elif self.code == "property-mandatory": elif properties == ["mandatory"]:
if index is not None:
if self._orig_opt: if self._orig_opt:
msg = _( msg = _("cannot access to {0} {1} because \"{2}\" hasn't value")
'cannot access to {0} {1} at index "{2}" because {3} hasn\'t value'
)
else:
msg = _('{0} {1} at index "{2}" is mandatory but hasn\'t value')
else:
if self._orig_opt:
msg = _("cannot access to {0} {1} because {2} hasn't value")
else: else:
msg = _("{0} {1} is mandatory but hasn't value") msg = _("{0} {1} is mandatory but hasn't value")
else: else:
if index is not None:
if self._orig_opt: if self._orig_opt:
msg = _( msg = _('cannot access to {0} {1} because "{2}" has {3} {4}')
'cannot access to {0} {1} at index "{2}" because {3} has {4} {5}'
)
else:
msg = _(
'cannot access to {0} {1} at index "{2}" because has {3} {4}'
)
else:
if self._orig_opt:
msg = _("cannot access to {0} {1} because {2} has {3} {4}")
else: else:
msg = _("cannot access to {0} {1} because has {2} {3}") msg = _("cannot access to {0} {1} because has {2} {3}")
only_one = len(self.help_properties) == 1 if self._orig_opt:
if only_one: # FIXME _orig_opt ?
arguments.append(_("property")) self.msg = msg.format(
self._opt_type,
self._orig_opt.impl_get_display_name(subconfig, with_quote=True),
self._name,
prop_msg,
properties_msg,
)
else: else:
arguments.append(_("properties")) self.msg = msg.format(self._opt_type, self._name, prop_msg, properties_msg)
arguments.append(self.display_properties())
self.msg = msg.format(*arguments)
del self._opt_type, self._name del self._opt_type, self._name
del self._settings, self._orig_opt del self._settings, self._orig_opt
return self.msg return self.msg
class AttributeOptionError(AttributeError):
def __init__(self, path: str, code: TiramisuErrorCode) -> None:
self.path = path
self.code = code
def __str__(self) -> str:
if self.code == "option-dynamic":
return _('cannot access to "{0}" it\'s a dynamic option').format(self.path)
return _('"{0}" is not an option').format(self.path)
# ____________________________________________________________ # ____________________________________________________________
# Exceptions for a Config # Exceptions for a Config
class ConfigError(Exception): class ConfigError(Exception):
@ -229,74 +163,8 @@ class ConflictError(Exception):
# ____________________________________________________________ # ____________________________________________________________
# miscellaneous exceptions # miscellaneous exceptions
class LeadershipError(Exception): class LeadershipError(Exception):
def __init__( "problem with a leadership's value length"
self, pass
subconfig: Union[str, "SubConfig"],
code,
*,
prop=None,
index=None,
length=None,
callback=None,
args=None,
kwargs=None,
ret=None,
):
if isinstance(subconfig, str):
self.path = self.display_name = subconfig
else:
self.path = subconfig.path
option = subconfig.option
self.display_name = option.impl_get_display_name(subconfig, with_quote=True)
self.code = code
if prop:
self.prop = prop
if index:
self.index = index
if length:
self.length = length
if callback:
self.callback = callback
if args:
self.args = args
if kwargs:
self.kwargs = kwargs
if ret:
self.ret = ret
def __str__(self):
if self.code == "leadership-group_type":
return _('cannot set "group_type" attribute for the Leadership {0}').format(
self.display_name
)
if self.code == "leadership-wrong_property":
return _('the leader {0} cannot have "{1}" property').format(
self.display_name, self.prop
)
if self.code == "leadership-force_default_on_freeze":
return _(
'the leader {0} cannot have "force_default_on_freeze" or "force_metaconfig_on_freeze" property without "frozen"'
).format(self.display_name)
if self.code == "leadership-reduce":
return _("cannot reduce length of the leader {0}").format(self.display_name)
if self.code == "leadership-greater":
return _(
'index "{0}" is greater than the leadership length "{1}" for option {2}'
).format(self.index, self.length, self.display_name)
if self.code == "leadership-follower-greater":
return _(
"the follower option {0} has greater length ({1}) than the leader length ({2})"
).format(self.display_name, self.index, self.length)
if self.code == "leadership-follower-callback-list":
if self.args or self.kwargs:
return _(
'the "{0}" function with positional arguments "{1}" and keyword arguments "{2}" must not return a list ("{3}") for the follower option {4}'
).format(
self.callback, self.args, self.kwargs, self.ret, self.display_name
)
return _(
'the "{0}" function must not return a list ("{1}") for the follower option {2}'
).format(self.callback, self.ret, self.display_name)
class ConstError(TypeError): class ConstError(TypeError):
@ -318,9 +186,7 @@ class _CommonError:
try: try:
msg = self.prefix msg = self.prefix
except AttributeError: except AttributeError:
self.prefix = self.tmpl.format( self.prefix = self.tmpl.format(self.val, _(self.display_type), self.name, self.index)
self.val, _(self.display_type), self.name, self.index
)
msg = self.prefix msg = self.prefix
if self.err_msg: if self.err_msg:
if msg: if msg:
@ -337,16 +203,12 @@ class ValueWarning(_CommonError, UserWarning):
def __init__(self, **kwargs): def __init__(self, **kwargs):
if ValueWarning.tmpl is None: if ValueWarning.tmpl is None:
if kwargs.get("index") is None: if kwargs.get('index') is None:
ValueWarning.tmpl = _( ValueWarning.tmpl = _('attention, "{0}" could be an invalid {1} for {2}')
'attention, "{0}" could be an invalid {1} for {2}'
)
else: else:
ValueWarning.tmpl = _( ValueWarning.tmpl = _('attention, "{0}" could be an invalid {1} for {2} at index "{3}"')
'attention, "{0}" could be an invalid {1} for {2} at index "{3}"' if list(kwargs) == ['msg']:
) self.msg = kwargs['msg']
if list(kwargs) == ["msg"]:
self.msg = kwargs["msg"]
else: else:
super().__init__(**kwargs) super().__init__(**kwargs)
self.msg = None self.msg = None
@ -362,7 +224,7 @@ class ValueOptionError(_CommonError, ValueError):
def __init__(self, **kwargs): def __init__(self, **kwargs):
if ValueOptionError.tmpl is None: if ValueOptionError.tmpl is None:
if kwargs.get("index") is None: if kwargs.get('index') is None:
self.tmpl = _('"{0}" is an invalid {1} for {2}') self.tmpl = _('"{0}" is an invalid {1} for {2}')
else: else:
self.tmpl = _('"{0}" is an invalid {1} for {2} at index "{3}"') self.tmpl = _('"{0}" is an invalid {1} for {2} at index "{3}"')
@ -396,12 +258,12 @@ class CancelParam(Exception):
class Errors: class Errors:
@staticmethod @staticmethod
def raise_carry_out_calculation_error( def raise_carry_out_calculation_error(subconfig, message, original_error, option=None, extra_keys=[]):
subconfig, message, original_error, option=None, extra_keys=[]
):
if option is None: if option is None:
option = subconfig.option option = subconfig.option
display_name = option.impl_get_display_name(subconfig, with_quote=True) display_name = option.impl_get_display_name(
subconfig, with_quote=True
)
if original_error: if original_error:
raise ConfigError( raise ConfigError(
message.format(display_name, original_error, *extra_keys) message.format(display_name, original_error, *extra_keys)

View file

@ -176,7 +176,9 @@ class DomainnameOption(StrOption):
try: try:
socket.gethostbyname(value) socket.gethostbyname(value)
except socket.gaierror as err: except socket.gaierror as err:
raise ValueError(_("DNS resolution failed").format(value)) from err raise ValueError(
_("DNS resolution failed").format(value)
) from err
except Exception as err: except Exception as err:
raise ValueError( raise ValueError(
_("error resolving DNS: {1}").format(value, err) _("error resolving DNS: {1}").format(value, err)

View file

@ -74,12 +74,9 @@ class FilenameOption(StrOption):
if not found and "directory" in types and file.is_dir(): if not found and "directory" in types and file.is_dir():
found = True found = True
if not found: if not found:
translated_types = [ translated_types = [{"file": _("file"), "directory": _("directory")}.get(typ) for typ in types]
{"file": _("file"), "directory": _("directory")}.get(typ)
for typ in types
]
raise ValueError( raise ValueError(
_("cannot find this {0}").format( _('cannot find this {0}').format(
display_list(translated_types, separator="or"), value display_list(translated_types, separator="or"), value
) )
) )

View file

@ -43,7 +43,7 @@ class IntOption(Option):
value: int, value: int,
) -> None: ) -> None:
if not isinstance(value, int): if not isinstance(value, int):
raise ValueError(_("which is not an integer")) raise ValueError(_('which is not an integer'))
def second_level_validation(self, value, warnings_only): def second_level_validation(self, value, warnings_only):
min_number = self.impl_get_extra("min_number") min_number = self.impl_get_extra("min_number")

View file

@ -51,7 +51,9 @@ class Leadership(OptionDescription):
**kwargs, **kwargs,
) -> None: ) -> None:
if "group_type" in kwargs: if "group_type" in kwargs:
raise LeadershipError(name, "leadership-group_type") raise LeadershipError(
_('cannot set "group_type" attribute for a Leadership')
)
super().__init__( super().__init__(
name, name,
doc, doc,
@ -83,7 +85,9 @@ class Leadership(OptionDescription):
if prop not in ALLOWED_LEADER_PROPERTIES and not isinstance( if prop not in ALLOWED_LEADER_PROPERTIES and not isinstance(
prop, Calculation prop, Calculation
): ):
raise LeadershipError(name, "leadership-wrong_property", prop=prop) raise LeadershipError(
_('leader cannot have "{}" property').format(prop)
)
def _check_child_is_valid( def _check_child_is_valid(
self, self,

View file

@ -269,11 +269,8 @@ class Option(BaseOption):
config_properties = subconfig.config_bag.properties config_properties = subconfig.config_bag.properties
self_properties = subconfig.properties self_properties = subconfig.properties
else: else:
config_properties = {"validator"} config_properties = {'validator'}
if ( if "validator" not in config_properties or "validator" not in self_properties:
"validator" not in config_properties
or "validator" not in self_properties
):
return False return False
if subconfig: if subconfig:
force_index = subconfig.index force_index = subconfig.index
@ -446,21 +443,11 @@ class Option(BaseOption):
or "demoting_error_warning" not in subconfig.config_bag.properties or "demoting_error_warning" not in subconfig.config_bag.properties
): ):
raise ValueOptionError( raise ValueOptionError(
subconfig=subconfig, subconfig=subconfig, val=val, display_type=_(self.get_type()), opt=self, err_msg=str(err), index=err_index
val=val,
display_type=_(self.get_type()),
opt=self,
err_msg=str(err),
index=err_index,
) from err ) from err
warnings.warn_explicit( warnings.warn_explicit(
ValueErrorWarning( ValueErrorWarning(
subconfig=subconfig, subconfig=subconfig, val=val, display_type=_(self.get_type()), opt=self, err_msg=str(err), index=err_index
val=val,
display_type=_(self.get_type()),
opt=self,
err_msg=str(err),
index=err_index,
), ),
ValueErrorWarning, ValueErrorWarning,
self.__class__.__name__, self.__class__.__name__,

View file

@ -29,7 +29,7 @@ from ..setting import ConfigBag, groups, undefined, owners, Undefined
from .baseoption import BaseOption from .baseoption import BaseOption
# from .syndynoption import SubDynOptionDescription, SynDynOptionDescription # from .syndynoption import SubDynOptionDescription, SynDynOptionDescription
from ..error import ConfigError, ConflictError, AttributeOptionError from ..error import ConfigError, ConflictError
class CacheOptionDescription(BaseOption): class CacheOptionDescription(BaseOption):
@ -242,10 +242,12 @@ class OptionDescriptionWalk(CacheOptionDescription):
] # pylint: disable=no-member ] # pylint: disable=no-member
if option.impl_is_dynoptiondescription() and not allow_dynoption: if option.impl_is_dynoptiondescription() and not allow_dynoption:
if parent.path: if parent.path:
path = parent.path + "." + name path = parent.path + '.' + name
else: else:
path = name path = name
raise AttributeOptionError(path, "option-dynamic") raise AttributeError(
_('cannot access to "{0}" it\'s a dynamic option').format(path)
)
return option return option
def get_child( def get_child(
@ -277,10 +279,14 @@ class OptionDescriptionWalk(CacheOptionDescription):
return child return child
return identifier, child return identifier, child
if parent.path is None: if parent.path is None:
path = name raise AttributeError(
else: _('cannot find "{0}"').format(name)
path = parent.path + "." + name )
raise AttributeOptionError(path, "option-not-found") raise AttributeError(
_('cannot find "{0}" in "{1}"').format(
name, parent.path
)
)
def get_children(self) -> List[BaseOption]: def get_children(self) -> List[BaseOption]:
"""get children""" """get children"""

View file

@ -38,7 +38,7 @@ class StrOption(Option):
) -> None: ) -> None:
"""validation""" """validation"""
if not isinstance(value, str): if not isinstance(value, str):
raise ValueError(_("which is not a string")) raise ValueError(_('which is not a string'))
class RegexpOption(StrOption): class RegexpOption(StrOption):

View file

@ -476,7 +476,7 @@ class Settings:
and new_prop not in ALLOWED_LEADER_PROPERTIES and new_prop not in ALLOWED_LEADER_PROPERTIES
): ):
raise LeadershipError( raise LeadershipError(
subconfig, "leadership-wrong_property", prop=new_prop _('leader cannot have "{new_prop}" property')
) )
props.add(new_prop) props.add(new_prop)
props -= self.getpermissives(subconfig) props -= self.getpermissives(subconfig)
@ -564,15 +564,19 @@ class Settings:
not_allowed_properties = properties - ALLOWED_LEADER_PROPERTIES not_allowed_properties = properties - ALLOWED_LEADER_PROPERTIES
if not_allowed_properties: if not_allowed_properties:
raise LeadershipError( raise LeadershipError(
subconfig, _('leader cannot have "{0}" property').format(
"leadership-wrong_property", display_list(not_allowed_properties)
prop=display_list(not_allowed_properties), )
) )
if ( if (
"force_default_on_freeze" in properties "force_default_on_freeze" in properties
or "force_metaconfig_on_freeze" in properties or "force_metaconfig_on_freeze" in properties
) and "frozen" not in properties: ) and "frozen" not in properties:
raise LeadershipError(subconfig, "leadership-force_default_on_freeze") raise LeadershipError(
_(
'a leader ({0}) cannot have "force_default_on_freeze" or "force_metaconfig_on_freeze" property without "frozen"'
).format(opt.impl_get_display_name())
)
self._properties.setdefault(subconfig.path, {})[subconfig.index] = properties self._properties.setdefault(subconfig.path, {})[subconfig.index] = properties
# values too because of follower values could have a PropertiesOptionError has value # values too because of follower values could have a PropertiesOptionError has value
subconfig.config_bag.context.reset_cache(subconfig) subconfig.config_bag.context.reset_cache(subconfig)

View file

@ -295,9 +295,9 @@ class Values:
owners.forced, owners.forced,
) )
validator = ( validator = (
"validator" in setting_properties "validator" in setting_properties and
and "validator" in self_properties "validator" in self_properties and
and "demoting_error_warning" not in setting_properties "demoting_error_warning" not in setting_properties
) )
if validator and not has_calculation: if validator and not has_calculation:
cache = subconfig.config_bag.context.get_values_cache() cache = subconfig.config_bag.context.get_values_cache()
@ -306,11 +306,7 @@ class Values:
value, value,
validated=validator, validated=validator,
) )
elif ( elif "validator" in setting_properties and "validator" in self_properties and has_calculation:
"validator" in setting_properties
and "validator" in self_properties
and has_calculation
):
cache = subconfig.config_bag.context.get_values_cache() cache = subconfig.config_bag.context.get_values_cache()
cache.delcache(subconfig.path) cache.delcache(subconfig.path)
@ -596,12 +592,7 @@ class Values:
self_properties = subconfig.properties self_properties = subconfig.properties
context = config_bag.context context = config_bag.context
setting_properties = config_bag.properties setting_properties = config_bag.properties
if ( if validate and hasvalue and "validator" in setting_properties and "validator" in self_properties:
validate
and hasvalue
and "validator" in setting_properties
and "validator" in self_properties
):
fake_context = context.gen_fake_context() fake_context = context.gen_fake_context()
fake_config_bag = config_bag.copy() fake_config_bag = config_bag.copy()
fake_config_bag.remove_validation() fake_config_bag.remove_validation()