Compare commits
No commits in common. "fecab8aca66268383915e3117a1d0533fbcf729a" and "bb1f117ed1d38b74f1a87a1ff6d5bbc988709f2a" have entirely different histories.
fecab8aca6
...
bb1f117ed1
37 changed files with 274 additions and 853 deletions
|
|
@ -1,10 +1,3 @@
|
||||||
## 1.2.0a24 (2025-05-12)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- upgrade translation
|
|
||||||
- black
|
|
||||||
|
|
||||||
## 1.2.0a23 (2025-05-09)
|
## 1.2.0a23 (2025-05-09)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2025-05-12 08:45+0200\n"
|
"POT-Creation-Date: 2025-05-08 21:35+0200\n"
|
||||||
"PO-Revision-Date: 2025-05-12 08:52+0200\n"
|
"PO-Revision-Date: 2025-05-08 21:37+0200\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
|
@ -16,31 +16,31 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
"X-Generator: Poedit 3.5\n"
|
"X-Generator: Poedit 3.5\n"
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:150
|
#: src/rougail/annotator/family.py:152
|
||||||
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
|
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"le mode d'une variable par défaut \"{0}\" n'est pas un mode valide, les "
|
"le mode d'une variable par défaut \"{0}\" n'est pas un mode valide, les "
|
||||||
"modes valides sont {1}"
|
"modes valides sont {1}"
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:156
|
#: src/rougail/annotator/family.py:158
|
||||||
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
|
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"le mode d'une famille par défaut \"{0}\" n'est pas un mode valide, les modes "
|
"le mode d'une famille par défaut \"{0}\" n'est pas un mode valide, les modes "
|
||||||
"valides sont {1}"
|
"valides sont {1}"
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:188
|
#: src/rougail/annotator/family.py:190
|
||||||
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
|
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, les modes valides "
|
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, les modes valides "
|
||||||
"sont {2}"
|
"sont {2}"
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:192
|
#: src/rougail/annotator/family.py:194
|
||||||
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
|
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, aucun mode ne sont "
|
"le mode \"{0}\" pour \"{1}\" n'est pas un mode valide, aucun mode ne sont "
|
||||||
"définis"
|
"définis"
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:256
|
#: src/rougail/annotator/family.py:258
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the "
|
"the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the "
|
||||||
"higher family mode \"{2}\""
|
"higher family mode \"{2}\""
|
||||||
|
|
@ -48,7 +48,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" est obligatoire, donc en mode \"{1}\", mais la famille a "
|
"la variable \"{0}\" est obligatoire, donc en mode \"{1}\", mais la famille a "
|
||||||
"un mode supérieur \"{2}\""
|
"un mode supérieur \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:294
|
#: src/rougail/annotator/family.py:296
|
||||||
msgid ""
|
msgid ""
|
||||||
"the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode "
|
"the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode "
|
||||||
"\"{2}\""
|
"\"{2}\""
|
||||||
|
|
@ -56,7 +56,7 @@ msgstr ""
|
||||||
"la variable suiveuse \"{0}\" a le mode \"{1}\" mais la variable leader a un "
|
"la variable suiveuse \"{0}\" a le mode \"{1}\" mais la variable leader a un "
|
||||||
"mode supérieur \"{2}\""
|
"mode supérieur \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:327
|
#: src/rougail/annotator/family.py:329
|
||||||
msgid ""
|
msgid ""
|
||||||
"the family \"{0}\" is in \"{1}\" mode but variables and families inside have "
|
"the family \"{0}\" is in \"{1}\" mode but variables and families inside have "
|
||||||
"the higher modes \"{2}\""
|
"the higher modes \"{2}\""
|
||||||
|
|
@ -64,7 +64,7 @@ msgstr ""
|
||||||
"la famille \"{0}\" a le mode \"{1}\" mais les variables et les familles à "
|
"la famille \"{0}\" a le mode \"{1}\" mais les variables et les familles à "
|
||||||
"l'intérieur ont des modes supérieurs \"{2}\""
|
"l'intérieur ont des modes supérieurs \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:345
|
#: src/rougail/annotator/family.py:347
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" is in \"{1}\" mode but family has the higher family "
|
"the variable \"{0}\" is in \"{1}\" mode but family has the higher family "
|
||||||
"mode \"{2}\""
|
"mode \"{2}\""
|
||||||
|
|
@ -89,7 +89,7 @@ msgstr ""
|
||||||
msgid "the variable \"{0}\" is a \"choice\" variable but don't have any choice"
|
msgid "the variable \"{0}\" is a \"choice\" variable but don't have any choice"
|
||||||
msgstr "la variable \"{0}\" a une variable à \"choix\" mais n'a aucun choix"
|
msgstr "la variable \"{0}\" a une variable à \"choix\" mais n'a aucun choix"
|
||||||
|
|
||||||
#: src/rougail/annotator/value.py:137
|
#: src/rougail/annotator/value.py:135
|
||||||
msgid "the variable \"{0}\" is a \"regexp\" variable but don't have any regexp"
|
msgid "the variable \"{0}\" is a \"regexp\" variable but don't have any regexp"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" a une variable \"regexp\" mais n'a pas de \"regexp\""
|
"la variable \"{0}\" a une variable \"regexp\" mais n'a pas de \"regexp\""
|
||||||
|
|
@ -102,14 +102,14 @@ msgstr ""
|
||||||
"seul une variable de type \"unix_user\" ou \"secret\" peut avoir l'attribut "
|
"seul une variable de type \"unix_user\" ou \"secret\" peut avoir l'attribut "
|
||||||
"\"secret_manager\", mais \"{0}\" a le type \"{1}\""
|
"\"secret_manager\", mais \"{0}\" a le type \"{1}\""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:93
|
#: src/rougail/annotator/variable.py:89
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has attribute \"secret_manager\" but is a multi variable"
|
"the variable \"{0}\" has attribute \"secret_manager\" but is a multi variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" a l'attribut \"secret_manager\" mais est une variable "
|
"la variable \"{0}\" a l'attribut \"secret_manager\" mais est une variable "
|
||||||
"multiple"
|
"multiple"
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:98
|
#: src/rougail/annotator/variable.py:92
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has attribute \"secret_manager\" so must not have "
|
"the variable \"{0}\" has attribute \"secret_manager\" so must not have "
|
||||||
"default value"
|
"default value"
|
||||||
|
|
@ -117,19 +117,19 @@ msgstr ""
|
||||||
"la variable \"{0}\" a l'attribut \"secret_manager\" donc ne devrait pas "
|
"la variable \"{0}\" a l'attribut \"secret_manager\" donc ne devrait pas "
|
||||||
"avoir de valeur par défaut"
|
"avoir de valeur par défaut"
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:227
|
#: src/rougail/annotator/variable.py:202
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has regexp attribut but has not the \"regexp\" type"
|
"the variable \"{0}\" has regexp attribut but has not the \"regexp\" type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" a un attribut regexp mais n'a pas le type \"regexp\""
|
"la variable \"{0}\" a un attribut regexp mais n'a pas le type \"regexp\""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:270
|
#: src/rougail/annotator/variable.py:245
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has choices attribut but has not the \"choice\" type"
|
"the variable \"{0}\" has choices attribut but has not the \"choice\" type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" a un attribut choices mais n'a pas le type \"choice\""
|
"la variable \"{0}\" a un attribut choices mais n'a pas le type \"choice\""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:298
|
#: src/rougail/annotator/variable.py:273
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}"
|
"the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
@ -203,11 +203,11 @@ msgstr "Le patron est au format Jinja"
|
||||||
msgid "Select for {0}"
|
msgid "Select for {0}"
|
||||||
msgstr "Sélection pour {0}"
|
msgstr "Sélection pour {0}"
|
||||||
|
|
||||||
#: src/rougail/config.py:458
|
#: src/rougail/config.py:457
|
||||||
msgid "Override default parameters for option type"
|
msgid "Override default parameters for option type"
|
||||||
msgstr "Sur charger les paramètre par défaut pour le type d'option"
|
msgstr "Sur charger les paramètre par défaut pour le type d'option"
|
||||||
|
|
||||||
#: src/rougail/config.py:461
|
#: src/rougail/config.py:460
|
||||||
msgid "Default parameters for option type"
|
msgid "Default parameters for option type"
|
||||||
msgstr "Paramètre par défaut pour le type d'option"
|
msgstr "Paramètre par défaut pour le type d'option"
|
||||||
|
|
||||||
|
|
@ -219,19 +219,19 @@ msgstr "type {0} inconnu pour {1}"
|
||||||
msgid "family \"{0}\" define multiple time"
|
msgid "family \"{0}\" define multiple time"
|
||||||
msgstr "la famille \"{0}\" est définit plusieurs fois"
|
msgstr "la famille \"{0}\" est définit plusieurs fois"
|
||||||
|
|
||||||
#: src/rougail/convert.py:668
|
#: src/rougail/convert.py:667
|
||||||
msgid "variable \"{0}\" define multiple time"
|
msgid "variable \"{0}\" define multiple time"
|
||||||
msgstr "la variable \"{0}\" est définit plusieurs fois"
|
msgstr "la variable \"{0}\" est définit plusieurs fois"
|
||||||
|
|
||||||
#: src/rougail/convert.py:766
|
#: src/rougail/convert.py:767
|
||||||
msgid "params must be a dict for {0}"
|
msgid "params must be a dict for {0}"
|
||||||
msgstr "params doit être une dict pour {0}"
|
msgstr "params doit être une dict pour {0}"
|
||||||
|
|
||||||
#: src/rougail/convert.py:787
|
#: src/rougail/convert.py:788
|
||||||
msgid "\"{0}\" has an invalid \"params\" for {1}: {2}"
|
msgid "\"{0}\" has an invalid \"params\" for {1}: {2}"
|
||||||
msgstr "\"{0}\" a un attribut \"params\" invalide pour {1}: {2}"
|
msgstr "\"{0}\" a un attribut \"params\" invalide pour {1}: {2}"
|
||||||
|
|
||||||
#: src/rougail/convert.py:801
|
#: src/rougail/convert.py:802
|
||||||
msgid "secret_manager must be a dict for {0}"
|
msgid "secret_manager must be a dict for {0}"
|
||||||
msgstr "secret_manager doit être une dict pour {0}"
|
msgstr "secret_manager doit être une dict pour {0}"
|
||||||
|
|
||||||
|
|
@ -246,8 +246,8 @@ msgstr ""
|
||||||
"définition invalide pour la définition des \"structures\" ({0}), aucun "
|
"définition invalide pour la définition des \"structures\" ({0}), aucun "
|
||||||
"fichier de structure ne peut être chargé !"
|
"fichier de structure ne peut être chargé !"
|
||||||
|
|
||||||
#: src/rougail/error.py:67 src/rougail/tiramisu.py:60
|
#: src/rougail/error.py:67 src/rougail/tiramisu.py:50
|
||||||
#: src/rougail/user_datas.py:354 src/rougail/user_datas.py:357
|
#: src/rougail/user_datas.py:253
|
||||||
msgid "{0} in {1}"
|
msgid "{0} in {1}"
|
||||||
msgstr "{0} dans {1}"
|
msgstr "{0} dans {1}"
|
||||||
|
|
||||||
|
|
@ -255,41 +255,41 @@ msgstr "{0} dans {1}"
|
||||||
msgid "unknown boolean value \"{0}\""
|
msgid "unknown boolean value \"{0}\""
|
||||||
msgstr "valeur du booléen inconnue \"{0}\""
|
msgstr "valeur du booléen inconnue \"{0}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:187
|
#: src/rougail/object_model.py:181
|
||||||
msgid "cannot find variable \"{0}\" defined in attribute \"{1}\" for \"{2}\""
|
msgid "cannot find variable \"{0}\" defined in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ne peut trouver la variable \"{0}\" défini dans l'attribut \"{1}\" pour "
|
"ne peut trouver la variable \"{0}\" défini dans l'attribut \"{1}\" pour "
|
||||||
"\"{2}\""
|
"\"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:193
|
#: src/rougail/object_model.py:185
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" is in fact a family in attribute \"{1}\" for \"{2}\""
|
"the variable \"{0}\" is in fact a family in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" est en faite une famille dans l'attribut \"{1}\" pour "
|
"la variable \"{0}\" est en faite une famille dans l'attribut \"{1}\" pour "
|
||||||
"\"{2}\""
|
"\"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:198 src/rougail/object_model.py:525
|
#: src/rougail/object_model.py:188 src/rougail/object_model.py:478
|
||||||
msgid "unknown object \"{0}\" in attribute \"{1}\" for \"{2}\""
|
msgid "unknown object \"{0}\" in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr "objet inconnu \"{0}\" dans l'attribut \"{1}\" pour \"{2}\""
|
msgstr "objet inconnu \"{0}\" dans l'attribut \"{1}\" pour \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:217
|
#: src/rougail/object_model.py:205
|
||||||
msgid ""
|
msgid ""
|
||||||
"identifier parameter for \"{0}\" in \"{1}\" cannot be set none dynamic family"
|
"identifier parameter for \"{0}\" in \"{1}\" cannot be set none dynamic family"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"le paramètre identifier pour \"{0}\" dans \"{1}\" ne peut être placé pour "
|
"le paramètre identifier pour \"{0}\" dans \"{1}\" ne peut être placé pour "
|
||||||
"une famille non dynamique"
|
"une famille non dynamique"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:246
|
#: src/rougail/object_model.py:228
|
||||||
msgid "cannot find variable \"{0}\" defined in \"{1}\" for \"{2}\""
|
msgid "cannot find variable \"{0}\" defined in \"{1}\" for \"{2}\""
|
||||||
msgstr "ne peut trouver la variable \"{0}\" défini dans \"{1}\" pour \"{2}\""
|
msgstr "ne peut trouver la variable \"{0}\" défini dans \"{1}\" pour \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:251
|
#: src/rougail/object_model.py:231
|
||||||
msgid "variable \"{0}\" defined in \"{1}\" for \"{2}\" is a dynamic variable"
|
msgid "variable \"{0}\" defined in \"{1}\" for \"{2}\" is a dynamic variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" défini dans \"{1}\" pour \"{2}\" est une variable "
|
"la variable \"{0}\" défini dans \"{1}\" pour \"{2}\" est une variable "
|
||||||
"dynamique"
|
"dynamique"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:268
|
#: src/rougail/object_model.py:242
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" is not a follower, so cannot have index type for param "
|
"the variable \"{0}\" is not a follower, so cannot have index type for param "
|
||||||
"in \"{1}\""
|
"in \"{1}\""
|
||||||
|
|
@ -297,7 +297,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" n'est pas suiveuse, donc ne peut avoir de type index "
|
"la variable \"{0}\" n'est pas suiveuse, donc ne peut avoir de type index "
|
||||||
"comme paramètre dans \"{1}\""
|
"comme paramètre dans \"{1}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:520
|
#: src/rougail/object_model.py:475
|
||||||
msgid ""
|
msgid ""
|
||||||
"a variable \"{0}\" is needs in attribute \"{1}\" for \"{2}\" but it's a "
|
"a variable \"{0}\" is needs in attribute \"{1}\" for \"{2}\" but it's a "
|
||||||
"family"
|
"family"
|
||||||
|
|
@ -305,7 +305,7 @@ msgstr ""
|
||||||
"une variable \"{0}\" est nécessaire pour l'attribut \"{1}\" pour \"{2}\" "
|
"une variable \"{0}\" est nécessaire pour l'attribut \"{1}\" pour \"{2}\" "
|
||||||
"mais c'est une famille"
|
"mais c'est une famille"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:544
|
#: src/rougail/object_model.py:495
|
||||||
msgid ""
|
msgid ""
|
||||||
"variable \"{0}\" has an attribute \"{1}\" calculated with the unknown "
|
"variable \"{0}\" has an attribute \"{1}\" calculated with the unknown "
|
||||||
"variable \"{2}\""
|
"variable \"{2}\""
|
||||||
|
|
@ -313,7 +313,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\" calculé avec la variable "
|
"la variable \"{0}\" a un attribut invalide \"{1}\" calculé avec la variable "
|
||||||
"inconnue \"{2}\""
|
"inconnue \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:593
|
#: src/rougail/object_model.py:531
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid \"{1}\" the variable \"{2}\" is in a sub "
|
"the variable \"{0}\" has an invalid \"{1}\" the variable \"{2}\" is in a sub "
|
||||||
"dynamic option"
|
"dynamic option"
|
||||||
|
|
@ -321,14 +321,14 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" est "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" est "
|
||||||
"dans une sous option dynamique"
|
"dans une sous option dynamique"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:602
|
#: src/rougail/object_model.py:534
|
||||||
msgid ""
|
msgid ""
|
||||||
"the leader \"{0}\" has an invalid \"{1}\" the follower \"{2}\" is a multi"
|
"the leader \"{0}\" has an invalid \"{1}\" the follower \"{2}\" is a multi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable meneuse \"{0}\" a un attribut invalide \"{1}\", la variable "
|
"la variable meneuse \"{0}\" a un attribut invalide \"{1}\", la variable "
|
||||||
"suiveuse \"{2}\" est multiple"
|
"suiveuse \"{2}\" est multiple"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:644
|
#: src/rougail/object_model.py:550
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" "
|
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" "
|
||||||
"must not be multi"
|
"must not be multi"
|
||||||
|
|
@ -336,7 +336,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" ne "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" ne "
|
||||||
"doit pas être multiple"
|
"doit pas être multiple"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:658
|
#: src/rougail/object_model.py:555
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable must not "
|
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable must not "
|
||||||
"be a multi or the variable \"{2}\" must be multi"
|
"be a multi or the variable \"{2}\" must be multi"
|
||||||
|
|
@ -344,7 +344,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable ne doit pas "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable ne doit pas "
|
||||||
"être multiple ou la variable \"{2}\" doit être multiple"
|
"être multiple ou la variable \"{2}\" doit être multiple"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:672
|
#: src/rougail/object_model.py:560
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable must be "
|
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable must be "
|
||||||
"a multi or the variable \"{2}\" must not be multi"
|
"a multi or the variable \"{2}\" must not be multi"
|
||||||
|
|
@ -352,7 +352,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable doit être "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable doit être "
|
||||||
"multiple ou la variable \"{2}\" ne doit pas être multiple"
|
"multiple ou la variable \"{2}\" ne doit pas être multiple"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:686
|
#: src/rougail/object_model.py:565
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" "
|
"the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" "
|
||||||
"is multi but is inside a list"
|
"is multi but is inside a list"
|
||||||
|
|
@ -360,7 +360,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" est "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", la variable \"{2}\" est "
|
||||||
"multiple mais est dans une liste"
|
"multiple mais est dans une liste"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:704
|
#: src/rougail/object_model.py:579
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"{0}\" attribut shall not have an \"optional\" attribute for variable "
|
"\"{0}\" attribut shall not have an \"optional\" attribute for variable "
|
||||||
"\"{1}\""
|
"\"{1}\""
|
||||||
|
|
@ -368,7 +368,7 @@ msgstr ""
|
||||||
"l'attribut \"{0}\" ne devrait pas avoir d'attribut \"optional\" pour la "
|
"l'attribut \"{0}\" ne devrait pas avoir d'attribut \"optional\" pour la "
|
||||||
"variable \"{1}\""
|
"variable \"{1}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:724
|
#: src/rougail/object_model.py:591
|
||||||
msgid ""
|
msgid ""
|
||||||
"variable \"{0}\" has a default value calculated with \"{1}\" which has "
|
"variable \"{0}\" has a default value calculated with \"{1}\" which has "
|
||||||
"incompatible type"
|
"incompatible type"
|
||||||
|
|
@ -376,7 +376,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a une valeur par défaut calculé a partir de \"{1}\" "
|
"la variable \"{0}\" a une valeur par défaut calculé a partir de \"{1}\" "
|
||||||
"laquelle a un type incompatible"
|
"laquelle a un type incompatible"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:770
|
#: src/rougail/object_model.py:629
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"when\" is not allowed in format version 1.0 for attribute \"{0}\" for "
|
"\"when\" is not allowed in format version 1.0 for attribute \"{0}\" for "
|
||||||
"variable \"{1}\""
|
"variable \"{1}\""
|
||||||
|
|
@ -384,7 +384,7 @@ msgstr ""
|
||||||
"\"when\" n'est pas autorisé avec le format en version 1.0 pour l'attribut "
|
"\"when\" n'est pas autorisé avec le format en version 1.0 pour l'attribut "
|
||||||
"\"{0}\" pour la variable \"{1}\""
|
"\"{0}\" pour la variable \"{1}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:775
|
#: src/rougail/object_model.py:632
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" has an invalid attribute \"{1}\", \"when\" and "
|
"the variable \"{0}\" has an invalid attribute \"{1}\", \"when\" and "
|
||||||
"\"when_not\" cannot set together"
|
"\"when_not\" cannot set together"
|
||||||
|
|
@ -392,7 +392,7 @@ msgstr ""
|
||||||
"la variable \"{0}\" a un attribut invalide \"{1}\", \"when\" et \"when_not\" "
|
"la variable \"{0}\" a un attribut invalide \"{1}\", \"when\" et \"when_not\" "
|
||||||
"ne peuvent pas être défini ensemble"
|
"ne peuvent pas être défini ensemble"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:783
|
#: src/rougail/object_model.py:638
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"when_not\" is not allowed in format version 1.0 for attribute \"{0}\" for "
|
"\"when_not\" is not allowed in format version 1.0 for attribute \"{0}\" for "
|
||||||
"variable \"{1}\""
|
"variable \"{1}\""
|
||||||
|
|
@ -400,7 +400,7 @@ msgstr ""
|
||||||
"\"when_not\" n'est pas autorisé au format 1.0 pour l'attribut \"{0}\" pour "
|
"\"when_not\" n'est pas autorisé au format 1.0 pour l'attribut \"{0}\" pour "
|
||||||
"la variable variable \"{1}\""
|
"la variable variable \"{1}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:840
|
#: src/rougail/object_model.py:693
|
||||||
msgid ""
|
msgid ""
|
||||||
"cannot find variable \"{0}\" for the information \"{1}\" when calculating "
|
"cannot find variable \"{0}\" for the information \"{1}\" when calculating "
|
||||||
"\"{2}\""
|
"\"{2}\""
|
||||||
|
|
@ -408,18 +408,18 @@ msgstr ""
|
||||||
"ne peut trouver la variable \"{0}\" pour l'information \"{1}\" lors du "
|
"ne peut trouver la variable \"{0}\" pour l'information \"{1}\" lors du "
|
||||||
"calcul de \"{2}\""
|
"calcul de \"{2}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:845
|
#: src/rougail/object_model.py:696
|
||||||
msgid ""
|
msgid ""
|
||||||
"identifier not allowed for the information \"{0}\" when calculating \"{1}\""
|
"identifier not allowed for the information \"{0}\" when calculating \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"identifier n'est pas autorisé pour l'information \"{0}\" lors du calcul de "
|
"identifier n'est pas autorisé pour l'information \"{0}\" lors du calcul de "
|
||||||
"\"{1}\""
|
"\"{1}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:898
|
#: src/rougail/object_model.py:747
|
||||||
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\""
|
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\""
|
||||||
msgstr "\"when\" n'est pas autorisé au format 1.0 pour l'attribut \"{0}\""
|
msgstr "\"when\" n'est pas autorisé au format 1.0 pour l'attribut \"{0}\""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:904 src/rougail/object_model.py:914
|
#: src/rougail/object_model.py:751 src/rougail/object_model.py:759
|
||||||
msgid ""
|
msgid ""
|
||||||
"the identifier has an invalid attribute \"{0}\", \"when\" and \"when_not\" "
|
"the identifier has an invalid attribute \"{0}\", \"when\" and \"when_not\" "
|
||||||
"cannot set together"
|
"cannot set together"
|
||||||
|
|
@ -427,7 +427,7 @@ msgstr ""
|
||||||
"l'identifiant a un attribut invalide \"{0}\", \"when\" et \"when_not\" ne "
|
"l'identifiant a un attribut invalide \"{0}\", \"when\" et \"when_not\" ne "
|
||||||
"peuvent pas être défini ensemble"
|
"peuvent pas être défini ensemble"
|
||||||
|
|
||||||
#: src/rougail/object_model.py:939
|
#: src/rougail/object_model.py:782
|
||||||
msgid ""
|
msgid ""
|
||||||
"the variable \"{0}\" is not a follower, so cannot have index type for \"{1}\""
|
"the variable \"{0}\" is not a follower, so cannot have index type for \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
@ -480,7 +480,7 @@ msgstr ""
|
||||||
"Répertoires où sont placés les fichiers de structure de l'espace de nom "
|
"Répertoires où sont placés les fichiers de structure de l'espace de nom "
|
||||||
"supplémentaire"
|
"supplémentaire"
|
||||||
|
|
||||||
#: src/rougail/tiramisu.py:187
|
#: src/rougail/tiramisu.py:175
|
||||||
msgid ""
|
msgid ""
|
||||||
"cannot calculating \"{0}\" attribute for variable \"{1}\" in {2} with "
|
"cannot calculating \"{0}\" attribute for variable \"{1}\" in {2} with "
|
||||||
"parameters \"{3}\": {4}"
|
"parameters \"{3}\": {4}"
|
||||||
|
|
@ -488,95 +488,34 @@ msgstr ""
|
||||||
"ne peut calculer l'attribut \"{0}\" pour la variable \"{1}\" dans {2} avec "
|
"ne peut calculer l'attribut \"{0}\" pour la variable \"{1}\" dans {2} avec "
|
||||||
"les paramètres \"{3}\" : {4}"
|
"les paramètres \"{3}\" : {4}"
|
||||||
|
|
||||||
#: src/rougail/tiramisureflector.py:363
|
#: src/rougail/tiramisureflector.py:364
|
||||||
msgid "internal error, {0} is not a dynamic variable"
|
msgid "internal error, {0} is not a dynamic variable"
|
||||||
msgstr "erreur interne, \"{0}\" n'est pas une variable dynamique"
|
msgstr "erreur interne, \"{0}\" n'est pas une variable dynamique"
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:118
|
#: src/rougail/user_datas.py:116
|
||||||
msgid ""
|
msgid ""
|
||||||
"cannot load variable path \"{0}\", the identifier \"{1}\" is not valid in {2}"
|
"cannot load variable path \"{0}\", the identifier \"{1}\" is not valid in {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ne peut charger la variable \"{0}\", l'identifiant \"{1}\" n'est pas valide "
|
"ne peut charger la variable \"{0}\", l'identifiant \"{1}\" n'est pas valide "
|
||||||
"dans {2}"
|
"dans {2}"
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:196
|
#: src/rougail/user_datas.py:171
|
||||||
msgid "the variable \"{0}\" contains secrets and should not be defined in {1}"
|
msgid "the variable \"{0}\" contains secrets and should not be defined in {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la variable \"{0}\" contient des secrets et ne devrait pas être défini dans "
|
"la variable \"{0}\" contient des secrets et ne devrait pas être défini dans "
|
||||||
"{1}"
|
"{1}"
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:218
|
#: src/rougail/user_datas.py:236
|
||||||
msgid "loaded from {0}"
|
|
||||||
msgstr "chargée depuis {0}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:258
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"cannot set the value \"{0}\" to the family {1}, it will be ignored when "
|
"the variable \"{0}\" is a family, so cannot set the value \"{1}\" in {2}"
|
||||||
"loading from {2}"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"impossible de définir la valeur \"{0}\" à la famille {1}, elle sera ignorée "
|
"la variable \"{0}\" est une famille, donc ne peut avoir l'avoir \"{1}\" dans "
|
||||||
"lors du chargement depuis {0}"
|
"{2}"
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:270
|
#: src/rougail/user_datas.py:251
|
||||||
msgid ""
|
|
||||||
"variable or family \"{0}\" does not exist, it will be ignored when loading "
|
|
||||||
"from {1}"
|
|
||||||
msgstr ""
|
|
||||||
"la variable ou la famille \"{0}\" n'existe pas, elle sera ignorée lors du "
|
|
||||||
"chargement depuis {1}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:276
|
|
||||||
msgid ""
|
|
||||||
"\"{0}\" is the name of a dynamic family, it will be ignored when loading "
|
|
||||||
"from {1}"
|
|
||||||
msgstr ""
|
|
||||||
"\"{0}\" est le nom d'une famille dynamique, il sera ignoré lors du "
|
|
||||||
"chargement depuis {1}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:282
|
|
||||||
msgid "{0} loaded from {1}"
|
msgid "{0} loaded from {1}"
|
||||||
msgstr "{0} chargée depuis {1}"
|
msgstr "{0} chargée depuis {1}"
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:311
|
|
||||||
msgid ""
|
|
||||||
"variable {0} at index \"{1}\" is {2}, it will be ignored when loading from "
|
|
||||||
"{3}"
|
|
||||||
msgstr ""
|
|
||||||
"la variable {0} à l'index \"{1}\" est {2}, elle sera ignorée lors du "
|
|
||||||
"chargement depuis {3}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:322
|
|
||||||
msgid ""
|
|
||||||
"family {0} is {1}, {2} at index \"{3}\" will be ignored when loading from {4}"
|
|
||||||
msgstr ""
|
|
||||||
"la famille {0} est {1}, {2} à l'index \"{3}\" sera ignorée lors du "
|
|
||||||
"chargement depuis {4}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:335
|
|
||||||
msgid "variable {0} is {1}, it will be ignored when loading from {2}"
|
|
||||||
msgstr ""
|
|
||||||
"la variable {0} est {1}, elle sera ignorée lors du chargement depuis {2}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:343
|
|
||||||
msgid "family {0} is {1}, {2} will be ignored when loading from {3}"
|
|
||||||
msgstr "la famille {0} est {1}, {2} sera ignorée lors du chargement depuis {3}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:362
|
|
||||||
msgid ""
|
|
||||||
"the value \"{0}\" is invalid for {1} at index \"{2}\", {3}, it will be "
|
|
||||||
"ignored when loading from {4}"
|
|
||||||
msgstr ""
|
|
||||||
"la valeur \"{0}\" n'est pas valide pour {1} à l'index \"{2}\", {3}, elle "
|
|
||||||
"sera ignorée lors du chargement depuis {4}"
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:373
|
|
||||||
msgid ""
|
|
||||||
"the value \"{0}\" is invalid for {1}, {2}, it will be ignored when loading "
|
|
||||||
"from {3}"
|
|
||||||
msgstr ""
|
|
||||||
"la valeur \"{0}\" n'est pas valide pour {1}, {2}, elle sera ignorée lors du "
|
|
||||||
"chargement depuis {3}"
|
|
||||||
|
|
||||||
#: src/rougail/utils.py:55
|
#: src/rougail/utils.py:55
|
||||||
msgid ""
|
msgid ""
|
||||||
"invalid variable or family name \"{0}\" must only contains lowercase ascii "
|
"invalid variable or family name \"{0}\" must only contains lowercase ascii "
|
||||||
|
|
@ -589,12 +528,6 @@ msgstr ""
|
||||||
msgid "error in jinja \"{0}\" for the variable \"{1}\": {2}"
|
msgid "error in jinja \"{0}\" for the variable \"{1}\": {2}"
|
||||||
msgstr "erreur dans Jinja \"{0}\" pour la variable \"{1}\": {2}"
|
msgstr "erreur dans Jinja \"{0}\" pour la variable \"{1}\": {2}"
|
||||||
|
|
||||||
#~ msgid ""
|
|
||||||
#~ "the variable \"{0}\" is a family, so cannot set the value \"{1}\" in {2}"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "la variable \"{0}\" est une famille, donc ne peut avoir l'avoir \"{1}\" "
|
|
||||||
#~ "dans {2}"
|
|
||||||
|
|
||||||
#~ msgid "the follower \"{0}\" without multi attribute can only have one value"
|
#~ msgid "the follower \"{0}\" without multi attribute can only have one value"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "la variable suiveuse \"{0}\" sans l'attribut multi peut avoir seulement "
|
#~ "la variable suiveuse \"{0}\" sans l'attribut multi peut avoir seulement "
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2025-05-12 08:52+0200\n"
|
"POT-Creation-Date: 2025-05-08 21:37+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"
|
||||||
|
|
@ -15,35 +15,35 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:150
|
#: src/rougail/annotator/family.py:152
|
||||||
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
|
msgid "default variable mode \"{0}\" is not a valid mode, valid modes are {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:156
|
#: src/rougail/annotator/family.py:158
|
||||||
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
|
msgid "default family mode \"{0}\" is not a valid mode, valid modes are {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:188
|
#: src/rougail/annotator/family.py:190
|
||||||
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
|
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, valid modes are {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:192
|
#: src/rougail/annotator/family.py:194
|
||||||
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
|
msgid "mode \"{0}\" for \"{1}\" is not a valid mode, no modes are available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:256
|
#: src/rougail/annotator/family.py:258
|
||||||
msgid "the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the higher family mode \"{2}\""
|
msgid "the variable \"{0}\" is mandatory so in \"{1}\" mode but family has the higher family mode \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:294
|
#: src/rougail/annotator/family.py:296
|
||||||
msgid "the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode \"{2}\""
|
msgid "the follower \"{0}\" is in \"{1}\" mode but leader have the higher mode \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:327
|
#: src/rougail/annotator/family.py:329
|
||||||
msgid "the family \"{0}\" is in \"{1}\" mode but variables and families inside have the higher modes \"{2}\""
|
msgid "the family \"{0}\" is in \"{1}\" mode but variables and families inside have the higher modes \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/family.py:345
|
#: src/rougail/annotator/family.py:347
|
||||||
msgid "the variable \"{0}\" is in \"{1}\" mode but family has the higher family mode \"{2}\""
|
msgid "the variable \"{0}\" is in \"{1}\" mode but family has the higher family mode \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ msgstr ""
|
||||||
msgid "the variable \"{0}\" is a \"choice\" variable but don't have any choice"
|
msgid "the variable \"{0}\" is a \"choice\" variable but don't have any choice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/value.py:137
|
#: src/rougail/annotator/value.py:135
|
||||||
msgid "the variable \"{0}\" is a \"regexp\" variable but don't have any regexp"
|
msgid "the variable \"{0}\" is a \"regexp\" variable but don't have any regexp"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -67,23 +67,23 @@ msgstr ""
|
||||||
msgid "only \"unix_user\" or \"secret\" variable type can have \"secret_manager\" attribute, but \"{0}\" has type \"{1}\""
|
msgid "only \"unix_user\" or \"secret\" variable type can have \"secret_manager\" attribute, but \"{0}\" has type \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:93
|
#: src/rougail/annotator/variable.py:89
|
||||||
msgid "the variable \"{0}\" has attribute \"secret_manager\" but is a multi variable"
|
msgid "the variable \"{0}\" has attribute \"secret_manager\" but is a multi variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:98
|
#: src/rougail/annotator/variable.py:92
|
||||||
msgid "the variable \"{0}\" has attribute \"secret_manager\" so must not have default value"
|
msgid "the variable \"{0}\" has attribute \"secret_manager\" so must not have default value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:227
|
#: src/rougail/annotator/variable.py:202
|
||||||
msgid "the variable \"{0}\" has regexp attribut but has not the \"regexp\" type"
|
msgid "the variable \"{0}\" has regexp attribut but has not the \"regexp\" type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:270
|
#: src/rougail/annotator/variable.py:245
|
||||||
msgid "the variable \"{0}\" has choices attribut but has not the \"choice\" type"
|
msgid "the variable \"{0}\" has choices attribut but has not the \"choice\" type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/annotator/variable.py:298
|
#: src/rougail/annotator/variable.py:273
|
||||||
msgid "the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}"
|
msgid "the variable \"{0}\" has an unvalid default value \"{1}\" should be in {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -151,11 +151,11 @@ msgstr ""
|
||||||
msgid "Select for {0}"
|
msgid "Select for {0}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/config.py:458
|
#: src/rougail/config.py:457
|
||||||
msgid "Override default parameters for option type"
|
msgid "Override default parameters for option type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/config.py:461
|
#: src/rougail/config.py:460
|
||||||
msgid "Default parameters for option type"
|
msgid "Default parameters for option type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -167,19 +167,19 @@ msgstr ""
|
||||||
msgid "family \"{0}\" define multiple time"
|
msgid "family \"{0}\" define multiple time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/convert.py:668
|
#: src/rougail/convert.py:667
|
||||||
msgid "variable \"{0}\" define multiple time"
|
msgid "variable \"{0}\" define multiple time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/convert.py:766
|
#: src/rougail/convert.py:767
|
||||||
msgid "params must be a dict for {0}"
|
msgid "params must be a dict for {0}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/convert.py:787
|
#: src/rougail/convert.py:788
|
||||||
msgid "\"{0}\" has an invalid \"params\" for {1}: {2}"
|
msgid "\"{0}\" has an invalid \"params\" for {1}: {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/convert.py:801
|
#: src/rougail/convert.py:802
|
||||||
msgid "secret_manager must be a dict for {0}"
|
msgid "secret_manager must be a dict for {0}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -191,8 +191,8 @@ msgstr ""
|
||||||
msgid "invalid \"structural\" definition ({0}), we cannot load any structural file!"
|
msgid "invalid \"structural\" definition ({0}), we cannot load any structural file!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/error.py:67 src/rougail/tiramisu.py:60
|
#: src/rougail/error.py:67 src/rougail/tiramisu.py:50
|
||||||
#: src/rougail/user_datas.py:354 src/rougail/user_datas.py:357
|
#: src/rougail/user_datas.py:253
|
||||||
msgid "{0} in {1}"
|
msgid "{0} in {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -200,103 +200,103 @@ msgstr ""
|
||||||
msgid "unknown boolean value \"{0}\""
|
msgid "unknown boolean value \"{0}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:187
|
#: src/rougail/object_model.py:181
|
||||||
msgid "cannot find variable \"{0}\" defined in attribute \"{1}\" for \"{2}\""
|
msgid "cannot find variable \"{0}\" defined in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:193
|
#: src/rougail/object_model.py:185
|
||||||
msgid "the variable \"{0}\" is in fact a family in attribute \"{1}\" for \"{2}\""
|
msgid "the variable \"{0}\" is in fact a family in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:198 src/rougail/object_model.py:525
|
#: src/rougail/object_model.py:188 src/rougail/object_model.py:478
|
||||||
msgid "unknown object \"{0}\" in attribute \"{1}\" for \"{2}\""
|
msgid "unknown object \"{0}\" in attribute \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:217
|
#: src/rougail/object_model.py:205
|
||||||
msgid "identifier parameter for \"{0}\" in \"{1}\" cannot be set none dynamic family"
|
msgid "identifier parameter for \"{0}\" in \"{1}\" cannot be set none dynamic family"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:246
|
#: src/rougail/object_model.py:228
|
||||||
msgid "cannot find variable \"{0}\" defined in \"{1}\" for \"{2}\""
|
msgid "cannot find variable \"{0}\" defined in \"{1}\" for \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:251
|
#: src/rougail/object_model.py:231
|
||||||
msgid "variable \"{0}\" defined in \"{1}\" for \"{2}\" is a dynamic variable"
|
msgid "variable \"{0}\" defined in \"{1}\" for \"{2}\" is a dynamic variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:268
|
#: src/rougail/object_model.py:242
|
||||||
msgid "the variable \"{0}\" is not a follower, so cannot have index type for param in \"{1}\""
|
msgid "the variable \"{0}\" is not a follower, so cannot have index type for param in \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:520
|
#: src/rougail/object_model.py:475
|
||||||
msgid "a variable \"{0}\" is needs in attribute \"{1}\" for \"{2}\" but it's a family"
|
msgid "a variable \"{0}\" is needs in attribute \"{1}\" for \"{2}\" but it's a family"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:544
|
#: src/rougail/object_model.py:495
|
||||||
msgid "variable \"{0}\" has an attribute \"{1}\" calculated with the unknown variable \"{2}\""
|
msgid "variable \"{0}\" has an attribute \"{1}\" calculated with the unknown variable \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:593
|
#: src/rougail/object_model.py:531
|
||||||
msgid "the variable \"{0}\" has an invalid \"{1}\" the variable \"{2}\" is in a sub dynamic option"
|
msgid "the variable \"{0}\" has an invalid \"{1}\" the variable \"{2}\" is in a sub dynamic option"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:602
|
#: src/rougail/object_model.py:534
|
||||||
msgid "the leader \"{0}\" has an invalid \"{1}\" the follower \"{2}\" is a multi"
|
msgid "the leader \"{0}\" has an invalid \"{1}\" the follower \"{2}\" is a multi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:644
|
#: src/rougail/object_model.py:550
|
||||||
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" must not be multi"
|
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" must not be multi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:658
|
#: src/rougail/object_model.py:555
|
||||||
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable must not be a multi or the variable \"{2}\" must be multi"
|
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable must not be a multi or the variable \"{2}\" must be multi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:672
|
#: src/rougail/object_model.py:560
|
||||||
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable must be a multi or the variable \"{2}\" must not be multi"
|
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable must be a multi or the variable \"{2}\" must not be multi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:686
|
#: src/rougail/object_model.py:565
|
||||||
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" is multi but is inside a list"
|
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", the variable \"{2}\" is multi but is inside a list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:704
|
#: src/rougail/object_model.py:579
|
||||||
msgid "\"{0}\" attribut shall not have an \"optional\" attribute for variable \"{1}\""
|
msgid "\"{0}\" attribut shall not have an \"optional\" attribute for variable \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:724
|
#: src/rougail/object_model.py:591
|
||||||
msgid "variable \"{0}\" has a default value calculated with \"{1}\" which has incompatible type"
|
msgid "variable \"{0}\" has a default value calculated with \"{1}\" which has incompatible type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:770
|
#: src/rougail/object_model.py:629
|
||||||
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\" for variable \"{1}\""
|
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\" for variable \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:775
|
#: src/rougail/object_model.py:632
|
||||||
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", \"when\" and \"when_not\" cannot set together"
|
msgid "the variable \"{0}\" has an invalid attribute \"{1}\", \"when\" and \"when_not\" cannot set together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:783
|
#: src/rougail/object_model.py:638
|
||||||
msgid "\"when_not\" is not allowed in format version 1.0 for attribute \"{0}\" for variable \"{1}\""
|
msgid "\"when_not\" is not allowed in format version 1.0 for attribute \"{0}\" for variable \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:840
|
#: src/rougail/object_model.py:693
|
||||||
msgid "cannot find variable \"{0}\" for the information \"{1}\" when calculating \"{2}\""
|
msgid "cannot find variable \"{0}\" for the information \"{1}\" when calculating \"{2}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:845
|
#: src/rougail/object_model.py:696
|
||||||
msgid "identifier not allowed for the information \"{0}\" when calculating \"{1}\""
|
msgid "identifier not allowed for the information \"{0}\" when calculating \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:898
|
#: src/rougail/object_model.py:747
|
||||||
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\""
|
msgid "\"when\" is not allowed in format version 1.0 for attribute \"{0}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:904 src/rougail/object_model.py:914
|
#: src/rougail/object_model.py:751 src/rougail/object_model.py:759
|
||||||
msgid "the identifier has an invalid attribute \"{0}\", \"when\" and \"when_not\" cannot set together"
|
msgid "the identifier has an invalid attribute \"{0}\", \"when\" and \"when_not\" cannot set together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/object_model.py:939
|
#: src/rougail/object_model.py:782
|
||||||
msgid "the variable \"{0}\" is not a follower, so cannot have index type for \"{1}\""
|
msgid "the variable \"{0}\" is not a follower, so cannot have index type for \"{1}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -340,66 +340,30 @@ msgstr ""
|
||||||
msgid "Directories where extra dictionary files are placed"
|
msgid "Directories where extra dictionary files are placed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/tiramisu.py:187
|
#: src/rougail/tiramisu.py:175
|
||||||
msgid "cannot calculating \"{0}\" attribute for variable \"{1}\" in {2} with parameters \"{3}\": {4}"
|
msgid "cannot calculating \"{0}\" attribute for variable \"{1}\" in {2} with parameters \"{3}\": {4}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/tiramisureflector.py:363
|
#: src/rougail/tiramisureflector.py:364
|
||||||
msgid "internal error, {0} is not a dynamic variable"
|
msgid "internal error, {0} is not a dynamic variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:118
|
#: src/rougail/user_datas.py:116
|
||||||
msgid "cannot load variable path \"{0}\", the identifier \"{1}\" is not valid in {2}"
|
msgid "cannot load variable path \"{0}\", the identifier \"{1}\" is not valid in {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:196
|
#: src/rougail/user_datas.py:171
|
||||||
msgid "the variable \"{0}\" contains secrets and should not be defined in {1}"
|
msgid "the variable \"{0}\" contains secrets and should not be defined in {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:218
|
#: src/rougail/user_datas.py:236
|
||||||
msgid "loaded from {0}"
|
msgid "the variable \"{0}\" is a family, so cannot set the value \"{1}\" in {2}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:258
|
#: src/rougail/user_datas.py:251
|
||||||
msgid "cannot set the value \"{0}\" to the family {1}, it will be ignored when loading from {2}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:270
|
|
||||||
msgid "variable or family \"{0}\" does not exist, it will be ignored when loading from {1}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:276
|
|
||||||
msgid "\"{0}\" is the name of a dynamic family, it will be ignored when loading from {1}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:282
|
|
||||||
msgid "{0} loaded from {1}"
|
msgid "{0} loaded from {1}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:311
|
|
||||||
msgid "variable {0} at index \"{1}\" is {2}, it will be ignored when loading from {3}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:322
|
|
||||||
msgid "family {0} is {1}, {2} at index \"{3}\" will be ignored when loading from {4}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:335
|
|
||||||
msgid "variable {0} is {1}, it will be ignored when loading from {2}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:343
|
|
||||||
msgid "family {0} is {1}, {2} will be ignored when loading from {3}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:362
|
|
||||||
msgid "the value \"{0}\" is invalid for {1} at index \"{2}\", {3}, it will be ignored when loading from {4}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_datas.py:373
|
|
||||||
msgid "the value \"{0}\" is invalid for {1}, {2}, it will be ignored when loading from {3}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/utils.py:55
|
#: src/rougail/utils.py:55
|
||||||
msgid "invalid variable or family name \"{0}\" must only contains lowercase ascii character, number or _"
|
msgid "invalid variable or family name \"{0}\" must only contains lowercase ascii character, number or _"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a24"
|
version = "1.2.0a23"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,7 @@ def tiramisu_display_name(
|
||||||
comment = doc if doc and doc != kls.impl_getname() else ""
|
comment = doc if doc and doc != kls.impl_getname() else ""
|
||||||
if "{{ identifier }}" in comment and subconfig.identifiers:
|
if "{{ identifier }}" in comment and subconfig.identifiers:
|
||||||
comment = comment.replace("{{ identifier }}", str(subconfig.identifiers[-1]))
|
comment = comment.replace("{{ identifier }}", str(subconfig.identifiers[-1]))
|
||||||
path_in_description = values.get_information(
|
path_in_description = values.get_information(context_subconfig, 'path_in_description', True)
|
||||||
context_subconfig, "path_in_description", True
|
|
||||||
)
|
|
||||||
if path_in_description or not comment:
|
if path_in_description or not comment:
|
||||||
comment = f" ({comment})" if comment else ""
|
comment = f" ({comment})" if comment else ""
|
||||||
if path_in_description is False:
|
if path_in_description is False:
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0a24"
|
__version__ = "1.2.0a23"
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,9 @@ class Annotator(Walk):
|
||||||
family.path
|
family.path
|
||||||
)
|
)
|
||||||
self.objectspace.informations.add(family.path, "dynamic_variable", path)
|
self.objectspace.informations.add(family.path, "dynamic_variable", path)
|
||||||
self.objectspace.informations.add(family.path, "ymlfiles", family.xmlfiles)
|
self.objectspace.informations.add(
|
||||||
|
family.path, "ymlfiles", family.xmlfiles
|
||||||
|
)
|
||||||
|
|
||||||
def change_modes(self):
|
def change_modes(self):
|
||||||
"""change the mode of variables"""
|
"""change the mode of variables"""
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,7 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
if isinstance(variable.choices, Calculation):
|
if isinstance(variable.choices, Calculation):
|
||||||
continue
|
continue
|
||||||
if variable.choices is None:
|
if variable.choices is None:
|
||||||
msg = _(
|
msg = _('the variable "{0}" is a "choice" variable but don\'t have any choice').format(variable.path)
|
||||||
'the variable "{0}" is a "choice" variable but don\'t have any choice'
|
|
||||||
).format(variable.path)
|
|
||||||
raise DictConsistencyError(msg, 19, variable.xmlfiles)
|
raise DictConsistencyError(msg, 19, variable.xmlfiles)
|
||||||
if not variable.mandatory and not variable.multi:
|
if not variable.mandatory and not variable.multi:
|
||||||
self.add_choice_nil(variable)
|
self.add_choice_nil(variable)
|
||||||
|
|
@ -134,7 +132,5 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
if variable.type != "regexp":
|
if variable.type != "regexp":
|
||||||
continue
|
continue
|
||||||
if variable.regexp is None:
|
if variable.regexp is None:
|
||||||
msg = _(
|
msg = _('the variable "{0}" is a "regexp" variable but don\'t have any regexp').format(variable.path)
|
||||||
'the variable "{0}" is a "regexp" variable but don\'t have any regexp'
|
|
||||||
).format(variable.path)
|
|
||||||
raise DictConsistencyError(msg, 66, variable.xmlfiles)
|
raise DictConsistencyError(msg, 66, variable.xmlfiles)
|
||||||
|
|
|
||||||
|
|
@ -83,21 +83,13 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
continue
|
continue
|
||||||
path = variable.path
|
path = variable.path
|
||||||
if variable.type not in ["unix_user", "secret"]:
|
if variable.type not in ["unix_user", "secret"]:
|
||||||
msg = _(
|
msg = _('only "unix_user" or "secret" variable type can have "secret_manager" attribute, but "{0}" has type "{1}"')
|
||||||
'only "unix_user" or "secret" variable type can have "secret_manager" attribute, but "{0}" has type "{1}"'
|
raise DictConsistencyError(msg.format(path, variable.type), 56, variable.xmlfiles)
|
||||||
)
|
|
||||||
raise DictConsistencyError(
|
|
||||||
msg.format(path, variable.type), 56, variable.xmlfiles
|
|
||||||
)
|
|
||||||
if variable.multi and path not in self.objectspace.leaders:
|
if variable.multi and path not in self.objectspace.leaders:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has attribute "secret_manager" but is a multi variable')
|
||||||
'the variable "{0}" has attribute "secret_manager" but is a multi variable'
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg.format(path), 57, variable.xmlfiles)
|
raise DictConsistencyError(msg.format(path), 57, variable.xmlfiles)
|
||||||
if variable.default is not None:
|
if variable.default is not None:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has attribute "secret_manager" so must not have default value')
|
||||||
'the variable "{0}" has attribute "secret_manager" so must not have default value'
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg.format(path), 59, variable.xmlfiles)
|
raise DictConsistencyError(msg.format(path), 59, variable.xmlfiles)
|
||||||
|
|
||||||
def convert_variable(self):
|
def convert_variable(self):
|
||||||
|
|
@ -114,11 +106,9 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
self.objectspace.informations.add(
|
self.objectspace.informations.add(
|
||||||
variable.path, "ymlfiles", variable.xmlfiles
|
variable.path, "ymlfiles", variable.xmlfiles
|
||||||
)
|
)
|
||||||
if variable.version != "1.0" and isinstance(
|
if variable.version != '1.0' and isinstance(variable.default, VariableCalculation):
|
||||||
variable.default, VariableCalculation
|
calculated_variable_path, calculated_variable, identifier = variable.default.get_variable(
|
||||||
):
|
self.objectspace
|
||||||
calculated_variable_path, calculated_variable, identifier = (
|
|
||||||
variable.default.get_variable(self.objectspace)
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
calculated_variable = None
|
calculated_variable = None
|
||||||
|
|
@ -154,27 +144,15 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
return
|
return
|
||||||
if variable.path in self.objectspace.leaders:
|
if variable.path in self.objectspace.leaders:
|
||||||
variable.multi = self.objectspace.multis[variable.path] = True
|
variable.multi = self.objectspace.multis[variable.path] = True
|
||||||
elif variable.version != "1.0" and isinstance(
|
elif variable.version != "1.0" and isinstance(variable.default, VariableCalculation):
|
||||||
variable.default, VariableCalculation
|
calculated_variable_path, calculated_variable, identifier = variable.default.get_variable(
|
||||||
):
|
self.objectspace
|
||||||
calculated_variable_path, calculated_variable, identifier = (
|
|
||||||
variable.default.get_variable(self.objectspace)
|
|
||||||
)
|
)
|
||||||
if calculated_variable is not None:
|
if calculated_variable is not None:
|
||||||
if calculated_variable.multi is None:
|
if calculated_variable.multi is None:
|
||||||
self._convert_variable_multi(calculated_variable)
|
self._convert_variable_multi(calculated_variable)
|
||||||
variable.multi = calc_multi_for_type_variable(
|
variable.multi = calc_multi_for_type_variable(variable, calculated_variable_path, calculated_variable, self.objectspace)[1]
|
||||||
variable,
|
if calculated_variable.path in self.objectspace.followers and variable.mandatory is calculated_variable.mandatory is False and calculated_variable.path.rsplit(".", 1)[0] != variable.path.rsplit(".", 1)[0]:
|
||||||
calculated_variable_path,
|
|
||||||
calculated_variable,
|
|
||||||
self.objectspace,
|
|
||||||
)[1]
|
|
||||||
if (
|
|
||||||
calculated_variable.path in self.objectspace.followers
|
|
||||||
and variable.mandatory is calculated_variable.mandatory is False
|
|
||||||
and calculated_variable.path.rsplit(".", 1)[0]
|
|
||||||
!= variable.path.rsplit(".", 1)[0]
|
|
||||||
):
|
|
||||||
variable.empty = False
|
variable.empty = False
|
||||||
else:
|
else:
|
||||||
variable.multi = isinstance(variable.default, list)
|
variable.multi = isinstance(variable.default, list)
|
||||||
|
|
@ -185,18 +163,15 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
calculated_variable,
|
calculated_variable,
|
||||||
) -> None:
|
) -> None:
|
||||||
# if a variable has a variable as default value, that means the type/params or multi should has same value
|
# if a variable has a variable as default value, that means the type/params or multi should has same value
|
||||||
if (
|
if not isinstance(variable.default, VariableCalculation) or variable.type is not None:
|
||||||
not isinstance(variable.default, VariableCalculation)
|
|
||||||
or variable.type is not None
|
|
||||||
):
|
|
||||||
return
|
return
|
||||||
# copy type and params
|
# copy type and params
|
||||||
variable.type = calculated_variable.type
|
variable.type = calculated_variable.type
|
||||||
if variable.params is None and calculated_variable.params is not None:
|
if variable.params is None and calculated_variable.params is not None:
|
||||||
variable.params = calculated_variable.params
|
variable.params = calculated_variable.params
|
||||||
if variable.type == "choice" and variable.choices is None:
|
if variable.type == 'choice' and variable.choices is None:
|
||||||
variable.choices = calculated_variable.choices
|
variable.choices = calculated_variable.choices
|
||||||
if variable.type == "regexp" and variable.regexp is None:
|
if variable.type == 'regexp' and variable.regexp is None:
|
||||||
variable.regexp = calculated_variable.regexp
|
variable.regexp = calculated_variable.regexp
|
||||||
|
|
||||||
def _convert_variable(
|
def _convert_variable(
|
||||||
|
|
|
||||||
|
|
@ -409,8 +409,7 @@ secret_manager:
|
||||||
rougail_process += """ {% if _.output is not propertyerror and _.output == 'NAME' %}
|
rougail_process += """ {% if _.output is not propertyerror and _.output == 'NAME' %}
|
||||||
Cannot load structural for NAME output
|
Cannot load structural for NAME output
|
||||||
{% endif %}
|
{% endif %}
|
||||||
""".replace(
|
""".replace("NAME", hidden_output
|
||||||
"NAME", hidden_output
|
|
||||||
)
|
)
|
||||||
elif process == "user data":
|
elif process == "user data":
|
||||||
rougail_process += """ multi: true
|
rougail_process += """ multi: true
|
||||||
|
|
@ -476,7 +475,7 @@ default_params:
|
||||||
mandatory: false
|
mandatory: false
|
||||||
default: {value}
|
default: {value}
|
||||||
"""
|
"""
|
||||||
# print(rougail_process)
|
# print(rougail_process)
|
||||||
rougail_options += rougail_process
|
rougail_options += rougail_process
|
||||||
convert = FakeRougailConvert(add_extra_options)
|
convert = FakeRougailConvert(add_extra_options)
|
||||||
convert.init()
|
convert.init()
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ class ParserVariable:
|
||||||
self.output = None
|
self.output = None
|
||||||
self.tiramisu_cache = rougailconfig["tiramisu_cache"]
|
self.tiramisu_cache = rougailconfig["tiramisu_cache"]
|
||||||
self.load_unexist_redefine = rougailconfig["load_unexist_redefine"]
|
self.load_unexist_redefine = rougailconfig["load_unexist_redefine"]
|
||||||
self.secret_pattern = rougailconfig["secret_manager.pattern"]
|
self.secret_pattern = rougailconfig['secret_manager.pattern']
|
||||||
# change default initkwargs in CONVERT_OPTION
|
# change default initkwargs in CONVERT_OPTION
|
||||||
if hasattr(rougailconfig, "config"):
|
if hasattr(rougailconfig, "config"):
|
||||||
for sub_od in rougailconfig.config.option("default_params"):
|
for sub_od in rougailconfig.config.option("default_params"):
|
||||||
|
|
@ -505,7 +505,7 @@ class ParserVariable:
|
||||||
for key, value in obj.items():
|
for key, value in obj.items():
|
||||||
if not isinstance(key, str):
|
if not isinstance(key, str):
|
||||||
raise DictConsistencyError(
|
raise DictConsistencyError(
|
||||||
f"a key is not in string format: {key}",
|
f'a key is not in string format: {key}',
|
||||||
103,
|
103,
|
||||||
[filename],
|
[filename],
|
||||||
)
|
)
|
||||||
|
|
@ -648,8 +648,7 @@ class ParserVariable:
|
||||||
raise DictConsistencyError(
|
raise DictConsistencyError(
|
||||||
f'"{path}" is not a valid variable, there are additional '
|
f'"{path}" is not a valid variable, there are additional '
|
||||||
f'attributes: "{", ".join(extra_attrs)}"',
|
f'attributes: "{", ".join(extra_attrs)}"',
|
||||||
65,
|
65, [filename]
|
||||||
[filename],
|
|
||||||
)
|
)
|
||||||
self.parse_parameters(
|
self.parse_parameters(
|
||||||
path,
|
path,
|
||||||
|
|
@ -688,7 +687,9 @@ class ParserVariable:
|
||||||
msg = f'cannot redefine the inexisting variable "{path}"'
|
msg = f'cannot redefine the inexisting variable "{path}"'
|
||||||
raise DictConsistencyError(msg, 46, [filename])
|
raise DictConsistencyError(msg, 46, [filename])
|
||||||
obj["path"] = path
|
obj["path"] = path
|
||||||
self.add_variable(name, obj, filename, family_is_dynamic, parent_dynamic)
|
self.add_variable(
|
||||||
|
name, obj, filename, family_is_dynamic, parent_dynamic
|
||||||
|
)
|
||||||
if family_is_leadership:
|
if family_is_leadership:
|
||||||
if first_variable:
|
if first_variable:
|
||||||
self.leaders.append(path)
|
self.leaders.append(path)
|
||||||
|
|
@ -802,8 +803,7 @@ class ParserVariable:
|
||||||
64,
|
64,
|
||||||
[filename],
|
[filename],
|
||||||
)
|
)
|
||||||
secret_manager = {
|
secret_manager = {"type": "jinja",
|
||||||
"type": "jinja",
|
|
||||||
"jinja": self.secret_pattern,
|
"jinja": self.secret_pattern,
|
||||||
"params": obj["secret_manager"],
|
"params": obj["secret_manager"],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -151,9 +151,7 @@ class Param(BaseModel):
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|
||||||
def to_param(
|
def to_param(self, attribute_name, objectspace, path, version, namespace, xmlfiles) -> dict:
|
||||||
self, attribute_name, objectspace, path, version, namespace, xmlfiles
|
|
||||||
) -> dict:
|
|
||||||
return self.model_dump()
|
return self.model_dump()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -169,12 +167,8 @@ class VariableParam(Param):
|
||||||
whole: bool = False
|
whole: bool = False
|
||||||
optional: bool = False
|
optional: bool = False
|
||||||
|
|
||||||
def to_param(
|
def to_param(self, attribute_name, objectspace, path, version, namespace, xmlfiles) -> dict:
|
||||||
self, attribute_name, objectspace, path, version, namespace, xmlfiles
|
param = super().to_param(attribute_name, objectspace, path, version, namespace, xmlfiles)
|
||||||
) -> dict:
|
|
||||||
param = super().to_param(
|
|
||||||
attribute_name, objectspace, path, version, namespace, xmlfiles
|
|
||||||
)
|
|
||||||
variable, identifier = objectspace.paths.get_with_dynamic(
|
variable, identifier = objectspace.paths.get_with_dynamic(
|
||||||
param["variable"],
|
param["variable"],
|
||||||
path,
|
path,
|
||||||
|
|
@ -184,20 +178,14 @@ class VariableParam(Param):
|
||||||
)
|
)
|
||||||
if not variable:
|
if not variable:
|
||||||
if not param.get("optional"):
|
if not param.get("optional"):
|
||||||
msg = _(
|
msg = _('cannot find variable "{0}" defined in attribute "{1}" for "{2}"').format(param["variable"], attribute_name, path)
|
||||||
'cannot find variable "{0}" defined in attribute "{1}" for "{2}"'
|
|
||||||
).format(param["variable"], attribute_name, path)
|
|
||||||
raise DictConsistencyError(msg, 22, xmlfiles)
|
raise DictConsistencyError(msg, 22, xmlfiles)
|
||||||
return None
|
return None
|
||||||
if isinstance(variable, objectspace.family):
|
if isinstance(variable, objectspace.family):
|
||||||
msg = _(
|
msg = _('the variable "{0}" is in fact a family in attribute "{1}" for "{2}"').format(variable["name"], attribute_name, path)
|
||||||
'the variable "{0}" is in fact a family in attribute "{1}" for "{2}"'
|
|
||||||
).format(variable["name"], attribute_name, path)
|
|
||||||
raise DictConsistencyError(msg, 42, xmlfiles)
|
raise DictConsistencyError(msg, 42, xmlfiles)
|
||||||
if not isinstance(variable, objectspace.variable):
|
if not isinstance(variable, objectspace.variable):
|
||||||
msg = _('unknown object "{0}" in attribute "{1}" for "{2}"').format(
|
msg = _('unknown object "{0}" in attribute "{1}" for "{2}"').format(variable, attribute_name, path)
|
||||||
variable, attribute_name, path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 44, xmlfiles)
|
raise DictConsistencyError(msg, 44, xmlfiles)
|
||||||
param["variable"] = variable
|
param["variable"] = variable
|
||||||
if identifier:
|
if identifier:
|
||||||
|
|
@ -214,9 +202,7 @@ class IdentifierParam(Param):
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> None:
|
) -> None:
|
||||||
if not kwargs["family_is_dynamic"]:
|
if not kwargs["family_is_dynamic"]:
|
||||||
msg = _(
|
msg = _('identifier parameter for "{0}" in "{1}" cannot be set none dynamic family').format(kwargs["attribute"], kwargs["path"])
|
||||||
'identifier parameter for "{0}" in "{1}" cannot be set none dynamic family'
|
|
||||||
).format(kwargs["attribute"], kwargs["path"])
|
|
||||||
raise DictConsistencyError(msg, 10, kwargs["xmlfiles"])
|
raise DictConsistencyError(msg, 10, kwargs["xmlfiles"])
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|
||||||
|
|
@ -226,12 +212,8 @@ class InformationParam(Param):
|
||||||
information: str
|
information: str
|
||||||
variable: Optional[str] = None
|
variable: Optional[str] = None
|
||||||
|
|
||||||
def to_param(
|
def to_param(self, attribute_name, objectspace, path, version, namespace, xmlfiles) -> dict:
|
||||||
self, attribute_name, objectspace, path, version, namespace, xmlfiles
|
param = super().to_param(attribute_name, objectspace, path, version, namespace, xmlfiles)
|
||||||
) -> dict:
|
|
||||||
param = super().to_param(
|
|
||||||
attribute_name, objectspace, path, version, namespace, xmlfiles
|
|
||||||
)
|
|
||||||
if not param["variable"]:
|
if not param["variable"]:
|
||||||
del param["variable"]
|
del param["variable"]
|
||||||
return param
|
return param
|
||||||
|
|
@ -243,14 +225,10 @@ class InformationParam(Param):
|
||||||
xmlfiles,
|
xmlfiles,
|
||||||
)
|
)
|
||||||
if not variable:
|
if not variable:
|
||||||
msg = _('cannot find variable "{0}" defined in "{1}" for "{2}"').format(
|
msg = _('cannot find variable "{0}" defined in "{1}" for "{2}"').format(param["variable"], attribute_name, path)
|
||||||
param["variable"], attribute_name, path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 14, xmlfiles)
|
raise DictConsistencyError(msg, 14, xmlfiles)
|
||||||
if identifier:
|
if identifier:
|
||||||
msg = _(
|
msg = _('variable "{0}" defined in "{1}" for "{2}" is a dynamic variable').format(param["variable"], attribute_name, path)
|
||||||
'variable "{0}" defined in "{1}" for "{2}" is a dynamic variable'
|
|
||||||
).format(param["variable"], attribute_name, path)
|
|
||||||
raise DictConsistencyError(msg, 15, xmlfiles)
|
raise DictConsistencyError(msg, 15, xmlfiles)
|
||||||
param["variable"] = variable
|
param["variable"] = variable
|
||||||
return param
|
return param
|
||||||
|
|
@ -259,38 +237,26 @@ class InformationParam(Param):
|
||||||
class IndexParam(Param):
|
class IndexParam(Param):
|
||||||
type: str
|
type: str
|
||||||
|
|
||||||
def to_param(
|
def to_param(self, attribute_name, objectspace, path, version, namespace, xmlfiles) -> dict:
|
||||||
self, attribute_name, objectspace, path, version, namespace, xmlfiles
|
if path not in objectspace.followers and (attribute_name != 'validators' or path not in objectspace.multis):
|
||||||
) -> dict:
|
msg = _('the variable "{0}" is not a follower, so cannot have index type for param in "{1}"').format(path, attribute)
|
||||||
if path not in objectspace.followers and (
|
|
||||||
attribute_name != "validators" or path not in objectspace.multis
|
|
||||||
):
|
|
||||||
msg = _(
|
|
||||||
'the variable "{0}" is not a follower, so cannot have index type for param in "{1}"'
|
|
||||||
).format(path, attribute)
|
|
||||||
raise DictConsistencyError(msg, 25, xmlfiles)
|
raise DictConsistencyError(msg, 25, xmlfiles)
|
||||||
return super().to_param(
|
return super().to_param(attribute_name, objectspace, path, version, namespace, xmlfiles)
|
||||||
attribute_name, objectspace, path, version, namespace, xmlfiles
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class NamespaceParam(Param):
|
class NamespaceParam(Param):
|
||||||
type: str
|
type: str
|
||||||
namespace: str
|
namespace: str
|
||||||
|
|
||||||
def to_param(
|
def to_param(self, attribute_name, objectspace, path, version, namespace, xmlfiles) -> dict:
|
||||||
self, attribute_name, objectspace, path, version, namespace, xmlfiles
|
|
||||||
) -> dict:
|
|
||||||
namespace = self.namespace
|
namespace = self.namespace
|
||||||
if namespace:
|
if namespace:
|
||||||
namespace = objectspace.paths[namespace].description
|
namespace = objectspace.paths[namespace].description
|
||||||
return {
|
return {'type': 'any',
|
||||||
"type": "any",
|
'value': namespace,
|
||||||
"value": namespace,
|
'key': self.key,
|
||||||
"key": self.key,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PARAM_TYPES = {
|
PARAM_TYPES = {
|
||||||
"any": AnyParam,
|
"any": AnyParam,
|
||||||
"variable": VariableParam,
|
"variable": VariableParam,
|
||||||
|
|
@ -321,14 +287,7 @@ class Calculation(BaseModel):
|
||||||
path = self.ori_path
|
path = self.ori_path
|
||||||
params = {}
|
params = {}
|
||||||
for param_obj in self.params:
|
for param_obj in self.params:
|
||||||
param = param_obj.to_param(
|
param = param_obj.to_param(self.attribute_name, objectspace, path, self.version, self.namespace, self.xmlfiles)
|
||||||
self.attribute_name,
|
|
||||||
objectspace,
|
|
||||||
path,
|
|
||||||
self.version,
|
|
||||||
self.namespace,
|
|
||||||
self.xmlfiles,
|
|
||||||
)
|
|
||||||
if param is None:
|
if param is None:
|
||||||
continue
|
continue
|
||||||
params[param.pop("key")] = param
|
params[param.pop("key")] = param
|
||||||
|
|
@ -495,17 +454,13 @@ class _VariableCalculation(Calculation):
|
||||||
path = self.path
|
path = self.path
|
||||||
else:
|
else:
|
||||||
path = self.ori_path
|
path = self.ori_path
|
||||||
if self.version != "1.0" and objectspace.paths.regexp_relative.search(
|
if self.version != "1.0" and objectspace.paths.regexp_relative.search(self.variable):
|
||||||
self.variable
|
|
||||||
):
|
|
||||||
variable_full_path = objectspace.paths.get_full_path(
|
variable_full_path = objectspace.paths.get_full_path(
|
||||||
self.variable,
|
self.variable,
|
||||||
path,
|
path,
|
||||||
)
|
)
|
||||||
elif self.version == "1.0" and "{{ suffix }}" in self.variable:
|
elif self.version == "1.0" and "{{ suffix }}" in self.variable:
|
||||||
variable_full_path = self.variable.replace(
|
variable_full_path = self.variable.replace("{{ suffix }}", "{{ identifier }}")
|
||||||
"{{ suffix }}", "{{ identifier }}"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
variable_full_path = self.variable
|
variable_full_path = self.variable
|
||||||
variable, identifier = objectspace.paths.get_with_dynamic(
|
variable, identifier = objectspace.paths.get_with_dynamic(
|
||||||
|
|
@ -517,14 +472,10 @@ class _VariableCalculation(Calculation):
|
||||||
)
|
)
|
||||||
if variable and not isinstance(variable, objectspace.variable):
|
if variable and not isinstance(variable, objectspace.variable):
|
||||||
if isinstance(variable, objectspace.family):
|
if isinstance(variable, objectspace.family):
|
||||||
msg = _(
|
msg = _('a variable "{0}" is needs in attribute "{1}" for "{2}" but it\'s a family').format(variable_full_path, self.attribute_name, self.path)
|
||||||
'a variable "{0}" is needs in attribute "{1}" for "{2}" but it\'s a family'
|
|
||||||
).format(variable_full_path, self.attribute_name, self.path)
|
|
||||||
raise DictConsistencyError(msg, 47, self.xmlfiles)
|
raise DictConsistencyError(msg, 47, self.xmlfiles)
|
||||||
else:
|
else:
|
||||||
msg = _('unknown object "{0}" in attribute "{1}" for "{2}"').format(
|
msg = _('unknown object "{0}" in attribute "{1}" for "{2}"').format(variable, self.attribute_name, self.path)
|
||||||
variable, self.attribute_name, self.path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 48, self.xmlfiles)
|
raise DictConsistencyError(msg, 48, self.xmlfiles)
|
||||||
return variable_full_path, variable, identifier
|
return variable_full_path, variable, identifier
|
||||||
|
|
||||||
|
|
@ -541,9 +492,7 @@ class _VariableCalculation(Calculation):
|
||||||
path = self.path
|
path = self.path
|
||||||
else:
|
else:
|
||||||
path = self.ori_path
|
path = self.ori_path
|
||||||
msg = _(
|
msg = _('variable "{0}" has an attribute "{1}" calculated with the unknown variable "{2}"').format(path, self.attribute_name, self.variable)
|
||||||
'variable "{0}" has an attribute "{1}" calculated with the unknown variable "{2}"'
|
|
||||||
).format(path, self.attribute_name, self.variable)
|
|
||||||
raise DictConsistencyError(msg, 88, self.xmlfiles)
|
raise DictConsistencyError(msg, 88, self.xmlfiles)
|
||||||
return {None: [["example"]]}
|
return {None: [["example"]]}
|
||||||
param = {
|
param = {
|
||||||
|
|
@ -560,9 +509,7 @@ class _VariableCalculation(Calculation):
|
||||||
params["__default_value"] = self.default_values
|
params["__default_value"] = self.default_values
|
||||||
if self.allow_none:
|
if self.allow_none:
|
||||||
params["allow_none"] = True
|
params["allow_none"] = True
|
||||||
self.check_multi(
|
self.check_multi(objectspace, variable_in_calculation_path, variable_in_calculation)
|
||||||
objectspace, variable_in_calculation_path, variable_in_calculation
|
|
||||||
)
|
|
||||||
if self.path in objectspace.followers:
|
if self.path in objectspace.followers:
|
||||||
multi = objectspace.multis[self.path] == "submulti"
|
multi = objectspace.multis[self.path] == "submulti"
|
||||||
else:
|
else:
|
||||||
|
|
@ -571,123 +518,51 @@ class _VariableCalculation(Calculation):
|
||||||
params["__internal_multi"] = True
|
params["__internal_multi"] = True
|
||||||
return params
|
return params
|
||||||
|
|
||||||
def check_multi(
|
def check_multi(self, objectspace, variable_in_calculation_path, variable_in_calculation):
|
||||||
self, objectspace, variable_in_calculation_path, variable_in_calculation
|
|
||||||
):
|
|
||||||
if self.ori_path is None:
|
if self.ori_path is None:
|
||||||
path = self.path
|
path = self.path
|
||||||
else:
|
else:
|
||||||
path = self.ori_path
|
path = self.ori_path
|
||||||
local_variable = objectspace.paths[path]
|
local_variable = objectspace.paths[path]
|
||||||
local_variable_multi, variable_in_calculation_multi = (
|
local_variable_multi, variable_in_calculation_multi = calc_multi_for_type_variable(local_variable, variable_in_calculation_path, variable_in_calculation, objectspace)
|
||||||
calc_multi_for_type_variable(
|
|
||||||
local_variable,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation,
|
|
||||||
objectspace,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if self.attribute_name == "default":
|
if self.attribute_name == "default":
|
||||||
if variable_in_calculation_multi == "submulti":
|
if variable_in_calculation_multi == 'submulti':
|
||||||
if objectspace.paths.is_dynamic(variable_in_calculation.path):
|
if objectspace.paths.is_dynamic(variable_in_calculation.path):
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid "{1}" the variable "{2}" is in a sub dynamic option').format(local_variable.path, self.attribute_name, variable_in_calculation.path)
|
||||||
'the variable "{0}" has an invalid "{1}" the variable "{2}" is in a sub dynamic option'
|
|
||||||
).format(
|
|
||||||
local_variable.path,
|
|
||||||
self.attribute_name,
|
|
||||||
variable_in_calculation.path,
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 69, self.xmlfiles)
|
raise DictConsistencyError(msg, 69, self.xmlfiles)
|
||||||
else:
|
else:
|
||||||
msg = _(
|
msg = _('the leader "{0}" has an invalid "{1}" the follower "{2}" is a multi').format(local_variable.path, self.attribute_name, variable_in_calculation.path)
|
||||||
'the leader "{0}" has an invalid "{1}" the follower "{2}" is a multi'
|
|
||||||
).format(
|
|
||||||
local_variable.path,
|
|
||||||
self.attribute_name,
|
|
||||||
variable_in_calculation.path,
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 74, self.xmlfiles)
|
raise DictConsistencyError(msg, 74, self.xmlfiles)
|
||||||
if not self.inside_list:
|
if not self.inside_list:
|
||||||
if local_variable_multi != variable_in_calculation_multi:
|
if local_variable_multi != variable_in_calculation_multi:
|
||||||
if local_variable_multi:
|
if local_variable_multi:
|
||||||
self.check_variable_in_calculation_multi(
|
self.check_variable_in_calculation_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
|
||||||
local_variable.path,
|
self.check_variable_in_calculation_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
)
|
|
||||||
self.check_variable_in_calculation_not_multi(
|
|
||||||
local_variable.path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
self.check_variable_in_calculation_in_list_not_multi(
|
self.check_variable_in_calculation_in_list_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
|
||||||
local_variable.path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
)
|
|
||||||
elif self.attribute_name in ["choices", "dynamic"]:
|
elif self.attribute_name in ["choices", "dynamic"]:
|
||||||
# calculated variable must be a multi
|
# calculated variable must be a multi
|
||||||
if not self.inside_list:
|
if not self.inside_list:
|
||||||
self.check_variable_in_calculation_multi(
|
self.check_variable_in_calculation_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
|
||||||
local_variable.path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
self.check_variable_in_calculation_in_list_not_multi(
|
self.check_variable_in_calculation_in_list_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
|
||||||
local_variable.path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
)
|
|
||||||
elif variable_in_calculation_multi is True:
|
elif variable_in_calculation_multi is True:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" must not be multi').format(local_variable.path, self.attribute_name, variable_in_calculation_path)
|
||||||
'the variable "{0}" has an invalid attribute "{1}", the variable "{2}" must not be multi'
|
|
||||||
).format(
|
|
||||||
local_variable.path, self.attribute_name, variable_in_calculation_path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 23, self.xmlfiles)
|
raise DictConsistencyError(msg, 23, self.xmlfiles)
|
||||||
|
|
||||||
def check_variable_in_calculation_multi(
|
def check_variable_in_calculation_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
|
||||||
self,
|
|
||||||
local_variable_path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
):
|
|
||||||
if variable_in_calculation_multi is False:
|
if variable_in_calculation_multi is False:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable must not be a multi or the variable "{2}" must be multi').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
|
||||||
'the variable "{0}" has an invalid attribute "{1}", the variable must not be a multi or the variable "{2}" must be multi'
|
|
||||||
).format(
|
|
||||||
local_variable_path, self.attribute_name, variable_in_calculation_path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 20, self.xmlfiles)
|
raise DictConsistencyError(msg, 20, self.xmlfiles)
|
||||||
|
|
||||||
def check_variable_in_calculation_not_multi(
|
def check_variable_in_calculation_not_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
|
||||||
self,
|
|
||||||
local_variable_path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
):
|
|
||||||
if variable_in_calculation_multi is True:
|
if variable_in_calculation_multi is True:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable must be a multi or the variable "{2}" must not be multi').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
|
||||||
'the variable "{0}" has an invalid attribute "{1}", the variable must be a multi or the variable "{2}" must not be multi'
|
|
||||||
).format(
|
|
||||||
local_variable_path, self.attribute_name, variable_in_calculation_path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 21, self.xmlfiles)
|
raise DictConsistencyError(msg, 21, self.xmlfiles)
|
||||||
|
|
||||||
def check_variable_in_calculation_in_list_not_multi(
|
def check_variable_in_calculation_in_list_not_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
|
||||||
self,
|
|
||||||
local_variable_path,
|
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation_multi,
|
|
||||||
):
|
|
||||||
if variable_in_calculation_multi is True:
|
if variable_in_calculation_multi is True:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is multi but is inside a list').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
|
||||||
'the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is multi but is inside a list'
|
|
||||||
).format(
|
|
||||||
local_variable_path, self.attribute_name, variable_in_calculation_path
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 18, self.xmlfiles)
|
raise DictConsistencyError(msg, 18, self.xmlfiles)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -701,15 +576,9 @@ class VariableCalculation(_VariableCalculation):
|
||||||
objectspace,
|
objectspace,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
if self.attribute_name != "default" and self.optional:
|
if self.attribute_name != "default" and self.optional:
|
||||||
msg = _(
|
msg = _('"{0}" attribut shall not have an "optional" attribute for variable "{1}"').format(self.attribute_name, self.variable)
|
||||||
'"{0}" attribut shall not have an "optional" attribute for variable "{1}"'
|
|
||||||
).format(self.attribute_name, self.variable)
|
|
||||||
raise DictConsistencyError(msg, 33, self.xmlfiles)
|
raise DictConsistencyError(msg, 33, self.xmlfiles)
|
||||||
(
|
variable_in_calculation_path, variable_in_calculation, variable_in_calculation_identifier = self.get_variable(objectspace)
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation,
|
|
||||||
variable_in_calculation_identifier,
|
|
||||||
) = self.get_variable(objectspace)
|
|
||||||
if (
|
if (
|
||||||
not variable_in_calculation
|
not variable_in_calculation
|
||||||
and self.optional
|
and self.optional
|
||||||
|
|
@ -718,12 +587,8 @@ class VariableCalculation(_VariableCalculation):
|
||||||
raise VariableCalculationDependencyError()
|
raise VariableCalculationDependencyError()
|
||||||
if variable_in_calculation and self.attribute_name == "default":
|
if variable_in_calculation and self.attribute_name == "default":
|
||||||
local_variable = objectspace.paths[self.path]
|
local_variable = objectspace.paths[self.path]
|
||||||
if CONVERT_OPTION.get(local_variable.type, {}).get(
|
if CONVERT_OPTION.get(local_variable.type, {}).get("func", str) != CONVERT_OPTION.get(variable_in_calculation.type, {}).get("func", str):
|
||||||
"func", str
|
msg = _('variable "{0}" has a default value calculated with "{1}" which has incompatible type').format(self.path, self.variable)
|
||||||
) != CONVERT_OPTION.get(variable_in_calculation.type, {}).get("func", str):
|
|
||||||
msg = _(
|
|
||||||
'variable "{0}" has a default value calculated with "{1}" which has incompatible type'
|
|
||||||
).format(self.path, self.variable)
|
|
||||||
raise DictConsistencyError(msg, 67, self.xmlfiles)
|
raise DictConsistencyError(msg, 67, self.xmlfiles)
|
||||||
params = self.get_params(
|
params = self.get_params(
|
||||||
objectspace,
|
objectspace,
|
||||||
|
|
@ -748,41 +613,29 @@ class VariablePropertyCalculation(_VariableCalculation):
|
||||||
self,
|
self,
|
||||||
objectspace,
|
objectspace,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
(
|
variable_in_calculation_path, variable_in_calculation, variable_in_calculation_identifier = self.get_variable(objectspace)
|
||||||
variable_in_calculation_path,
|
|
||||||
variable_in_calculation,
|
|
||||||
variable_in_calculation_identifier,
|
|
||||||
) = self.get_variable(objectspace)
|
|
||||||
params = self.get_params(
|
params = self.get_params(
|
||||||
objectspace,
|
objectspace,
|
||||||
variable_in_calculation_path,
|
variable_in_calculation_path,
|
||||||
variable_in_calculation,
|
variable_in_calculation,
|
||||||
variable_in_calculation_identifier,
|
variable_in_calculation_identifier,
|
||||||
)
|
)
|
||||||
if objectspace.force_optional and (
|
if objectspace.force_optional and (not params[None] or "variable" not in params[None][0]):
|
||||||
not params[None] or "variable" not in params[None][0]
|
|
||||||
):
|
|
||||||
params = {None: [None, None, False]}
|
params = {None: [None, None, False]}
|
||||||
else:
|
else:
|
||||||
variable = params[None][0]["variable"]
|
variable = params[None][0]["variable"]
|
||||||
if self.when is not undefined:
|
if self.when is not undefined:
|
||||||
if self.version == "1.0":
|
if self.version == "1.0":
|
||||||
msg = _(
|
msg = _('"when" is not allowed in format version 1.0 for attribute "{0}" for variable "{1}"').format(self.attribute_name, self.path)
|
||||||
'"when" is not allowed in format version 1.0 for attribute "{0}" for variable "{1}"'
|
|
||||||
).format(self.attribute_name, self.path)
|
|
||||||
raise DictConsistencyError(msg, 103, variable.xmlfiles)
|
raise DictConsistencyError(msg, 103, variable.xmlfiles)
|
||||||
if self.when_not is not undefined:
|
if self.when_not is not undefined:
|
||||||
msg = _(
|
msg = _('the variable "{0}" has an invalid attribute "{1}", "when" and "when_not" cannot set together').format(self.path, self.attribute_name)
|
||||||
'the variable "{0}" has an invalid attribute "{1}", "when" and "when_not" cannot set together'
|
|
||||||
).format(self.path, self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 31, variable.xmlfiles)
|
raise DictConsistencyError(msg, 31, variable.xmlfiles)
|
||||||
when = self.when
|
when = self.when
|
||||||
inverse = False
|
inverse = False
|
||||||
elif self.when_not is not undefined:
|
elif self.when_not is not undefined:
|
||||||
if self.version == "1.0":
|
if self.version == "1.0":
|
||||||
msg = _(
|
msg = _('"when_not" is not allowed in format version 1.0 for attribute "{0}" for variable "{1}"').format(self.attribute_name, self.path)
|
||||||
'"when_not" is not allowed in format version 1.0 for attribute "{0}" for variable "{1}"'
|
|
||||||
).format(self.attribute_name, self.path)
|
|
||||||
raise DictConsistencyError(msg, 104, variable.xmlfiles)
|
raise DictConsistencyError(msg, 104, variable.xmlfiles)
|
||||||
when = self.when_not
|
when = self.when_not
|
||||||
inverse = True
|
inverse = True
|
||||||
|
|
@ -797,7 +650,7 @@ class VariablePropertyCalculation(_VariableCalculation):
|
||||||
params["when"] = when
|
params["when"] = when
|
||||||
params["inverse"] = inverse
|
params["inverse"] = inverse
|
||||||
params[None].insert(0, self.attribute_name)
|
params[None].insert(0, self.attribute_name)
|
||||||
func = "variable_to_property"
|
func = 'variable_to_property'
|
||||||
return {
|
return {
|
||||||
"function": func,
|
"function": func,
|
||||||
"params": params,
|
"params": params,
|
||||||
|
|
@ -837,14 +690,10 @@ class InformationCalculation(Calculation):
|
||||||
)
|
)
|
||||||
if variable is None:
|
if variable is None:
|
||||||
if not objectspace.force_optional:
|
if not objectspace.force_optional:
|
||||||
msg = _(
|
msg = _('cannot find variable "{0}" for the information "{1}" when calculating "{2}"').format(self.variable, self.information, self.attribute_name)
|
||||||
'cannot find variable "{0}" for the information "{1}" when calculating "{2}"'
|
|
||||||
).format(self.variable, self.information, self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 40, variable.xmlfiles)
|
raise DictConsistencyError(msg, 40, variable.xmlfiles)
|
||||||
if identifier is not None:
|
if identifier is not None:
|
||||||
msg = _(
|
msg = _('identifier not allowed for the information "{0}" when calculating "{1}"').format(self.information, self.attribute_name)
|
||||||
'identifier not allowed for the information "{0}" when calculating "{1}"'
|
|
||||||
).format(self.information, self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 41, variable.xmlfiles)
|
raise DictConsistencyError(msg, 41, variable.xmlfiles)
|
||||||
if variable:
|
if variable:
|
||||||
params[None][0]["variable"] = variable
|
params[None][0]["variable"] = variable
|
||||||
|
|
@ -895,15 +744,11 @@ class IdentifierPropertyCalculation(_IdentifierCalculation):
|
||||||
objectspace,
|
objectspace,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
if self.version == "1.0":
|
if self.version == "1.0":
|
||||||
msg = _(
|
msg = _('"when" is not allowed in format version 1.0 for attribute "{0}"').format(self.attribute_name)
|
||||||
'"when" is not allowed in format version 1.0 for attribute "{0}"'
|
|
||||||
).format(self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 105, variable.xmlfiles)
|
raise DictConsistencyError(msg, 105, variable.xmlfiles)
|
||||||
if self.when is not undefined:
|
if self.when is not undefined:
|
||||||
if self.when_not is not undefined:
|
if self.when_not is not undefined:
|
||||||
msg = _(
|
msg = _('the identifier has an invalid attribute "{0}", "when" and "when_not" cannot set together').format(self.attribute_name)
|
||||||
'the identifier has an invalid attribute "{0}", "when" and "when_not" cannot set together'
|
|
||||||
).format(self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 35, variable.xmlfiles)
|
raise DictConsistencyError(msg, 35, variable.xmlfiles)
|
||||||
when = self.when
|
when = self.when
|
||||||
inverse = False
|
inverse = False
|
||||||
|
|
@ -911,9 +756,7 @@ class IdentifierPropertyCalculation(_IdentifierCalculation):
|
||||||
when = self.when_not
|
when = self.when_not
|
||||||
inverse = True
|
inverse = True
|
||||||
else:
|
else:
|
||||||
msg = _(
|
msg = _('the identifier has an invalid attribute "{0}", "when" and "when_not" cannot set together').format(self.attribute_name)
|
||||||
'the identifier has an invalid attribute "{0}", "when" and "when_not" cannot set together'
|
|
||||||
).format(self.attribute_name)
|
|
||||||
raise DictConsistencyError
|
raise DictConsistencyError
|
||||||
params = {
|
params = {
|
||||||
None: [self.attribute_name, self.get_identifier()],
|
None: [self.attribute_name, self.get_identifier()],
|
||||||
|
|
@ -936,9 +779,7 @@ class IndexCalculation(Calculation):
|
||||||
objectspace,
|
objectspace,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
if self.path not in objectspace.followers:
|
if self.path not in objectspace.followers:
|
||||||
msg = _(
|
msg = _('the variable "{0}" is not a follower, so cannot have index type for "{1}"').format(self.path, self.attribute_name)
|
||||||
'the variable "{0}" is not a follower, so cannot have index type for "{1}"'
|
|
||||||
).format(self.path, self.attribute_name)
|
|
||||||
raise DictConsistencyError(msg, 60, self.xmlfiles)
|
raise DictConsistencyError(msg, 60, self.xmlfiles)
|
||||||
return {
|
return {
|
||||||
"function": "calc_value",
|
"function": "calc_value",
|
||||||
|
|
@ -968,7 +809,7 @@ CALCULATION_TYPES = {
|
||||||
"information": InformationCalculation,
|
"information": InformationCalculation,
|
||||||
"variable": VariableCalculation,
|
"variable": VariableCalculation,
|
||||||
"identifier": IdentifierCalculation,
|
"identifier": IdentifierCalculation,
|
||||||
# FOR VERSION 1.0
|
# FOR VERSION 1.0
|
||||||
"suffix": IdentifierCalculation,
|
"suffix": IdentifierCalculation,
|
||||||
"index": IndexCalculation,
|
"index": IndexCalculation,
|
||||||
"namespace": NamespaceCalculation,
|
"namespace": NamespaceCalculation,
|
||||||
|
|
|
||||||
|
|
@ -37,29 +37,17 @@ from jinja2.sandbox import SandboxedEnvironment
|
||||||
from rougail.object_model import CONVERT_OPTION
|
from rougail.object_model import CONVERT_OPTION
|
||||||
from rougail.error import display_xmlfiles
|
from rougail.error import display_xmlfiles
|
||||||
from tiramisu import DynOptionDescription, calc_value, function_waiting_for_error
|
from tiramisu import DynOptionDescription, calc_value, function_waiting_for_error
|
||||||
from tiramisu.error import (
|
from tiramisu.error import ValueWarning, ConfigError, PropertiesOptionError, CancelParam, errors
|
||||||
ValueWarning,
|
|
||||||
ConfigError,
|
|
||||||
PropertiesOptionError,
|
|
||||||
CancelParam,
|
|
||||||
errors,
|
|
||||||
)
|
|
||||||
from .utils import normalize_family
|
from .utils import normalize_family
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
|
|
||||||
ori_raise_carry_out_calculation_error = errors.raise_carry_out_calculation_error
|
ori_raise_carry_out_calculation_error = errors.raise_carry_out_calculation_error
|
||||||
|
|
||||||
|
|
||||||
def raise_carry_out_calculation_error(subconfig, *args, **kwargs):
|
def raise_carry_out_calculation_error(subconfig, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
ori_raise_carry_out_calculation_error(subconfig, *args, **kwargs)
|
ori_raise_carry_out_calculation_error(subconfig, *args, **kwargs)
|
||||||
except ConfigError as err:
|
except ConfigError as err:
|
||||||
ymlfiles = subconfig.config_bag.context.get_values().get_information(
|
ymlfiles = subconfig.config_bag.context.get_values().get_information(subconfig, 'ymlfiles', [])
|
||||||
subconfig, "ymlfiles", []
|
raise ConfigError(_('{0} in {1}').format(err, display_xmlfiles(ymlfiles)))
|
||||||
)
|
|
||||||
raise ConfigError(_("{0} in {1}").format(err, display_xmlfiles(ymlfiles)))
|
|
||||||
|
|
||||||
|
|
||||||
errors.raise_carry_out_calculation_error = raise_carry_out_calculation_error
|
errors.raise_carry_out_calculation_error = raise_carry_out_calculation_error
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -136,7 +124,7 @@ def kw_to_string(kw, root=None):
|
||||||
if root is None:
|
if root is None:
|
||||||
path = name
|
path = name
|
||||||
else:
|
else:
|
||||||
path = root + "." + name
|
path = root + '.' + name
|
||||||
if isinstance(data, dict):
|
if isinstance(data, dict):
|
||||||
yield from kw_to_string(data, root=path)
|
yield from kw_to_string(data, root=path)
|
||||||
else:
|
else:
|
||||||
|
|
@ -184,21 +172,11 @@ def jinja_to_function(
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
kw_str = ", ".join(kw_to_string(kw))
|
kw_str = ", ".join(kw_to_string(kw))
|
||||||
raise ConfigError(
|
raise ConfigError(
|
||||||
_(
|
_('cannot calculating "{0}" attribute for variable "{1}" in {2} with parameters "{3}": {4}').format(__internal_attribute, __internal_variable, display_xmlfiles(__internal_files), kw_str, err)
|
||||||
'cannot calculating "{0}" attribute for variable "{1}" in {2} with parameters "{3}": {4}'
|
|
||||||
).format(
|
|
||||||
__internal_attribute,
|
|
||||||
__internal_variable,
|
|
||||||
display_xmlfiles(__internal_files),
|
|
||||||
kw_str,
|
|
||||||
err,
|
|
||||||
)
|
|
||||||
) from err
|
) from err
|
||||||
convert = CONVERT_OPTION[__internal_type].get("func", str)
|
convert = CONVERT_OPTION[__internal_type].get("func", str)
|
||||||
if __internal_multi:
|
if __internal_multi:
|
||||||
values = [
|
values = [convert(val.strip()) for val in values.split("\n") if val.strip() != ""]
|
||||||
convert(val.strip()) for val in values.split("\n") if val.strip() != ""
|
|
||||||
]
|
|
||||||
if not values and __default_value is not None:
|
if not values and __default_value is not None:
|
||||||
return __default_value
|
return __default_value
|
||||||
return values
|
return values
|
||||||
|
|
|
||||||
|
|
@ -290,8 +290,7 @@ class Common:
|
||||||
):
|
):
|
||||||
"""Populate variable parameters"""
|
"""Populate variable parameters"""
|
||||||
if not isinstance(param, dict):
|
if not isinstance(param, dict):
|
||||||
param = {
|
param = {"type": "any",
|
||||||
"type": "any",
|
|
||||||
"value": param,
|
"value": param,
|
||||||
}
|
}
|
||||||
if param["type"] == "value":
|
if param["type"] == "value":
|
||||||
|
|
@ -332,7 +331,9 @@ class Common:
|
||||||
return f'ParamInformation("{param["information"]}", {default}, option={option_name})'
|
return f'ParamInformation("{param["information"]}", {default}, option={option_name})'
|
||||||
else:
|
else:
|
||||||
# if we want to get information from the a parent family
|
# if we want to get information from the a parent family
|
||||||
information = f'ParamInformation("{param["information"]}", {default})'
|
information = (
|
||||||
|
f'ParamInformation("{param["information"]}", {default})'
|
||||||
|
)
|
||||||
information_name = self.tiramisu.get_information_name()
|
information_name = self.tiramisu.get_information_name()
|
||||||
self.tiramisu.text["option"].append(
|
self.tiramisu.text["option"].append(
|
||||||
f"{information_name} = {information}"
|
f"{information_name} = {information}"
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ from rougail.utils import normalize_family, undefined
|
||||||
from tiramisu import Calculation
|
from tiramisu import Calculation
|
||||||
from tiramisu.error import (
|
from tiramisu.error import (
|
||||||
PropertiesOptionError,
|
PropertiesOptionError,
|
||||||
AttributeOptionError,
|
|
||||||
LeadershipError,
|
LeadershipError,
|
||||||
ConfigError,
|
ConfigError,
|
||||||
CancelParam,
|
CancelParam,
|
||||||
|
|
@ -45,7 +44,6 @@ class UserDatas:
|
||||||
self.values = {}
|
self.values = {}
|
||||||
self.errors = []
|
self.errors = []
|
||||||
self.warnings = []
|
self.warnings = []
|
||||||
self.show_secrets = False
|
|
||||||
self._populate_values(user_datas)
|
self._populate_values(user_datas)
|
||||||
self._auto_configure_dynamics()
|
self._auto_configure_dynamics()
|
||||||
self._populate_config()
|
self._populate_config()
|
||||||
|
|
@ -115,9 +113,7 @@ class UserDatas:
|
||||||
continue
|
continue
|
||||||
identifier = self._get_identifier(tconfig.name(), name)
|
identifier = self._get_identifier(tconfig.name(), name)
|
||||||
if identifier != normalize_family(identifier):
|
if identifier != normalize_family(identifier):
|
||||||
msg = _(
|
msg = _('cannot load variable path "{0}", the identifier "{1}" is not valid in {2}').format(path, identifier, data["source"])
|
||||||
'cannot load variable path "{0}", the identifier "{1}" is not valid in {2}'
|
|
||||||
).format(path, identifier, data["source"])
|
|
||||||
self.warnings.append(msg)
|
self.warnings.append(msg)
|
||||||
continue
|
continue
|
||||||
if identifier is None:
|
if identifier is None:
|
||||||
|
|
@ -159,27 +155,6 @@ class UserDatas:
|
||||||
cache[current_path] = config, identifier
|
cache[current_path] = config, identifier
|
||||||
break
|
break
|
||||||
|
|
||||||
def convert_value(self, path, option, options, value):
|
|
||||||
# converted value
|
|
||||||
needs_convert = options.get("needs_convert", False)
|
|
||||||
if option.ismulti():
|
|
||||||
if options.get("multi_separator") and not isinstance(value, list):
|
|
||||||
value = value.split(options["multi_separator"])
|
|
||||||
self.values[path]["values"] = value
|
|
||||||
if option.issubmulti():
|
|
||||||
value = [[val] for val in value]
|
|
||||||
if needs_convert:
|
|
||||||
if option.issubmulti():
|
|
||||||
for idx, val in enumerate(value):
|
|
||||||
value[idx] = [convert_value(option, v) for v in val]
|
|
||||||
else:
|
|
||||||
value = [convert_value(option, val) for val in value]
|
|
||||||
self.values[path]["values"] = value
|
|
||||||
self.values[path]["options"]["needs_convert"] = False
|
|
||||||
elif needs_convert:
|
|
||||||
value = convert_value(option, value)
|
|
||||||
return value
|
|
||||||
|
|
||||||
def _populate_config(self):
|
def _populate_config(self):
|
||||||
while self.values:
|
while self.values:
|
||||||
value_is_set = False
|
value_is_set = False
|
||||||
|
|
@ -198,25 +173,33 @@ class UserDatas:
|
||||||
).format(path, self.values[path]["source"])
|
).format(path, self.values[path]["source"])
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
value = self.convert_value(
|
value = self.values[path]["values"]
|
||||||
path, option, options, self.values[path]["values"]
|
needs_convert = options.get("needs_convert", False)
|
||||||
)
|
|
||||||
|
|
||||||
|
# converted value
|
||||||
|
if option.ismulti():
|
||||||
|
if options.get("multi_separator") and not isinstance(value, list):
|
||||||
|
value = value.split(options["multi_separator"])
|
||||||
|
self.values[path]["values"] = value
|
||||||
|
if option.issubmulti():
|
||||||
|
value = [[val] for val in value]
|
||||||
|
if needs_convert:
|
||||||
|
if option.issubmulti():
|
||||||
|
for idx, val in enumerate(value):
|
||||||
|
value[idx] = [convert_value(option, v) for v in val]
|
||||||
|
else:
|
||||||
|
value = [convert_value(option, val) for val in value]
|
||||||
|
self.values[path]["values"] = value
|
||||||
|
self.values[path]["options"]["needs_convert"] = False
|
||||||
|
elif needs_convert:
|
||||||
|
value = convert_value(option, value)
|
||||||
index = option.index()
|
index = option.index()
|
||||||
if index is not None:
|
if index is not None:
|
||||||
if not isinstance(value, list) or index >= len(value):
|
if not isinstance(value, list) or index >= len(value):
|
||||||
continue
|
continue
|
||||||
value = value[index]
|
value = value[index]
|
||||||
if option.isleader():
|
|
||||||
len_leader = len(option.value.get())
|
|
||||||
if len_leader:
|
|
||||||
for idx in range(len_leader - 1, -1, -1):
|
|
||||||
option.value.pop(idx)
|
|
||||||
try:
|
try:
|
||||||
option.value.set(value)
|
option.value.set(value)
|
||||||
option.information.set(
|
|
||||||
"loaded_from", _("loaded from {0}").format(options["source"])
|
|
||||||
)
|
|
||||||
value_is_set = True
|
value_is_set = True
|
||||||
# value is correctly set, remove variable to the set
|
# value is correctly set, remove variable to the set
|
||||||
if index is not None:
|
if index is not None:
|
||||||
|
|
@ -241,144 +224,33 @@ class UserDatas:
|
||||||
return None
|
return None
|
||||||
return finded[0]
|
return finded[0]
|
||||||
|
|
||||||
def _display_value(self, option, value):
|
|
||||||
if not self.show_secrets and option.type() == "password":
|
|
||||||
return "*" * 10
|
|
||||||
return value
|
|
||||||
|
|
||||||
def _populate_error_warnings(self):
|
def _populate_error_warnings(self):
|
||||||
# we don't find variable, apply value just to get error or warning messages
|
# we don't find variable, apply value just to get error or warning messages
|
||||||
for path, options in self.values.items():
|
for path, data in self.values.items():
|
||||||
value = options["values"]
|
|
||||||
option = self.config.option(path)
|
|
||||||
try:
|
try:
|
||||||
|
option = self.config.option(path)
|
||||||
|
value = data["values"]
|
||||||
if option.isoptiondescription():
|
if option.isoptiondescription():
|
||||||
if value:
|
if value:
|
||||||
self.warnings.append(
|
self.warnings.append(
|
||||||
_(
|
_('the variable "{0}" is a family, so cannot set the value "{1}" in {2}').format(
|
||||||
'cannot set the value "{0}" to the family {1}, it will be ignored when loading from {2}'
|
option.path(),
|
||||||
).format(
|
value,
|
||||||
self._display_value(option, value),
|
data["source"],
|
||||||
option.description(with_quote=True),
|
|
||||||
options["source"],
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
except AttributeOptionError as err:
|
|
||||||
if err.code == "option-not-found":
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'variable or family "{0}" does not exist, it will be ignored when loading from {1}'
|
|
||||||
).format(err.path, options["source"])
|
|
||||||
)
|
|
||||||
elif err.code == "option-dynamic":
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'"{0}" is the name of a dynamic family, it will be ignored when loading from {1}'
|
|
||||||
).format(option.description(with_quote=True), options["source"])
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.warnings.append(
|
|
||||||
_("{0} loaded from {1}").format(err, options["source"])
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
value = self.convert_value(
|
|
||||||
path, option, self.values[path].get("options", {}), value
|
|
||||||
)
|
|
||||||
if option.isfollower():
|
if option.isfollower():
|
||||||
indexes = range(len(value))
|
for index, val in enumerate(value):
|
||||||
else:
|
|
||||||
indexes = [None]
|
|
||||||
for index in indexes:
|
|
||||||
try:
|
|
||||||
if option.isfollower():
|
|
||||||
val = value[index]
|
|
||||||
if val is undefined or isinstance(val, CancelParam):
|
if val is undefined or isinstance(val, CancelParam):
|
||||||
continue
|
continue
|
||||||
self.config.option(path, index).value.set(val)
|
self.config.option(path, index).value.set(val)
|
||||||
else:
|
else:
|
||||||
option.value.set(value)
|
option.value.set(value)
|
||||||
except PropertiesOptionError as err:
|
except AttributeError as err:
|
||||||
if err.code == "property-error":
|
self.warnings.append(_('{0} loaded from {1}').format(err, data["source"]))
|
||||||
properties = err.display_properties(
|
except (ValueError, LeadershipError, PropertiesOptionError) as err:
|
||||||
force_property=True, add_quote=False
|
self.warnings.append(_('{0} in {1}').format(err, data["source"]))
|
||||||
)
|
|
||||||
err_path = err._subconfig.path
|
|
||||||
display_name = option.description(with_quote=True)
|
|
||||||
if index is not None:
|
|
||||||
if path == err_path:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'variable {0} at index "{1}" is {2}, it will be ignored when loading from {3}'
|
|
||||||
).format(
|
|
||||||
display_name,
|
|
||||||
index,
|
|
||||||
properties,
|
|
||||||
options["source"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'family {0} is {1}, {2} at index "{3}" will be ignored when loading from {4}'
|
|
||||||
).format(
|
|
||||||
err._name,
|
|
||||||
properties,
|
|
||||||
display_name,
|
|
||||||
index,
|
|
||||||
options["source"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
if path == err_path:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
"variable {0} is {1}, it will be ignored when loading from {2}"
|
|
||||||
).format(
|
|
||||||
display_name, properties, options["source"]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
"family {0} is {1}, {2} will be ignored when loading from {3}"
|
|
||||||
).format(
|
|
||||||
err._name,
|
|
||||||
properties,
|
|
||||||
display_name,
|
|
||||||
options["source"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.warnings.append(
|
|
||||||
_("{0} in {1}").format(err, options["source"])
|
|
||||||
)
|
|
||||||
except LeadershipError as err:
|
|
||||||
self.warnings.append(_("{0} in {1}").format(err, options["source"]))
|
|
||||||
except ValueError as err:
|
|
||||||
err.prefix = ""
|
|
||||||
if index is not None:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'the value "{0}" is invalid for {1} at index "{2}", {3}, it will be ignored when loading from {4}'
|
|
||||||
).format(
|
|
||||||
self._display_value(option, value),
|
|
||||||
option.description(with_quote=True),
|
|
||||||
err,
|
|
||||||
options["source"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.warnings.append(
|
|
||||||
_(
|
|
||||||
'the value "{0}" is invalid for {1}, {2}, it will be ignored when loading from {3}'
|
|
||||||
).format(
|
|
||||||
self._display_value(option, value),
|
|
||||||
option.description(with_quote=True),
|
|
||||||
err,
|
|
||||||
options["source"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def convert_value(option, value):
|
def convert_value(option, value):
|
||||||
|
|
@ -393,8 +265,5 @@ def convert_value(option, value):
|
||||||
value = int(value)
|
value = int(value)
|
||||||
func = CONVERT_OPTION.get(option_type, {}).get("func")
|
func = CONVERT_OPTION.get(option_type, {}).get("func")
|
||||||
if func:
|
if func:
|
||||||
try:
|
|
||||||
return func(value)
|
return func(value)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return value
|
return value
|
||||||
|
|
|
||||||
|
|
@ -162,13 +162,7 @@ def get_jinja_variable_to_param(
|
||||||
for variable_path, data in founded_variables.items():
|
for variable_path, data in founded_variables.items():
|
||||||
yield data[1], data[0], variable_path
|
yield data[1], data[0], variable_path
|
||||||
|
|
||||||
|
def calc_multi_for_type_variable(local_variable: 'Variable', variable_in_calculation_path: str, variable_in_calculation: 'Variable', objectspace: 'RougailConvert') -> Union[bool, str]:
|
||||||
def calc_multi_for_type_variable(
|
|
||||||
local_variable: "Variable",
|
|
||||||
variable_in_calculation_path: str,
|
|
||||||
variable_in_calculation: "Variable",
|
|
||||||
objectspace: "RougailConvert",
|
|
||||||
) -> Union[bool, str]:
|
|
||||||
variable_in_calculation_multi = variable_in_calculation.multi
|
variable_in_calculation_multi = variable_in_calculation.multi
|
||||||
if local_variable.path in objectspace.families:
|
if local_variable.path in objectspace.families:
|
||||||
# it's a family
|
# it's a family
|
||||||
|
|
@ -177,39 +171,33 @@ def calc_multi_for_type_variable(
|
||||||
local_variable_multi = local_variable.multi
|
local_variable_multi = local_variable.multi
|
||||||
# variable is a leader
|
# variable is a leader
|
||||||
if variable_in_calculation.path in objectspace.leaders:
|
if variable_in_calculation.path in objectspace.leaders:
|
||||||
local_variable_parent = local_variable.path.rsplit(".", 1)[0]
|
local_variable_parent = local_variable.path.rsplit('.', 1)[0]
|
||||||
variable_in_calculation_parent = variable_in_calculation.path.rsplit(
|
variable_in_calculation_parent = variable_in_calculation.path.rsplit('.', 1)[0]
|
||||||
".", 1
|
|
||||||
)[0]
|
|
||||||
if local_variable_parent == variable_in_calculation_parent:
|
if local_variable_parent == variable_in_calculation_parent:
|
||||||
variable_in_calculation_multi = False
|
variable_in_calculation_multi = False
|
||||||
# variable is a follower
|
# variable is a follower
|
||||||
elif variable_in_calculation.path in objectspace.followers:
|
elif variable_in_calculation.path in objectspace.followers:
|
||||||
local_variable_parent = local_variable.path.rsplit(".", 1)[0]
|
local_variable_parent = local_variable.path.rsplit('.', 1)[0]
|
||||||
variable_in_calculation_parent = variable_in_calculation.path.rsplit(
|
variable_in_calculation_parent = variable_in_calculation.path.rsplit('.', 1)[0]
|
||||||
".", 1
|
|
||||||
)[0]
|
|
||||||
if local_variable_parent != variable_in_calculation_parent:
|
if local_variable_parent != variable_in_calculation_parent:
|
||||||
if variable_in_calculation_multi:
|
if variable_in_calculation_multi:
|
||||||
variable_in_calculation_multi = "submulti"
|
variable_in_calculation_multi = 'submulti'
|
||||||
else:
|
else:
|
||||||
variable_in_calculation_multi = True
|
variable_in_calculation_multi = True
|
||||||
# variable is in a dynamic family
|
# variable is in a dynamic family
|
||||||
if objectspace.paths.is_dynamic(variable_in_calculation.path):
|
if objectspace.paths.is_dynamic(variable_in_calculation.path):
|
||||||
common_path = get_common_path(
|
common_path = get_common_path(local_variable.path, variable_in_calculation_path)
|
||||||
local_variable.path, variable_in_calculation_path
|
|
||||||
)
|
|
||||||
common_variable_path = variable_in_calculation_path
|
common_variable_path = variable_in_calculation_path
|
||||||
if common_path:
|
if common_path:
|
||||||
common_variable_path = common_variable_path[len(common_path) + 1 :]
|
common_variable_path = common_variable_path[len(common_path) + 1:]
|
||||||
count_identifiers = common_variable_path.count("{{ identifier }}")
|
count_identifiers = common_variable_path.count('{{ identifier }}')
|
||||||
if count_identifiers == 1:
|
if count_identifiers == 1:
|
||||||
if variable_in_calculation_multi is False:
|
if variable_in_calculation_multi is False:
|
||||||
variable_in_calculation_multi = True
|
variable_in_calculation_multi = True
|
||||||
else:
|
else:
|
||||||
variable_in_calculation_multi = "submulti"
|
variable_in_calculation_multi = 'submulti'
|
||||||
elif count_identifiers > 1:
|
elif count_identifiers > 1:
|
||||||
variable_in_calculation_multi = "submulti"
|
variable_in_calculation_multi = 'submulti'
|
||||||
return local_variable_multi, variable_in_calculation_multi
|
return local_variable_multi, variable_in_calculation_multi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
"rougail.leadership.leader": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": [
|
|
||||||
"value_1",
|
|
||||||
"value_2",
|
|
||||||
"value_3"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"rougail.leadership.follower": {
|
|
||||||
"owner": [
|
|
||||||
"default",
|
|
||||||
"default",
|
|
||||||
"default"
|
|
||||||
],
|
|
||||||
"value": [
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"rougail.leadership.leader": [
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_1",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_2",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_3",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
"rougail.leadership.leader": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": [
|
|
||||||
"value_1",
|
|
||||||
"value_2",
|
|
||||||
"value_3"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"rougail.leadership.follower": {
|
|
||||||
"owner": [
|
|
||||||
"default",
|
|
||||||
"default",
|
|
||||||
"default"
|
|
||||||
],
|
|
||||||
"value": [
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
["rougail.leadership.follower", "rougail.leadership.follower", "rougail.leadership.follower"]
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"rougail.leadership.leader": [
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_1",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_2",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rougail.leadership.leader": "value_3",
|
|
||||||
"rougail.leadership.follower": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
load_functions('../rougail-tests/funcs/test.py')
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_3 = StrOption(name="leader", doc="a leader", multi=True, default=["value_1", "value_2", "value_3"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml'], 'type': 'string', 'test': ('val1', 'val2')})
|
|
||||||
option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml'], 'type': 'string'})
|
|
||||||
optiondescription_2 = Leadership(name="leadership", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"}), informations={'ymlfiles': ['']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
load_functions('../rougail-tests/funcs/test.py')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_2 = StrOption(name="leader", doc="a leader", multi=True, default=["value_1", "value_2", "value_3"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml'], 'type': 'string', 'test': ('val1', 'val2')})
|
|
||||||
option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml'], 'type': 'string'})
|
|
||||||
optiondescription_1 = Leadership(name="leadership", doc="a leadership", children=[option_2, option_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['../rougail-tests/structures/40_0leadership_reduce/rougail/00-base.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"default"
|
"default"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"cannot access to option \"a follower\" at index \"0\" because has property \"disabled\" (the value of \"leader\" is \"a\")",
|
"cannot access to option \"a follower\" because has property \"disabled\" (the value of \"leader\" is \"a\")",
|
||||||
"b"
|
"b"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"default"
|
"default"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"cannot access to option \"a follower\" at index \"0\" because has property \"disabled\" (the value of \"leader\" is \"a\")",
|
"cannot access to option \"a follower\" because has property \"disabled\" (the value of \"leader\" is \"a\")",
|
||||||
"b"
|
"b"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ excludes = set([])
|
||||||
|
|
||||||
# excludes = set(['60_5family_dynamic_variable_outside_sub_suffix'])
|
# excludes = set(['60_5family_dynamic_variable_outside_sub_suffix'])
|
||||||
test_ok -= excludes
|
test_ok -= excludes
|
||||||
test_ok = ['44_9calculated_default_leadership_leader']
|
# test_ok = ['04_5validators_multi3']
|
||||||
|
|
||||||
|
|
||||||
test_ok = list(test_ok)
|
test_ok = list(test_ok)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue