From eac7df5bf5251b3039dde977cc2fe80a1ca3c37a Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 29 Dec 2025 12:15:56 +0100 Subject: [PATCH] fix: doc --- README.fr.md | 20 +++++++++ README.md | 20 ++++++++- .../fr/LC_MESSAGES/rougail_user_data_yaml.po | 40 ++++++++++++++---- locale/rougail_user_data_yaml.pot | 20 +++++++-- src/rougail/user_data_yaml/config.py | 14 +++--- .../fr/LC_MESSAGES/rougail_user_data_yaml.mo | Bin 1055 -> 1750 bytes 6 files changed, 95 insertions(+), 19 deletions(-) create mode 100644 README.fr.md diff --git a/README.fr.md b/README.fr.md new file mode 100644 index 0000000..1a74626 --- /dev/null +++ b/README.fr.md @@ -0,0 +1,20 @@ +--- +gitea: none +include_toc: true +--- +[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) + +## Charger les données utilisateur à partir d'un fichier YAML + +> [!NOTE] +> +> **Chemin** : yaml\ +> *`désactivé`*\ +> **Désactivé** : si yaml n'est pas défini dans "[Sélection pour données utilisateur](#step.user_data)" + +| Variable | Description | Valeur par défaut | Type | Validateur | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **yaml.filename**
**Ligne de commande** :
-yf, --yaml.filename
**Variable d'environnement** : YAML.FILENAME | Noms de fichiers ou répertoires où sont enregistrés les données utilisateur.
Si un répertoire est défini, tous les fichiers avec l'extension "yml" ou "yaml" seront chargés dans l'ordre alphanumérique. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `obligatoire` | `unique`
• le nom de fichier peut être une chemin relatif
• le fichier doit exister
• type de fichier autorisé: "fichier" et "répertoire". | +| **yaml.file_with_secrets**
**Ligne de commande** :
--yaml.file_with_secrets
**Variable d'environnement** : YAML.FILE_WITH_SECRETS | Le fichier peut contenir des secrets.
Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être intéressant de définir plus précisément quels fichiers peuvent contenir ces secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | **Choix** :
• all
• first
• last
• none | + + diff --git a/README.md b/README.md index 39eed9a..6bfbb88 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ -# rougail-user-data-yaml +--- +gitea: none +include_toc: true +--- +[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) + +## Charge user data from YAML file + +> [!NOTE] +> +> **Path**: yaml\ +> *`disabled`*\ +> **Disabled**: if yaml is not set in "[Select for user datas](#step.user_data)" + +| Variable | Description | Default value | Type | Validator | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| **yaml.filename**
**Command line**:
-yf, --yaml.filename
**Environment variable**: YAML.FILENAME | File or directory names where user data are stored.
If a directory is set, all files with "yml" ou "yaml" extension will be load with alphanum order. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `mandatory` | `unique`
• this filename could be a relative path
• this file must exist
• file type allowed: "directory" and "file". | +| **yaml.file_with_secrets**
**Command line**:
--yaml.file_with_secrets
**Environment variable**: YAML.FILE_WITH_SECRETS | File that may contain secrets.
By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Choices**:
• all
• first
• last
• none | + diff --git a/locale/fr/LC_MESSAGES/rougail_user_data_yaml.po b/locale/fr/LC_MESSAGES/rougail_user_data_yaml.po index a30893d..b1bca99 100644 --- a/locale/fr/LC_MESSAGES/rougail_user_data_yaml.po +++ b/locale/fr/LC_MESSAGES/rougail_user_data_yaml.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-05-14 08:28+0200\n" -"PO-Revision-Date: 2025-05-14 08:29+0200\n" +"POT-Creation-Date: 2025-12-29 12:15+0100\n" +"PO-Revision-Date: 2025-12-29 12:18+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -14,13 +14,13 @@ 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.5\n" +"X-Generator: Poedit 3.8\n" #: src/rougail/user_data_yaml/__init__.py:46 msgid "yaml is not set in step.user_data" msgstr "\"yaml\" n'est pas défini dans step.user_data" -#: src/rougail/user_data_yaml/__init__.py:72 +#: src/rougail/user_data_yaml/__init__.py:74 msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgstr "" "ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais " @@ -35,17 +35,41 @@ msgid "\"{0}\" in {1} has an unknown value" msgstr "\"{0}\" dans {1} a une valeur inconnue" #: src/rougail/user_data_yaml/config.py:30 -msgid "Configuration rougail-user-data-yaml" -msgstr "Configuration de rougail-user-data-yaml" +msgid "Charge user data from YAML file" +msgstr "Charger les données utilisateur à partir d'un fichier YAML" + +#: src/rougail/user_data_yaml/config.py:35 +msgid "if yaml is not set in \"step.user_data\"" +msgstr "si yaml n'est pas défini dans \"step.user_data\"" + +#: src/rougail/user_data_yaml/config.py:38 +msgid "File or directory names where user data are stored" +msgstr "" +"Noms de fichiers ou répertoires où sont enregistrés les données utilisateur" #: src/rougail/user_data_yaml/config.py:39 -msgid "File or directory name where user datas are stored" +msgid "" +"If a directory is set, all files with \"yml\" ou \"yaml\" extension will be " +"load with alphanum order." msgstr "" -"Nom du fichier ou répertoire où sont enregistré les données utilisateur" +"Si un répertoire est défini, tous les fichiers avec l'extension \"yml\" ou " +"\"yaml\" seront chargés dans l'ordre alphanumérique." #: src/rougail/user_data_yaml/config.py:48 msgid "File that may contain secrets" msgstr "Le fichier peut contenir des secrets" +#: src/rougail/user_data_yaml/config.py:49 +msgid "" +"By default, all files can contain secrets. It might be useful to define more " +"precisely which files can contain these secrets." +msgstr "" +"Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être " +"intéressant de définir plus précisément quels fichiers peuvent contenir ces " +"secrets." + +#~ msgid "Configuration rougail-user-data-yaml" +#~ msgstr "Configuration de rougail-user-data-yaml" + #~ msgid "Filename" #~ msgstr "Nom du fichier" diff --git a/locale/rougail_user_data_yaml.pot b/locale/rougail_user_data_yaml.pot index 7358ec7..cceae23 100644 --- a/locale/rougail_user_data_yaml.pot +++ b/locale/rougail_user_data_yaml.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-05-14 08:29+0200\n" +"POT-Creation-Date: 2025-12-29 12:18+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,7 +19,7 @@ msgstr "" msgid "yaml is not set in step.user_data" msgstr "" -#: src/rougail/user_data_yaml/__init__.py:72 +#: src/rougail/user_data_yaml/__init__.py:74 msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgstr "" @@ -32,14 +32,26 @@ msgid "\"{0}\" in {1} has an unknown value" msgstr "" #: src/rougail/user_data_yaml/config.py:30 -msgid "Configuration rougail-user-data-yaml" +msgid "Charge user data from YAML file" +msgstr "" + +#: src/rougail/user_data_yaml/config.py:35 +msgid "if yaml is not set in \"step.user_data\"" +msgstr "" + +#: src/rougail/user_data_yaml/config.py:38 +msgid "File or directory names where user data are stored" msgstr "" #: src/rougail/user_data_yaml/config.py:39 -msgid "File or directory name where user datas are stored" +msgid "If a directory is set, all files with \"yml\" ou \"yaml\" extension will be load with alphanum order." msgstr "" #: src/rougail/user_data_yaml/config.py:48 msgid "File that may contain secrets" msgstr "" +#: src/rougail/user_data_yaml/config.py:49 +msgid "By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets." +msgstr "" + diff --git a/src/rougail/user_data_yaml/config.py b/src/rougail/user_data_yaml/config.py index 13dfb5d..963fcc6 100644 --- a/src/rougail/user_data_yaml/config.py +++ b/src/rougail/user_data_yaml/config.py @@ -27,15 +27,16 @@ def get_rougail_config( ) -> dict: options = f""" yaml: - description: {_("Configuration rougail-user-data-yaml")} + description: {_("Charge user data from YAML file")} disabled: - jinja: | - {{% if step.user_data is propertyerror or 'yaml' not in step.user_data %}} - disabled - {{% endif %}} + jinja: >- + {{{{ step.user_data is not propertyerror or 'yaml' not in step.user_data }}}} + return_type: boolean + description: {_('if yaml is not set in "step.user_data"')} filename: - description: {_("File or directory name where user datas are stored")} + description: {_("File or directory names where user data are stored")} + help: {_('If a directory is set, all files with "yml" ou "yaml" extension will be load with alphanum order.')} alternative_name: yf type: unix_filename multi: true @@ -45,6 +46,7 @@ yaml: file_with_secrets: description: {_("File that may contain secrets")} + help: {_('By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets.')} default: all choices: - all diff --git a/src/rougail/user_data_yaml/locale/fr/LC_MESSAGES/rougail_user_data_yaml.mo b/src/rougail/user_data_yaml/locale/fr/LC_MESSAGES/rougail_user_data_yaml.mo index 8314ce55873a6362f4e7b79f31f941a711cab657..082370f734b727f71d4b3af4bc61a9e4687890f2 100644 GIT binary patch literal 1750 zcmaJ>&u<(x6gCikEf)&v0nw_jBOnJd+uf}yrCU%%ON$~UG=hNWsd8uD?if7w)b?Z< zRS_5d1JpYbr|qprF1_rv7ybb*h(Ce@5}#)_*)#-3@_sXGzvu6LexHATYweN1^9IH_ zjDT?l;~7SL-h4rbi@-C$1K?%g1>h6l2>2WDJaFwrAtW#XUIqRL`~dhA_%`rQ;6>nH zz`ud-z9hu^z<1V!_yu?!_!00A;2j{nEW~@j3it!?5pV~1_7x#60W;uP;7`B};2a1l z;&qJp^e|#g@j*)QTKm@hfI|DcieID^2o<2y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