From 673c9c22fe5030ab4a74b41f3720c8c90c73cbfd Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 27 Nov 2025 21:50:52 +0100 Subject: [PATCH] fix: update doc --- README.fr.md | 21 +++++++++ README.md | 21 ++++++++- .../rougail_user_data_questionary.po | 44 ++++++++++++------ locale/rougail_user_data_questionary.pot | 28 +++++++---- src/rougail/user_data_questionary/config.py | 4 +- src/rougail/user_data_questionary/data.py | 2 +- .../rougail_user_data_questionary.mo | Bin 909 -> 1474 bytes 7 files changed, 94 insertions(+), 26 deletions(-) create mode 100644 README.fr.md diff --git a/README.fr.md b/README.fr.md new file mode 100644 index 0000000..efb36dd --- /dev/null +++ b/README.fr.md @@ -0,0 +1,21 @@ +--- +gitea: none +include_toc: true +--- +[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) + +## Définir des données utilisateur interactivement dans la console + +> **🛈 Informations** +> +> 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** : 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 f846f92..fbe636b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ -# rougail-user-data-questionary +--- +gitea: none +include_toc: true +--- +[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) + +## Define user data interactively in the console + +> **🛈 Informations** +> +> 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**: 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 944dad2..ce8b73d 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-11-26 20:48+0100\n" -"PO-Revision-Date: 2025-11-26 20:48+0100\n" +"POT-Creation-Date: 2025-12-02 13:40+0100\n" +"PO-Revision-Date: 2025-12-02 13:43+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -17,25 +17,43 @@ msgstr "" "X-Generator: Poedit 3.8\n" #: src/rougail/user_data_questionary/config.py:32 -msgid "Define values interactivly" -msgstr "Définir des valeurs interactivement" +msgid "Define user data interactively in the console" +msgstr "Définir des données utilisateur interactivement dans la console" -#: src/rougail/user_data_questionary/config.py:40 +#: src/rougail/user_data_questionary/config.py:33 +msgid "" +"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." +msgstr "" +"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." + +#: src/rougail/user_data_questionary/config.py:39 +msgid "if questionary is not set in \"step.user_data\"" +msgstr "si questionary n'est pas mis dans \"step.user_data\"" + +#: src/rougail/user_data_questionary/config.py:42 msgid "Ask values only for mandatories variables without any value" -msgstr "Demander des valeurs uniquement pour des variables obligatoires sans valeur" +msgstr "" +"Demander des valeurs uniquement pour des variables obligatoires sans valeur" -#: src/rougail/user_data_questionary/config.py:45 +#: src/rougail/user_data_questionary/config.py:47 msgid "Show secrets instead of obscuring them" -msgstr "Afficher les secrets plutôt que des obscurcir" +msgstr "Afficher les secrets plutôt que de les obscurcir" -#: src/rougail/user_data_questionary/data.py:59 +#: src/rougail/user_data_questionary/data.py:61 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:226 +#: src/rougail/user_data_questionary/data.py:229 +msgid "Not a valid {0}" +msgstr "N'est pas un valide {0}" + +#: src/rougail/user_data_questionary/data.py:250 msgid "Value must not be empty" msgstr "La valeur ne doit pas être vide" -#: src/rougail/user_data_questionary/data.py:235 -msgid "Not a valid {0}" -msgstr "N'est pas un valide {0}" +#~ msgid "when questionary is not set in \"step.user_data\"" +#~ msgstr "lorsque questionary n'est pas mis dans step.user_data" diff --git a/locale/rougail_user_data_questionary.pot b/locale/rougail_user_data_questionary.pot index f12dc68..395ba66 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-11-26 20:48+0100\n" +"POT-Creation-Date: 2025-12-02 13:43+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,26 +16,34 @@ msgstr "" #: src/rougail/user_data_questionary/config.py:32 -msgid "Define values interactivly" +msgid "Define user data interactively in the console" msgstr "" -#: src/rougail/user_data_questionary/config.py:40 +#: src/rougail/user_data_questionary/config.py:33 +msgid "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." +msgstr "" + +#: src/rougail/user_data_questionary/config.py:39 +msgid "if questionary is not set in \"step.user_data\"" +msgstr "" + +#: src/rougail/user_data_questionary/config.py:42 msgid "Ask values only for mandatories variables without any value" msgstr "" -#: src/rougail/user_data_questionary/config.py:45 +#: src/rougail/user_data_questionary/config.py:47 msgid "Show secrets instead of obscuring them" msgstr "" -#: src/rougail/user_data_questionary/data.py:59 +#: src/rougail/user_data_questionary/data.py:61 msgid "questionary is not set in step.user_data" msgstr "" -#: src/rougail/user_data_questionary/data.py:226 -msgid "Value must not be empty" -msgstr "" - -#: src/rougail/user_data_questionary/data.py:235 +#: src/rougail/user_data_questionary/data.py:229 msgid "Not a valid {0}" msgstr "" +#: src/rougail/user_data_questionary/data.py:250 +msgid "Value must not be empty" +msgstr "" + diff --git a/src/rougail/user_data_questionary/config.py b/src/rougail/user_data_questionary/config.py index b36a3f7..392d857 100644 --- a/src/rougail/user_data_questionary/config.py +++ b/src/rougail/user_data_questionary/config.py @@ -29,12 +29,14 @@ def get_rougail_config( """generate rougail config""" options = f""" questionary: - description: {_("Define values interactivly")} + description: {_("Define user data interactively in the console")} + help: {_("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.")} disabled: jinja: | {{% if step.user_data is not propertyerror and 'questionary' not in step.user_data %}} disabled {{% endif %}} + description: {_('if questionary is not set in "step.user_data"')} mandatory: description: {_("Ask values only for mandatories variables without any value")} diff --git a/src/rougail/user_data_questionary/data.py b/src/rougail/user_data_questionary/data.py index 9392335..94910be 100644 --- a/src/rougail/user_data_questionary/data.py +++ b/src/rougail/user_data_questionary/data.py @@ -177,7 +177,7 @@ class RougailUserDataQuestionary: return text def _display_questionary_frozen(self, args: str, default: any) -> None: - qprint(" " + args + str(default)) + qprint(" " + args + " " + str(default)) class RougailValidator(Validator): 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 c7c8930cd652b0b9ee7f66ba79f5ff03a983f297..19f318147ad9414a95ecee91b2fec73ee171a5f2 100644 GIT binary patch literal 1474 zcmaJ>!HyG05N!y7#1e{>3m1?o8~`bdV|y2AV-zVH77$_~E3!e6IH2}Sjklqvd(z$G z#foyt2OtjQ8gUF!j{JeY0uCtokVw25+h9itBbAeu`F(__CXJRc)YBMQVx z#GeRx{z6f10BWH0eF{Vih0pDSR|Sez_i^9}1X`$%5NpqNd`J^* z8;<0iol@xoRoWFg`C#zJi4I1OEPfrDbl{sr+D+#bYKKeXn3~9eP@u`U#6joDOc+$g zQ95ACy^G$my6sUbm8PJddOxf04*VfS&I6~2+?ZGwx=PA2UWOq44un(!T_ic8ECq~|~9i4bcgWlj$)*ocO0rfYAn;W0^ z`n_IfSI3m?2koMj<3;5zMr!n!vwhap%KMPY(7AQv*41}i`rTgVipTmLIHon4Bz}~> zz!HtSEXxTP?yK+juVq{B@}yVEA-n2wUtpm_+8UYExy}wgNnB*#OovoY$DD+$TTiLq zz0~<3TO^3aJqpj%F|7$GiI5{F zhdQ-0dk*)Sd4A!Yn>|NHlZ-VH(m=H0=9ayXYAZ%t82UWUmuf8%gw+(>8hg7eO%5NC z+?u7qYulvRizKFi`u5Y@=(!1M_xx(#i58oO1;JcyT#URNtJTu18XYx+QSm3xFYW@| zf2G~jvTT9_q}d-Jhvh|OJGAHoS0r7B+3%Q9el|#o7pdk@;dHdrJtMm&R2sFHB9L!L xKfr&7^|R@!-S)=IHbt1nLCU`73MN>Xie~MexVJm4aAn#l-+Nj9BmZAF<_*lr(&zvH delta 290 zcmX@a-OFBoPl#nI0}!wSu?!H005LZZ_W&^n>;PhGAl?bYQb7C_i1~q7fRTYg4M-~h zX>lO!4x}}JbUcv$3#2=Mv^S7$V`5-X0n(R%G)UcdAgu?a`I&)w85qnM?0^hipg=s3 z2I^q|QeeOWBw3+skmF#04ai`cc-LLHEHS4vwOAoDuOzi7F}WnOET?j^7o){wMJ9>K zHcV2J8<}jl40Vmn6pRe4Oe{7ZXHsAk2kJ>JEkf3mnwy$eGFh6%hPzlHKdCsmv?w{V NXtF)4(&Q