Compare commits

..

3 commits

21 changed files with 798 additions and 529 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-04-29 23:01+0200\n" "POT-Creation-Date: 2025-05-12 09:04+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:1849 #: tiramisu/api.py:111 tiramisu/api.py:1857
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:848 #: tiramisu/api.py:201 tiramisu/api.py:856
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:434 #: tiramisu/api.py:446
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:520 #: tiramisu/api.py:532
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:595 #: tiramisu/api.py:607
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:622 #: tiramisu/api.py:634
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:626 #: tiramisu/api.py:638
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:631 #: tiramisu/api.py:643
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,161 +86,147 @@ 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:635 #: tiramisu/api.py:647
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:679 tiramisu/option/optiondescription.py:283 #: tiramisu/api.py:691
msgid "cannot find \"{0}\"" msgid "cannot find \"{0}\""
msgstr "ne peut trouver \"{0}\"" msgstr "ne peut trouver \"{0}\""
#: tiramisu/api.py:812 #: tiramisu/api.py:873
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:1029 #: tiramisu/api.py:1037
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:1416 #: tiramisu/api.py:1424
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:1420 tiramisu/api.py:1447 #: tiramisu/api.py:1428 tiramisu/api.py:1455
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:1433 tiramisu/api.py:1457 tiramisu/config.py:1681 #: tiramisu/api.py:1441 tiramisu/api.py:1465 tiramisu/config.py:1676
msgid "unknown type {}" msgid "unknown type {}"
msgstr "type inconnu {}" msgstr "type inconnu {}"
#: tiramisu/api.py:1821 #: tiramisu/api.py:1829
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:81 #: tiramisu/autolib.py:89
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:84 tiramisu/autolib.py:89 #: tiramisu/autolib.py:92 tiramisu/autolib.py:97
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:86 #: tiramisu/autolib.py:94
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:114 #: tiramisu/autolib.py:122
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:120 #: tiramisu/autolib.py:128
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:123 #: tiramisu/autolib.py:131
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:152 #: tiramisu/autolib.py:160
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:156 #: tiramisu/autolib.py:166
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:207 #: tiramisu/autolib.py:220
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:209 #: tiramisu/autolib.py:223
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:213 #: tiramisu/autolib.py:227
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:216 #: tiramisu/autolib.py:230
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:219 #: tiramisu/autolib.py:233
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:280 #: tiramisu/autolib.py:294
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:284 #: tiramisu/autolib.py:298
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:455 tiramisu/autolib.py:503 #: tiramisu/autolib.py:469 tiramisu/autolib.py:524
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:467 tiramisu/autolib.py:515 tiramisu/autolib.py:554 #: tiramisu/autolib.py:482 tiramisu/autolib.py:538 tiramisu/autolib.py:588
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:499 #: tiramisu/autolib.py:517
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:535 #: tiramisu/autolib.py:563
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:564 #: tiramisu/autolib.py:603
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:650 #: tiramisu/autolib.py:696
msgid "" msgid ""
"cannot calculate arguments for \"{0}\", cannot find dynamic variable \"{1}\" " "cannot calculate arguments for {0}, {1} with identifier \"{2}\", there is no "
"with identifier \"{2}\", list of valid identifiers: {3}" "identifiers"
msgstr "" msgstr ""
"impossible de calculer les arguments de \"{0}\", ne peut trouver la variable " "impossible de calculer les arguments de {0}, {1} avec l'identifiant \"{2}\", "
"dynamique \"{1}\" avec l'identifiant \"{2}\", voici la liste des " "il n'y a pas d'identifiants"
"identifiants valables : {3}"
#: tiramisu/autolib.py:754 #: tiramisu/autolib.py:708
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:826 #: tiramisu/autolib.py:931
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}"
@ -248,64 +234,50 @@ 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:891 #: tiramisu/autolib.py:941
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:420 #: tiramisu/config.py:574
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:669 #: tiramisu/config.py:663
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:872 #: tiramisu/config.py:978 tiramisu/option/optiondescription.py:74
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:1145 #: tiramisu/config.py:1140
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:1192 #: tiramisu/config.py:1187
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:1195 #: tiramisu/config.py:1190
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:1247 #: tiramisu/config.py:1242
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:1458 #: tiramisu/config.py:1453
msgid "unknown config \"{}\"" msgid "unknown config \"{}\""
msgstr "config \"{}\" inconnue" msgstr "config \"{}\" inconnue"
#: tiramisu/config.py:1483 #: tiramisu/config.py:1478
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:1518 #: tiramisu/config.py:1513
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"
@ -313,108 +285,194 @@ 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:1528 #: tiramisu/config.py:1523
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:1677 #: tiramisu/config.py:1672
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:1722 #: tiramisu/config.py:1717
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:1727 #: tiramisu/config.py:1722
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:1745 tiramisu/config.py:1751 #: tiramisu/config.py:1740 tiramisu/config.py:1746
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:1777 #: tiramisu/config.py:1772
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:1789 #: tiramisu/config.py:1784
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:1794 #: tiramisu/config.py:1789
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:1811 #: tiramisu/config.py:1806
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:31 #: tiramisu/error.py:48
msgid "and" msgid "and"
msgstr "et" msgstr "et"
#: tiramisu/error.py:33 #: tiramisu/error.py:50
msgid "or" msgid "or"
msgstr "ou" msgstr "ou"
#: tiramisu/error.py:55 #: tiramisu/error.py:72
msgid " {} " msgid " {} "
msgstr " {} " msgstr " {} "
#: tiramisu/error.py:108 #: tiramisu/error.py:145
msgid "property" msgid "cannot modify the {0} {1} at index \"{2}\" because {3} is frozen"
msgstr "de la propriété" msgstr "ne peut modifier {0} {1} à l'index \"{2}\" parce que {3} est frozen"
#: tiramisu/error.py:110 #: tiramisu/error.py:149
msgid "properties" msgid "cannot modify the {0} {1} at index \"{2}\" because is frozen"
msgstr "des propriétés" msgstr "ne peut modifier {0} {1} à l'index \"{2}\" parce que frozen"
#: tiramisu/error.py:113 #: tiramisu/error.py:154
msgid "cannot modify the {0} {1} because \"{2}\" has {3} {4}" msgid "cannot modify the {0} {1} because {2} is frozen"
msgstr "ne peut modifier {0} \"{1}\" parce que \"{2}\" a {3} {4}" msgstr "ne peut modifier {0} {1} parce que {2} est frozen"
#: tiramisu/error.py:115 #: tiramisu/error.py:156
msgid "cannot modify the {0} {1} because has {2} {3}" msgid "cannot modify the {0} {1} because is frozen"
msgstr "ne peut modifier {0} \"{1}\" à cause {2} {3}" msgstr "ne peut modifier {0} {1} parce qu'est frozen"
#: tiramisu/error.py:118 #: tiramisu/error.py:160
msgid "cannot access to {0} {1} because \"{2}\" hasn't value" #, fuzzy
msgstr "ne peut accéder à {0} {1} parce que \"{2}\" n'a pas de valeur" #| 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:120 #: 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" msgid "{0} {1} is mandatory but hasn't value"
msgstr "{0} {1} est obligatoire mais n'a pas de valeur" msgstr "{0} {1} est obligatoire mais n'a pas de valeur"
#: tiramisu/error.py:123 #: tiramisu/error.py:173
msgid "cannot access to {0} {1} because \"{2}\" has {3} {4}" msgid "cannot access to {0} {1} at index \"{2}\" because {3} has {4} {5}"
msgstr "ne peut accéder à {0} {1} parce que \"{2}\" a {3} {4}" msgstr "ne peut accéder à {0} {1} à l'index \"{2}\" parce que {3} a {4} {5}"
#: tiramisu/error.py:125 #: 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}" msgid "cannot access to {0} {1} because has {2} {3}"
msgstr "ne peut accéder à l'{0} {1} à cause {2} {3}" msgstr "ne peut accéder à l'{0} {1} à cause {2} {3}"
#: tiramisu/error.py:197 #: tiramisu/error.py:187
msgid "property"
msgstr "de la propriété"
#: tiramisu/error.py:189
msgid "properties"
msgstr "des propriétés"
#: tiramisu/error.py:204
msgid "cannot access to \"{0}\" it's a dynamic option"
msgstr "ne peut accéder à \"{0}\" c'est une option dynamique"
#: tiramisu/error.py:205
msgid "\"{0}\" is not an option"
msgstr "\"{0}\" n'est pas une option"
#: tiramisu/error.py:269
msgid "cannot set \"group_type\" attribute for the Leadership {0}"
msgstr "ne peut mettre l'attribut \"group_type\" pour la Leadership {0}"
#: tiramisu/error.py:273
msgid "the leader {0} cannot have \"{1}\" property"
msgstr "l'option leader {0} ne peut avoir la propriété \"{1}\""
#: tiramisu/error.py:277
msgid ""
"the leader {0} cannot have \"force_default_on_freeze\" or "
"\"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
msgid "cannot reduce length of the leader {0}"
msgstr "il est impossible de réduire la longueur du leader {0}"
#: tiramisu/error.py:283
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:207 #: tiramisu/error.py:341
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:209 #: tiramisu/error.py:345
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:228 tiramisu/error.py:239 #: tiramisu/error.py:366 tiramisu/error.py:377
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:230 #: tiramisu/error.py:368
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}\""
@ -612,19 +670,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:180 #: tiramisu/option/domainnameoption.py:179
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:184 #: tiramisu/option/domainnameoption.py:182
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:191 #: tiramisu/option/domainnameoption.py:189
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:214 #: tiramisu/option/domainnameoption.py:212
msgid "some characters are uppercase" msgid "some characters are uppercase"
msgstr "des caractères sont en majuscule" msgstr "des caractères sont en majuscule"
@ -655,15 +713,15 @@ msgstr ""
msgid "must starts with \"/\"" msgid "must starts with \"/\""
msgstr "doit débuter par \"/\"" msgstr "doit débuter par \"/\""
#: tiramisu/option/filenameoption.py:77 #: tiramisu/option/filenameoption.py:78
msgid "directory" msgid "directory"
msgstr "répertoire" msgstr "répertoire"
#: tiramisu/option/filenameoption.py:77 #: tiramisu/option/filenameoption.py:78
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: tiramisu/option/filenameoption.py:79 #: tiramisu/option/filenameoption.py:82
msgid "cannot find this {0}" msgid "cannot find this {0}"
msgstr "ce {0} est introuvable" msgstr "ce {0} est introuvable"
@ -715,36 +773,28 @@ 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:55 #: tiramisu/option/leadership.py:65
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:89 #: tiramisu/option/leadership.py:97
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:108 #: tiramisu/option/leadership.py:104
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:114 #: tiramisu/option/leadership.py:110
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:141 #: tiramisu/option/leadership.py:137
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 "
@ -795,19 +845,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:291 #: tiramisu/option/option.py:294
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:353 #: tiramisu/option/option.py:356
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:405 tiramisu/option/option.py:431 #: tiramisu/option/option.py:408 tiramisu/option/option.py:434
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:425 #: tiramisu/option/option.py:428
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"
@ -815,34 +865,26 @@ 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:249 #: tiramisu/option/optiondescription.py:336
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:370 #: tiramisu/option/optiondescription.py:364
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:376 #: tiramisu/option/optiondescription.py:370
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:419 #: tiramisu/option/optiondescription.py:413
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:424 #: tiramisu/option/optiondescription.py:418
msgid "group_type: {0} not allowed" msgid "group_type: {0} not allowed"
msgstr "group_type : {0} non autorisé" msgstr "group_type : {0} non autorisé"
@ -950,35 +992,19 @@ 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:479 #: tiramisu/setting.py:606
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:620 #: tiramisu/setting.py:616
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:657 #: tiramisu/setting.py:653
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:670 #: tiramisu/setting.py:666
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 \"{}\""
@ -1008,17 +1034,17 @@ msgstr ""
msgid "unknown action {}" msgid "unknown action {}"
msgstr "action inconnue {}" msgstr "action inconnue {}"
#: tiramisu/value.py:566 tiramisu/value.py:863 #: tiramisu/value.py:570 tiramisu/value.py:872
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:573 #: tiramisu/value.py:577
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:742 #: tiramisu/value.py:751
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)}"
@ -1026,10 +1052,19 @@ 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:849 #: tiramisu/value.py:858
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-04-29 23:01+0200\n" "POT-Creation-Date: 2025-05-12 09:05+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:1849 #: tiramisu/api.py:111 tiramisu/api.py:1857
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:848 #: tiramisu/api.py:201 tiramisu/api.py:856
msgid "please specify index with a follower option ({0}.{1})" msgid "please specify index with a follower option ({0}.{1})"
msgstr "" msgstr ""
@ -51,315 +51,363 @@ 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:434 #: tiramisu/api.py:446
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:520 #: tiramisu/api.py:532
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:595 #: tiramisu/api.py:607
msgid "cannot add this property: \"{0}\"" msgid "cannot add this property: \"{0}\""
msgstr "" msgstr ""
#: tiramisu/api.py:622 #: tiramisu/api.py:634
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:626 #: tiramisu/api.py:638
msgid "cannot find \"{0}\" in option \"{1}\"" msgid "cannot find \"{0}\" in option \"{1}\""
msgstr "" msgstr ""
#: tiramisu/api.py:631 #: tiramisu/api.py:643
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:635 #: tiramisu/api.py:647
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:679 tiramisu/option/optiondescription.py:283 #: tiramisu/api.py:691
msgid "cannot find \"{0}\"" msgid "cannot find \"{0}\""
msgstr "" msgstr ""
#: tiramisu/api.py:812 #: tiramisu/api.py:873
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:1029 #: tiramisu/api.py:1037
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:1416 #: tiramisu/api.py:1424
msgid "properties must be a frozenset" msgid "properties must be a frozenset"
msgstr "" msgstr ""
#: tiramisu/api.py:1420 tiramisu/api.py:1447 #: tiramisu/api.py:1428 tiramisu/api.py:1455
msgid "unknown when {} (must be in append or remove)" msgid "unknown when {} (must be in append or remove)"
msgstr "" msgstr ""
#: tiramisu/api.py:1433 tiramisu/api.py:1457 tiramisu/config.py:1681 #: tiramisu/api.py:1441 tiramisu/api.py:1465 tiramisu/config.py:1676
msgid "unknown type {}" msgid "unknown type {}"
msgstr "" msgstr ""
#: tiramisu/api.py:1821 #: tiramisu/api.py:1829
msgid "do not use unrestraint, nowarnings or forcepermissive together" msgid "do not use unrestraint, nowarnings or forcepermissive together"
msgstr "" msgstr ""
#: tiramisu/autolib.py:81 #: tiramisu/autolib.py:89
msgid "args in params must be a tuple" msgid "args in params must be a tuple"
msgstr "" msgstr ""
#: tiramisu/autolib.py:84 tiramisu/autolib.py:89 #: tiramisu/autolib.py:92 tiramisu/autolib.py:97
msgid "arg in params must be a Param" msgid "arg in params must be a Param"
msgstr "" msgstr ""
#: tiramisu/autolib.py:86 #: tiramisu/autolib.py:94
msgid "kwargs in params must be a dict" msgid "kwargs in params must be a dict"
msgstr "" msgstr ""
#: tiramisu/autolib.py:114 #: tiramisu/autolib.py:122
msgid "paramoption needs an option not {}" msgid "paramoption needs an option not {}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:120 #: tiramisu/autolib.py:128
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:123 #: tiramisu/autolib.py:131
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:152 #: tiramisu/autolib.py:160
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:156 #: tiramisu/autolib.py:166
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:207 #: tiramisu/autolib.py:220
msgid "cannot add option in information after creating config" msgid "cannot add option in information after creating config"
msgstr "" msgstr ""
#: tiramisu/autolib.py:209 #: tiramisu/autolib.py:223
msgid "cannot redefine option in information" msgid "cannot redefine option in information"
msgstr "" msgstr ""
#: tiramisu/autolib.py:213 #: tiramisu/autolib.py:227
msgid "option in ParamInformation cannot be a symlinkoption" msgid "option in ParamInformation cannot be a symlinkoption"
msgstr "" msgstr ""
#: tiramisu/autolib.py:216 #: tiramisu/autolib.py:230
msgid "option in ParamInformation cannot be a follower" msgid "option in ParamInformation cannot be a follower"
msgstr "" msgstr ""
#: tiramisu/autolib.py:219 #: tiramisu/autolib.py:233
msgid "option in ParamInformation cannot be a dynamic option" msgid "option in ParamInformation cannot be a dynamic option"
msgstr "" msgstr ""
#: tiramisu/autolib.py:280 #: tiramisu/autolib.py:294
msgid "first argument ({0}) must be a function" msgid "first argument ({0}) must be a function"
msgstr "" msgstr ""
#: tiramisu/autolib.py:284 #: tiramisu/autolib.py:298
msgid "help_function ({0}) must be a function" msgid "help_function ({0}) must be a function"
msgstr "" msgstr ""
#: tiramisu/autolib.py:455 tiramisu/autolib.py:503 #: tiramisu/autolib.py:469 tiramisu/autolib.py:524
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:467 tiramisu/autolib.py:515 tiramisu/autolib.py:554 #: tiramisu/autolib.py:482 tiramisu/autolib.py:538 tiramisu/autolib.py:588
msgid "unable to get value for calculating {0}, {1}" msgid "unable to get value for calculating {0}, {1}"
msgstr "" msgstr ""
#: tiramisu/autolib.py:499 #: tiramisu/autolib.py:517
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:535 #: tiramisu/autolib.py:563
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:564 #: tiramisu/autolib.py:603
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:650 #: tiramisu/autolib.py:696
msgid "cannot calculate arguments for \"{0}\", cannot find dynamic variable \"{1}\" with identifier \"{2}\", list of valid identifiers: {3}" msgid "cannot calculate arguments for {0}, {1} with identifier \"{2}\", there is no identifiers"
msgstr "" msgstr ""
#: tiramisu/autolib.py:754 #: tiramisu/autolib.py:708
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:826 #: tiramisu/autolib.py:931
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:891 #: tiramisu/autolib.py:941
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:420 #: tiramisu/config.py:574
msgid "index \"{0}\" is greater than the leadership length \"{1}\" for option {2}"
msgstr ""
#: 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 ""
#: tiramisu/config.py:669 #: tiramisu/config.py:663
msgid "no option found in config with these criteria" msgid "no option found in config with these criteria"
msgstr "" msgstr ""
#: tiramisu/config.py:872 #: tiramisu/config.py:978 tiramisu/option/optiondescription.py:74
msgid "the follower option {0} has greater length ({1}) than the leader length ({2})"
msgstr ""
#: 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 "" msgstr ""
#: tiramisu/config.py:1145 #: tiramisu/config.py:1140
msgid "parent of {0} not already exists" msgid "parent of {0} not already exists"
msgstr "" msgstr ""
#: tiramisu/config.py:1192 #: tiramisu/config.py:1187
msgid "cannot set leadership object has root optiondescription" msgid "cannot set leadership object has root optiondescription"
msgstr "" msgstr ""
#: tiramisu/config.py:1195 #: tiramisu/config.py:1190
msgid "cannot set dynoptiondescription object has root optiondescription" msgid "cannot set dynoptiondescription object has root optiondescription"
msgstr "" msgstr ""
#: tiramisu/config.py:1247 #: tiramisu/config.py:1242
msgid "config name must be uniq in groupconfig for \"{0}\"" msgid "config name must be uniq in groupconfig for \"{0}\""
msgstr "" msgstr ""
#: tiramisu/config.py:1458 #: tiramisu/config.py:1453
msgid "unknown config \"{}\"" msgid "unknown config \"{}\""
msgstr "" msgstr ""
#: tiramisu/config.py:1483 #: tiramisu/config.py:1478
msgid "child must be a Config, MixConfig or MetaConfig" msgid "child must be a Config, MixConfig or MetaConfig"
msgstr "" msgstr ""
#: tiramisu/config.py:1518 #: tiramisu/config.py:1513
msgid "force_default, force_default_if_same or force_dont_change_value cannot be set with only_config" msgid "force_default, force_default_if_same or force_dont_change_value cannot be set with only_config"
msgstr "" msgstr ""
#: tiramisu/config.py:1528 #: tiramisu/config.py:1523
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 ""
#: tiramisu/config.py:1677 #: tiramisu/config.py:1672
msgid "config name must be uniq in groupconfig for {0}" msgid "config name must be uniq in groupconfig for {0}"
msgstr "" msgstr ""
#: tiramisu/config.py:1722 #: tiramisu/config.py:1717
msgid "config added has no name, the name is mandatory" msgid "config added has no name, the name is mandatory"
msgstr "" msgstr ""
#: tiramisu/config.py:1727 #: tiramisu/config.py:1722
msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\"" msgid "config name \"{0}\" is not uniq in groupconfig \"{1}\""
msgstr "" msgstr ""
#: tiramisu/config.py:1745 tiramisu/config.py:1751 #: tiramisu/config.py:1740 tiramisu/config.py:1746
msgid "cannot find the config {0}" msgid "cannot find the config {0}"
msgstr "" msgstr ""
#: tiramisu/config.py:1777 #: tiramisu/config.py:1772
msgid "MetaConfig with optiondescription must have string has child, not {}" msgid "MetaConfig with optiondescription must have string has child, not {}"
msgstr "" msgstr ""
#: tiramisu/config.py:1789 #: tiramisu/config.py:1784
msgid "child must be a Config or MetaConfig" msgid "child must be a Config or MetaConfig"
msgstr "" msgstr ""
#: tiramisu/config.py:1794 #: tiramisu/config.py:1789
msgid "all config in metaconfig must have the same optiondescription" msgid "all config in metaconfig must have the same optiondescription"
msgstr "" msgstr ""
#: tiramisu/config.py:1811 #: tiramisu/config.py:1806
msgid "metaconfig must have the same optiondescription" msgid "metaconfig must have the same optiondescription"
msgstr "" msgstr ""
#: tiramisu/error.py:31 #: tiramisu/error.py:48
msgid "and" msgid "and"
msgstr "" msgstr ""
#: tiramisu/error.py:33 #: tiramisu/error.py:50
msgid "or" msgid "or"
msgstr "" msgstr ""
#: tiramisu/error.py:55 #: tiramisu/error.py:72
msgid " {} " msgid " {} "
msgstr "" msgstr ""
#: tiramisu/error.py:108 #: tiramisu/error.py:145
msgid "property" msgid "cannot modify the {0} {1} at index \"{2}\" because {3} is frozen"
msgstr "" msgstr ""
#: tiramisu/error.py:110 #: tiramisu/error.py:149
msgid "properties" msgid "cannot modify the {0} {1} at index \"{2}\" because is frozen"
msgstr "" msgstr ""
#: tiramisu/error.py:113 #: tiramisu/error.py:154
msgid "cannot modify the {0} {1} because \"{2}\" has {3} {4}" msgid "cannot modify the {0} {1} because {2} is frozen"
msgstr "" msgstr ""
#: tiramisu/error.py:115 #: tiramisu/error.py:156
msgid "cannot modify the {0} {1} because has {2} {3}" msgid "cannot modify the {0} {1} because is frozen"
msgstr "" msgstr ""
#: tiramisu/error.py:118 #: tiramisu/error.py:160
msgid "cannot access to {0} {1} because \"{2}\" hasn't value" msgid "cannot access to {0} {1} at index \"{2}\" because {3} hasn't value"
msgstr "" msgstr ""
#: tiramisu/error.py:120 #: 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" msgid "{0} {1} is mandatory but hasn't value"
msgstr "" msgstr ""
#: tiramisu/error.py:123 #: tiramisu/error.py:173
msgid "cannot access to {0} {1} because \"{2}\" has {3} {4}" msgid "cannot access to {0} {1} at index \"{2}\" because {3} has {4} {5}"
msgstr "" msgstr ""
#: tiramisu/error.py:125 #: 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}" msgid "cannot access to {0} {1} because has {2} {3}"
msgstr "" msgstr ""
#: tiramisu/error.py:197 #: 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}"
msgstr ""
#: tiramisu/error.py:287
msgid "the follower option {0} has greater length ({1}) than the leader length ({2})"
msgstr ""
#: 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 ""
#: tiramisu/error.py:297
msgid "the \"{0}\" function must not return a list (\"{1}\") for the follower option {2}"
msgstr ""
#: tiramisu/error.py:331
msgid "invalid value" msgid "invalid value"
msgstr "" msgstr ""
#: tiramisu/error.py:207 #: tiramisu/error.py:341
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:209 #: tiramisu/error.py:345
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:228 tiramisu/error.py:239 #: tiramisu/error.py:366 tiramisu/error.py:377
msgid "\"{0}\" is an invalid {1} for {2}" msgid "\"{0}\" is an invalid {1} for {2}"
msgstr "" msgstr ""
#: tiramisu/error.py:230 #: tiramisu/error.py:368
msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\"" msgid "\"{0}\" is an invalid {1} for {2} at index \"{3}\""
msgstr "" msgstr ""
@ -524,19 +572,19 @@ msgstr ""
msgid "invalid length (max 255)" msgid "invalid length (max 255)"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:180 #: tiramisu/option/domainnameoption.py:179
msgid "DNS resolution failed" msgid "DNS resolution failed"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:184 #: tiramisu/option/domainnameoption.py:182
msgid "error resolving DNS: {1}" msgid "error resolving DNS: {1}"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:191 #: tiramisu/option/domainnameoption.py:189
msgid "must not be an IP" msgid "must not be an IP"
msgstr "" msgstr ""
#: tiramisu/option/domainnameoption.py:214 #: tiramisu/option/domainnameoption.py:212
msgid "some characters are uppercase" msgid "some characters are uppercase"
msgstr "" msgstr ""
@ -560,15 +608,15 @@ msgstr ""
msgid "must starts with \"/\"" msgid "must starts with \"/\""
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:77 #: tiramisu/option/filenameoption.py:78
msgid "directory" msgid "directory"
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:77 #: tiramisu/option/filenameoption.py:78
msgid "file" msgid "file"
msgstr "" msgstr ""
#: tiramisu/option/filenameoption.py:79 #: tiramisu/option/filenameoption.py:82
msgid "cannot find this {0}" msgid "cannot find this {0}"
msgstr "" msgstr ""
@ -620,31 +668,23 @@ msgstr ""
msgid "must be private IP" msgid "must be private IP"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:55 #: tiramisu/option/leadership.py:65
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:89 #: tiramisu/option/leadership.py:97
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:108 #: tiramisu/option/leadership.py:104
msgid "leadership {0} shall not have a subgroup" msgid "leadership {0} shall not have a subgroup"
msgstr "" msgstr ""
#: tiramisu/option/leadership.py:114 #: tiramisu/option/leadership.py:110
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:141 #: tiramisu/option/leadership.py:137
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 ""
@ -688,19 +728,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:291 #: tiramisu/option/option.py:294
msgid "the value \"{}\" is not unique" msgid "the value \"{}\" is not unique"
msgstr "" msgstr ""
#: tiramisu/option/option.py:353 #: tiramisu/option/option.py:356
msgid "which must not be a list" msgid "which must not be a list"
msgstr "" msgstr ""
#: tiramisu/option/option.py:405 tiramisu/option/option.py:431 #: tiramisu/option/option.py:408 tiramisu/option/option.py:434
msgid "which must be a list" msgid "which must be a list"
msgstr "" msgstr ""
#: tiramisu/option/option.py:425 #: tiramisu/option/option.py:428
msgid "which \"{}\" must be a list of list" msgid "which \"{}\" must be a list of list"
msgstr "" msgstr ""
@ -708,31 +748,23 @@ msgstr ""
msgid "duplicate option: {0}" msgid "duplicate option: {0}"
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:249 #: tiramisu/option/optiondescription.py:336
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:370 #: tiramisu/option/optiondescription.py:364
msgid "duplicate option name: \"{0}\"" msgid "duplicate option name: \"{0}\""
msgstr "" msgstr ""
#: tiramisu/option/optiondescription.py:376 #: tiramisu/option/optiondescription.py:370
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:419 #: tiramisu/option/optiondescription.py:413
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:424 #: tiramisu/option/optiondescription.py:418
msgid "group_type: {0} not allowed" msgid "group_type: {0} not allowed"
msgstr "" msgstr ""
@ -833,31 +865,19 @@ 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:479 #: tiramisu/setting.py:606
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:620 #: tiramisu/setting.py:616
msgid "cannot add those permissives: {0}" msgid "cannot add those permissives: {0}"
msgstr "" msgstr ""
#: tiramisu/setting.py:657 #: tiramisu/setting.py:653
msgid "can't reset properties to the symlinkoption \"{}\"" msgid "can't reset properties to the symlinkoption \"{}\""
msgstr "" msgstr ""
#: tiramisu/setting.py:670 #: tiramisu/setting.py:666
msgid "can't reset permissives to the symlinkoption \"{}\"" msgid "can't reset permissives to the symlinkoption \"{}\""
msgstr "" msgstr ""
@ -885,19 +905,19 @@ msgstr ""
msgid "unknown action {}" msgid "unknown action {}"
msgstr "" msgstr ""
#: tiramisu/value.py:566 tiramisu/value.py:863 #: tiramisu/value.py:570 tiramisu/value.py:872
msgid "set owner \"{0}\" is forbidden" msgid "set owner \"{0}\" is forbidden"
msgstr "" msgstr ""
#: tiramisu/value.py:573 #: tiramisu/value.py:577
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:742 #: tiramisu/value.py:751
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:849 #: tiramisu/value.py:858
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.0a8" version = "5.2.0a9"
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,6 +788,19 @@ 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} because has {2} {3}').format('option', '"val2"', _('property'), '"disabled"')) assert str(error) == str(_('cannot access to {0} {1} at index "{2}" because has {3} {4}').format('option', '"val2"', 0, _('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.0a8" __version__ = "5.2.0a9"

View file

@ -271,9 +271,18 @@ class _TiramisuOptionWalk:
class _TiramisuOptionOptionDescription: class _TiramisuOptionOptionDescription:
"""Manage option""" """Manage option"""
_validate_properties = False _validate_properties = False
@option_type(["optiondescription", "option", "with_or_without_index", "symlink", "allow_dynoption"]) @option_type(
[
"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
@ -291,11 +300,14 @@ 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(self._subconfig) return self._subconfig.option.impl_get_display_name(
self._subconfig, with_quote=with_quote
)
return self._subconfig.option._get_information( return self._subconfig.option._get_information(
self._subconfig, self._subconfig,
"doc", "doc",
@ -354,7 +366,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"])
@ -808,11 +820,7 @@ 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( raise LeadershipError(self._subconfig, "leadership-reduce")
_("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,7 +22,15 @@ from typing import Any, Optional, Union, Callable, Dict, List
from itertools import chain from itertools import chain
import weakref import weakref
from .error import PropertiesOptionError, ConfigError, LeadershipError, ValueWarning, CancelParam, display_list, errors from .error import (
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
@ -149,11 +157,15 @@ 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) _("identifiers in ParamDynOption must be a list, not {0}").format(
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) _("optional in ParamDynOption must be a boolean, not {0}").format(
optional
)
) )
self.identifiers = identifiers self.identifiers = identifiers
self.optional = optional self.optional = optional
@ -204,7 +216,9 @@ 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(_("cannot add option in information after creating config")) raise ConfigError(
_("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():
@ -464,7 +478,9 @@ def manager_callback(
["configerror"], ["configerror"],
config_bag.context.get_settings(), config_bag.context.get_settings(),
) )
errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err) errors.raise_carry_out_calculation_error(
subconfig, _("unable to get value for calculating {0}, {1}"), err
)
return value return value
def get_option_bag( def get_option_bag(
@ -496,7 +512,12 @@ 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(subconfig, _("unable to carry out a calculation for {0}, {1}"), err, option=option) errors.raise_carry_out_calculation_error(
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(
@ -512,7 +533,12 @@ def manager_callback(
["configerror"], ["configerror"],
config_bag.context.get_settings(), config_bag.context.get_settings(),
) )
errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err, option=option) errors.raise_carry_out_calculation_error(
subconfig,
_("unable to get value for calculating {0}, {1}"),
err,
option=option,
)
return subsubconfig return subsubconfig
if isinstance(param, ParamValue): if isinstance(param, ParamValue):
@ -532,7 +558,13 @@ 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(subconfig, _("cannot find information for {0}, {1} is a dynamic option"), None, option=option, extra_keys=[search_name]) errors.raise_carry_out_calculation_error(
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,
@ -551,7 +583,12 @@ def manager_callback(
param.default_value, param.default_value,
) )
except ValueError as err: except ValueError as err:
errors.raise_carry_out_calculation_error(subconfig, _("unable to get value for calculating {0}, {1}"), err, option=option) errors.raise_carry_out_calculation_error(
subconfig,
_("unable to get value for calculating {0}, {1}"),
err,
option=option,
)
if isinstance(param, ParamIndex): if isinstance(param, ParamIndex):
return index return index
@ -561,7 +598,14 @@ 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(subconfig, _("option {0} is not a dynoptiondescription or in a dynoptiondescription"), None, option=option) errors.raise_carry_out_calculation_error(
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
@ -637,18 +681,36 @@ 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(callbk_option.impl_getpath(), child_path) raise CancelParam(
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(subconfig, _('cannot calculate arguments for {0}, {1} with identifier "{2}", there is no identifiers'), err, extra_keys=[identifier]) errors.raise_carry_out_calculation_error(
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, add_quote=True) identifiers_list = display_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]) 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],
)
new_parents.append( new_parents.append(
parent.get_child( parent.get_child(
doption, doption,
@ -752,7 +814,12 @@ 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(subconfig, _("the follower {0} must have index in carry_out_calculation!"), None, option=option) errors.raise_carry_out_calculation_error(
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)
@ -822,33 +889,14 @@ 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
@ -884,11 +932,14 @@ 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 = [callback.__name__, extra_keys = [
args, callback.__name__,
kwargs, args,
] 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(subconfig, msg, error, extra_keys=extra_keys) errors.raise_carry_out_calculation_error(
subconfig, msg, error, extra_keys=extra_keys
)

View file

@ -228,7 +228,7 @@ class SubConfig:
*, *,
true_path: Optional[str] = None, true_path: Optional[str] = None,
# for python 3.9 properties: Union[list[str], undefined] = undefined, # for python 3.9 properties: Union[list[str], undefined] = undefined,
properties = undefined, properties=undefined,
validate_properties: bool = True, validate_properties: bool = True,
) -> None: ) -> None:
self.index = index self.index = index
@ -417,13 +417,7 @@ 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
@ -869,9 +863,10 @@ class _Config(CCache):
subconfig, with_quote=True subconfig, with_quote=True
) )
raise LeadershipError( raise LeadershipError(
_( subconfig,
"the follower option {0} has greater length ({1}) than the leader length ({2})" "leadership-follower-greater",
).format(option_name, follower_len, length) index=follower_len,
length=length,
) )
self.get_settings().validate_mandatory( self.get_settings().validate_mandatory(
subconfig, subconfig,

View file

@ -18,6 +18,23 @@
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,
@ -69,6 +86,8 @@ 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
@ -87,10 +106,23 @@ 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 set_orig_opt(self, opt): def display_properties(self, force_property=False, add_quote=True):
self._orig_opt = opt if force_property:
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
@ -98,47 +130,81 @@ class PropertiesOptionError(AttributeError):
return self.msg return self.msg
if self._settings is None: if self._settings is None:
return "error" return "error"
if self.help_properties: arguments = [self._opt_type]
properties = list(self.help_properties)
else:
properties = list(self.proptype)
only_one = len(properties) == 1
properties_msg = display_list(properties, add_quote=True)
if only_one:
prop_msg = _("property")
else:
prop_msg = _("properties")
if properties == ["frozen"]:
if self._orig_opt:
msg = _('cannot modify the {0} {1} because "{2}" has {3} {4}')
else:
msg = _("cannot modify the {0} {1} because has {2} {3}")
elif properties == ["mandatory"]:
if self._orig_opt:
msg = _("cannot access to {0} {1} because \"{2}\" hasn't value")
else:
msg = _("{0} {1} is mandatory but hasn't value")
else:
if self._orig_opt:
msg = _('cannot access to {0} {1} because "{2}" has {3} {4}')
else:
msg = _("cannot access to {0} {1} because has {2} {3}")
if self._orig_opt: if self._orig_opt:
# FIXME _orig_opt ? arguments.append(
self.msg = msg.format( self._orig_opt.impl_get_display_name(subconfig, with_quote=True)
self._opt_type,
self._orig_opt.impl_get_display_name(subconfig, with_quote=True),
self._name,
prop_msg,
properties_msg,
) )
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:
msg = _(
'cannot modify the {0} {1} at index "{2}" because is frozen'
)
else:
if self._orig_opt:
msg = _("cannot modify the {0} {1} because {2} is frozen")
else:
msg = _("cannot modify the {0} {1} because is frozen")
elif self.code == "property-mandatory":
if index is not None:
if self._orig_opt:
msg = _(
'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:
msg = _("{0} {1} is mandatory but hasn't value")
else: else:
self.msg = msg.format(self._opt_type, self._name, prop_msg, properties_msg) if index is not None:
if self._orig_opt:
msg = _(
'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:
msg = _("cannot access to {0} {1} because has {2} {3}")
only_one = len(self.help_properties) == 1
if only_one:
arguments.append(_("property"))
else:
arguments.append(_("properties"))
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):
@ -163,8 +229,74 @@ class ConflictError(Exception):
# ____________________________________________________________ # ____________________________________________________________
# miscellaneous exceptions # miscellaneous exceptions
class LeadershipError(Exception): class LeadershipError(Exception):
"problem with a leadership's value length" def __init__(
pass self,
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):
@ -186,7 +318,9 @@ class _CommonError:
try: try:
msg = self.prefix msg = self.prefix
except AttributeError: except AttributeError:
self.prefix = self.tmpl.format(self.val, _(self.display_type), self.name, self.index) self.prefix = self.tmpl.format(
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:
@ -203,12 +337,16 @@ 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 = _('attention, "{0}" could be an invalid {1} for {2}') ValueWarning.tmpl = _(
'attention, "{0}" could be an invalid {1} for {2}'
)
else: else:
ValueWarning.tmpl = _('attention, "{0}" could be an invalid {1} for {2} at index "{3}"') ValueWarning.tmpl = _(
if list(kwargs) == ['msg']: 'attention, "{0}" could be an invalid {1} for {2} at index "{3}"'
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
@ -224,7 +362,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}"')
@ -258,12 +396,12 @@ class CancelParam(Exception):
class Errors: class Errors:
@staticmethod @staticmethod
def raise_carry_out_calculation_error(subconfig, message, original_error, option=None, extra_keys=[]): def raise_carry_out_calculation_error(
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( display_name = option.impl_get_display_name(subconfig, with_quote=True)
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,9 +176,7 @@ class DomainnameOption(StrOption):
try: try:
socket.gethostbyname(value) socket.gethostbyname(value)
except socket.gaierror as err: except socket.gaierror as err:
raise ValueError( raise ValueError(_("DNS resolution failed").format(value)) from err
_("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,9 +74,12 @@ 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 = [{"file": _("file"), "directory": _("directory")}.get(typ) for typ in types] translated_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,9 +51,7 @@ class Leadership(OptionDescription):
**kwargs, **kwargs,
) -> None: ) -> None:
if "group_type" in kwargs: if "group_type" in kwargs:
raise LeadershipError( raise LeadershipError(name, "leadership-group_type")
_('cannot set "group_type" attribute for a Leadership')
)
super().__init__( super().__init__(
name, name,
doc, doc,
@ -85,9 +83,7 @@ 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( raise LeadershipError(name, "leadership-wrong_property", prop=prop)
_('leader cannot have "{}" property').format(prop)
)
def _check_child_is_valid( def _check_child_is_valid(
self, self,

View file

@ -259,7 +259,7 @@ class Option(BaseOption):
*, *,
check_error: bool = True, check_error: bool = True,
loaded: bool = False, loaded: bool = False,
self_properties: frozenset=frozenset(), self_properties: frozenset = frozenset(),
) -> bool: ) -> bool:
"""Return True if value is really valid """Return True if value is really valid
If not validate or invalid return it returns False If not validate or invalid return it returns False
@ -269,8 +269,11 @@ 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 "validator" not in config_properties or "validator" not in self_properties: if (
"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
@ -443,11 +446,21 @@ 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, val=val, display_type=_(self.get_type()), opt=self, err_msg=str(err), index=err_index subconfig=subconfig,
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, val=val, display_type=_(self.get_type()), opt=self, err_msg=str(err), index=err_index subconfig=subconfig,
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 from ..error import ConfigError, ConflictError, AttributeOptionError
class CacheOptionDescription(BaseOption): class CacheOptionDescription(BaseOption):
@ -242,12 +242,10 @@ 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 AttributeError( raise AttributeOptionError(path, "option-dynamic")
_('cannot access to "{0}" it\'s a dynamic option').format(path)
)
return option return option
def get_child( def get_child(
@ -279,14 +277,10 @@ class OptionDescriptionWalk(CacheOptionDescription):
return child return child
return identifier, child return identifier, child
if parent.path is None: if parent.path is None:
raise AttributeError( path = name
_('cannot find "{0}"').format(name) else:
) path = parent.path + "." + name
raise AttributeError( raise AttributeOptionError(path, "option-not-found")
_('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

@ -56,23 +56,23 @@ class URLOption(StrOption):
# pylint: disable=too-many-arguments,too-many-locals,redefined-builtin # pylint: disable=too-many-arguments,too-many-locals,redefined-builtin
extra = {} extra = {}
extra["_domainname"] = DomainnameOption( extra["_domainname"] = DomainnameOption(
name, name,
doc, doc,
allow_ip=allow_ip, allow_ip=allow_ip,
type=type, type=type,
allow_without_dot=allow_without_dot, allow_without_dot=allow_without_dot,
_extra=extra, _extra=extra,
) )
extra["_port"] = PortOption( extra["_port"] = PortOption(
name, name,
doc, doc,
allow_range=allow_range, allow_range=allow_range,
allow_zero=allow_zero, allow_zero=allow_zero,
allow_wellknown=allow_wellknown, allow_wellknown=allow_wellknown,
allow_registred=allow_registred, allow_registred=allow_registred,
allow_private=allow_private, allow_private=allow_private,
_extra=extra, _extra=extra,
) )
super().__init__( super().__init__(
name, name,
doc, doc,

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(
_('leader cannot have "{new_prop}" property') subconfig, "leadership-wrong_property", prop=new_prop
) )
props.add(new_prop) props.add(new_prop)
props -= self.getpermissives(subconfig) props -= self.getpermissives(subconfig)
@ -564,19 +564,15 @@ 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(
_('leader cannot have "{0}" property').format( subconfig,
display_list(not_allowed_properties) "leadership-wrong_property",
) 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( raise LeadershipError(subconfig, "leadership-force_default_on_freeze")
_(
'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 and "validator" in setting_properties
"validator" in self_properties and and "validator" in self_properties
"demoting_error_warning" not in setting_properties and "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,7 +306,11 @@ class Values:
value, value,
validated=validator, validated=validator,
) )
elif "validator" in setting_properties and "validator" in self_properties and has_calculation: elif (
"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)
@ -592,7 +596,12 @@ 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 validate and hasvalue and "validator" in setting_properties and "validator" in self_properties: if (
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()