From bd2ec28a6404c4df42f9ab62312243993aea4465 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 13 Jun 2026 07:07:46 +0200 Subject: [PATCH] fix: values is a dict --- README.fr.md | 12 +++++------- README.md | 12 +++++------- .../rougail_user_data_questionary.po | 14 +++++++++----- locale/rougail_user_data_questionary.pot | 10 +++++++--- src/rougail/user_data_questionary/data.py | 2 +- .../rougail_user_data_questionary.mo | Bin 1474 -> 1541 bytes 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/README.fr.md b/README.fr.md index 9418282..4fd4de2 100644 --- a/README.fr.md +++ b/README.fr.md @@ -11,11 +11,9 @@ include_toc: true > L'utilisateur va entrer les valeurs des variables dans une interface en ligne de commande. Ces variables vont être affichées les unes après les autres, permettant à l'utilisateur de changer ou ajouter des valeurs.\ > **Chemin** : questionary\ > *`désactivé`*\ -> **Désactivé** : si questionary n'est pas mis dans "[Sélection pour données utilisateur](#step.user_data)" - -| Variable | Description | Valeur par défaut | Type | -|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------| -| **questionary.mandatory**
**Ligne de commande** :
• -qm, --questionary.mandatory
• -nqm, --questionary.no-mandatory
**Variable d'environnement** : QUESTIONARY.MANDATORY | Demander des valeurs uniquement pour des variables obligatoires sans valeur. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | -| **questionary.show_secrets**
**Ligne de commande** :
• -qs, --questionary.show_secrets
• -nqs, --questionary.no-show_secrets
**Variable d'environnement** : QUESTIONARY.SHOW_SECRETS | Afficher les secrets plutôt que de les obscurcir. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | - +> **Désactivé** : si questionary n'est pas mis dans "[sélection pour user data](#step.user_data)". +| Variable | Description | Valeur par défaut | Type | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------| +| **questionary.mandatory**
**Ligne de commande** :
• -qm, --questionary.mandatory
• -nqm, --questionary.no-mandatory
**Variable d'environnement** : ROUGAILCLI_QUESTIONARY.MANDATORY | Demander des valeurs uniquement pour des variables obligatoires sans valeur. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | +| **questionary.show_secrets**
**Ligne de commande** :
• -qs, --questionary.show_secrets
• -nqs, --questionary.no-show_secrets
**Variable d'environnement** : ROUGAILCLI_QUESTIONARY.SHOW_SECRETS | Afficher les secrets plutôt que de les obscurcir. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | diff --git a/README.md b/README.md index 353dda2..dc8d645 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,9 @@ include_toc: true > The user will enter variable values in a command-line interface. The variables will be displayed one after another, allowing the user to change or add values.\ > **Path**: questionary\ > *`disabled`*\ -> **Disabled**: if questionary is not set in "[Select for user datas](#step.user_data)" - -| Variable | Description | Default value | Type | -|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------| -| **questionary.mandatory**
**Command line**:
• -qm, --questionary.mandatory
• -nqm, --questionary.no-mandatory
**Environment variable**: QUESTIONARY.MANDATORY | Ask values only for mandatories variables without any value. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | -| **questionary.show_secrets**
**Command line**:
• -qs, --questionary.show_secrets
• -nqs, --questionary.no-show_secrets
**Environment variable**: QUESTIONARY.SHOW_SECRETS | Show secrets instead of obscuring them. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | - +> **Disabled**: if questionary is not set in "[select for user data](#step.user_data)". +| Variable | Description | Default value | Type | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------| +| **questionary.mandatory**
**Command line**:
• -qm, --questionary.mandatory
• -nqm, --questionary.no-mandatory
**Environment variable**: ROUGAILCLI_QUESTIONARY.MANDATORY | Ask values only for mandatories variables without any value. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | +| **questionary.show_secrets**
**Command line**:
• -qs, --questionary.show_secrets
• -nqs, --questionary.no-show_secrets
**Environment variable**: ROUGAILCLI_QUESTIONARY.SHOW_SECRETS | Show secrets instead of obscuring them. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | diff --git a/locale/fr/LC_MESSAGES/rougail_user_data_questionary.po b/locale/fr/LC_MESSAGES/rougail_user_data_questionary.po index b895b3c..3ae2f6a 100644 --- a/locale/fr/LC_MESSAGES/rougail_user_data_questionary.po +++ b/locale/fr/LC_MESSAGES/rougail_user_data_questionary.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-12-29 12:20+0100\n" -"PO-Revision-Date: 2025-12-29 12:20+0100\n" +"POT-Creation-Date: 2026-06-13 06:55+0200\n" +"PO-Revision-Date: 2026-06-13 07:06+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -"X-Generator: Poedit 3.8\n" +"X-Generator: Poedit 3.9\n" #: src/rougail/user_data_questionary/config.py:32 msgid "Define user data interactively in the console" @@ -47,11 +47,15 @@ msgstr "Afficher les secrets plutôt que de les obscurcir" msgid "questionary is not set in step.user_data" msgstr "questionary n'est pas mis dans step.user_data" -#: src/rougail/user_data_questionary/data.py:224 +#: src/rougail/user_data_questionary/data.py:161 +msgid "loaded from questionary" +msgstr "chargé depuis questionary" + +#: src/rougail/user_data_questionary/data.py:228 msgid "Not a valid {0}" msgstr "N'est pas un valide {0}" -#: src/rougail/user_data_questionary/data.py:245 +#: src/rougail/user_data_questionary/data.py:249 msgid "Value must not be empty" msgstr "La valeur ne doit pas être vide" diff --git a/locale/rougail_user_data_questionary.pot b/locale/rougail_user_data_questionary.pot index 8217d01..89deb24 100644 --- a/locale/rougail_user_data_questionary.pot +++ b/locale/rougail_user_data_questionary.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-12-29 12:20+0100\n" +"POT-Creation-Date: 2026-06-13 07:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,11 +39,15 @@ msgstr "" msgid "questionary is not set in step.user_data" msgstr "" -#: src/rougail/user_data_questionary/data.py:224 +#: src/rougail/user_data_questionary/data.py:161 +msgid "loaded from questionary" +msgstr "" + +#: src/rougail/user_data_questionary/data.py:228 msgid "Not a valid {0}" msgstr "" -#: src/rougail/user_data_questionary/data.py:245 +#: src/rougail/user_data_questionary/data.py:249 msgid "Value must not be empty" msgstr "" diff --git a/src/rougail/user_data_questionary/data.py b/src/rougail/user_data_questionary/data.py index b7c45d0..5443f46 100644 --- a/src/rougail/user_data_questionary/data.py +++ b/src/rougail/user_data_questionary/data.py @@ -85,7 +85,7 @@ class RougailUserDataQuestionary: "source": "Questionary", "errors": self.errors, "warnings": self.warnings, - "values": [], + "values": {}, } ] diff --git a/src/rougail/user_data_questionary/locale/fr/LC_MESSAGES/rougail_user_data_questionary.mo b/src/rougail/user_data_questionary/locale/fr/LC_MESSAGES/rougail_user_data_questionary.mo index 3f14690fbe0619f5521fbd7e5e94adcd431b4654..8598e53561ce6fb27bfd250f60aebb72dda92654 100644 GIT binary patch delta 316 zcmX@a-O5vcPl#nI0}yZlu?!IB05LBR?*U>E_yEM#K>QJibwQYsfq@@LM+0d!Ae{}Q z=K<+SKw2C~8!|!Ec>-w=zZ^(w0O@`p{TE2@0Mgz-dK)tXgChe&5CannM4=0iHUvt< z0O^}Rx(`Sz0O<@?1_mP_-3g?nfb~>+Lt_O4b1MTgZ3Cmp krQCAFY5vlv3T(s;a0iww#KH|& z*eNf*dV4xQoihp@gM(|-SP2uL1a&D)8~V0IX#|v`5AqhjoWut&+?4gY{Q$%40zaKA=KZN7ouoT{q!2A@`WcyfX-c)Zz gijJ!sRkmGKQTbfn^`81cEA93^zwV9Al=m{N4-_aMs{jB1