From f1d212b4b6d69365b77bb26c6d80affc00979ef7 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 13 Jun 2026 06:50:05 +0200 Subject: [PATCH] fix: translation --- README.fr.md | 16 +++++++--------- README.md | 16 +++++++--------- .../rougail_user_data_environment.po | 14 +++++++++----- locale/rougail_user_data_environment.pot | 8 ++++++-- src/rougail/user_data_environment/config.py | 2 +- src/rougail/user_data_environment/data.py | 4 +++- .../rougail_user_data_environment.mo | Bin 3552 -> 3649 bytes .../makedict/mandatories.json | 2 +- .../errors/all.json | 4 ++++ .../errors/mandatories.json | 4 ++++ .../60_0family_dynamic_variable/file/all.env | 3 +++ .../file/all_exclude.env | 2 ++ .../file/mandatories.env | 2 ++ .../makedict/all.json | 8 ++++++++ .../makedict/mandatories.json | 8 ++++++++ .../makedict/mandatories.json | 2 +- .../errors/all.json | 4 ++++ .../errors/mandatories.json | 4 ++++ .../60_0family_dynamic_variable/file/all.env | 3 +++ .../file/all_exclude.env | 2 ++ .../file/mandatories.env | 2 ++ .../makedict/all.json | 8 ++++++++ .../makedict/mandatories.json | 8 ++++++++ tests/test_load.py | 1 + 24 files changed, 98 insertions(+), 29 deletions(-) create mode 100644 tests/results/test/60_0family_dynamic_variable/errors/all.json create mode 100644 tests/results/test/60_0family_dynamic_variable/errors/mandatories.json create mode 100644 tests/results/test/60_0family_dynamic_variable/file/all.env create mode 100644 tests/results/test/60_0family_dynamic_variable/file/all_exclude.env create mode 100644 tests/results/test/60_0family_dynamic_variable/file/mandatories.env create mode 100644 tests/results/test/60_0family_dynamic_variable/makedict/all.json create mode 100644 tests/results/test/60_0family_dynamic_variable/makedict/mandatories.json create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/errors/all.json create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/errors/mandatories.json create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/file/all.env create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/file/all_exclude.env create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/file/mandatories.env create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/makedict/all.json create mode 100644 tests/results/test_namespace/60_0family_dynamic_variable/makedict/mandatories.json diff --git a/README.fr.md b/README.fr.md index d513321..cd4d871 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,7 +4,7 @@ include_toc: true --- [🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) -## Charger les variables d'environnement +## Charge les variables d'environnement > [!NOTE] > @@ -17,12 +17,10 @@ include_toc: true > Pour les valeurs, il n'y a pas de différence entre un nombre et une lettre (ils peuvent être entre guillemets ou non). Cependant, les booléens sont True ou False. Le séparateur pour les variables multiple est la virgule.\ > **Chemin** : environment\ > *`désactivé`*\ -> **Désactivé** : si environment n'est pas défini dans "[Sélection pour données utilisateur](#step.user_data)" - -| Variable | Description | Valeur par défaut | Type | Validateur | -|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------|------------------------------------------------------| -| **environment.default_environment_name**
**Ligne de commande** :
--environment.default_environment_name
**Variable d'environnement** : ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Nom du préfix d'environnement par défaut. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | Doit seulement utiliser des caractères en majuscule. | -| **environment.custom_separator**
**Ligne de commande** :
--environment.custom_separator
**Variable d'environnement** : ENVIRONMENT.CUSTOM_SEPARATOR | Remplace le caractère séparateur « . » dans les chemins par un autre.
Le caractère point (« . ») peut ne pas être autorisé dans le nom de la variable d'environnement. Attention, le nom de la variable avec des points est toujours disponible en plus du nom avec ce caractère. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | -| **environment.with_secrets**
**Ligne de commande** :
• --environment.with_secrets
• --environment.no-with_secrets
**Variable d'environnement** : ENVIRONMENT.WITH_SECRETS | Les variables d'environnement peuvent contenir des secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | | - +> **Désactivé** : si environment n'est pas défini dans "[sélection pour user data](#step.user_data)". +| Variable | Description | Valeur par défaut | Type | Validateur | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------|------------------------------------------------------| +| **environment.default_environment_name**
**Ligne de commande** :
--environment.default_environment_name
**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Nom du préfix d'environnement par défaut. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | Doit seulement utiliser des caractères en majuscule. | +| **environment.custom_separator**
**Ligne de commande** :
--environment.custom_separator
**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Remplace le caractère séparateur « . » dans les chemins par un autre.
Le caractère point (« . ») peut ne pas être autorisé dans le nom de la variable d'environnement. Attention, le nom de la variable avec des points est toujours disponible en plus du nom avec ce caractère. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | +| **environment.with_secrets**
**Ligne de commande** :
• --environment.with_secrets
• --environment.no-with_secrets
**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Les variables d'environnement peuvent contenir des secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | | diff --git a/README.md b/README.md index b8ec1a3..9b2fc1f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ include_toc: true --- [🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md) -## Load environment variables +## Load user data from environment variables > [!NOTE] > @@ -17,12 +17,10 @@ include_toc: true > For values, there is no difference between a number and a letter (they can be enclosed in quotes or not). However, booleans are True or False. The separator for multiple variables is a comma.\ > **Path**: environment\ > *`disabled`*\ -> **Disabled**: if environment is not set in "[Select for user datas](#step.user_data)" - -| Variable | Description | Default value | Type | Validator | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------|--------------------------------------| -| **environment.default_environment_name**
**Command line**:
--environment.default_environment_name
**Environment variable**: ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Name of the default environment prefix. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Should only use uppercase character. | -| **environment.custom_separator**
**Command line**:
--environment.custom_separator
**Environment variable**: ENVIRONMENT.CUSTOM_SEPARATOR | Replace the separator character "." in path by an other.
The character dot (".") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | -| **environment.with_secrets**
**Command line**:
• --environment.with_secrets
• --environment.no-with_secrets
**Environment variable**: ENVIRONMENT.WITH_SECRETS | Environnement variables may contain secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | - +> **Disabled**: if environment is not set in "[select for user data](#step.user_data)". +| Variable | Description | Default value | Type | Validator | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------|--------------------------------------| +| **environment.default_environment_name**
**Command line**:
--environment.default_environment_name
**Environment variable**: ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Name of the default environment prefix. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Should only use uppercase character. | +| **environment.custom_separator**
**Command line**:
--environment.custom_separator
**Environment variable**: ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Replace the separator character "." in path by an other.
The character dot (".") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | +| **environment.with_secrets**
**Command line**:
• --environment.with_secrets
• --environment.no-with_secrets
**Environment variable**: ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Environnement variables may contain secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | diff --git a/locale/fr/LC_MESSAGES/rougail_user_data_environment.po b/locale/fr/LC_MESSAGES/rougail_user_data_environment.po index 3a84e93..6206313 100644 --- a/locale/fr/LC_MESSAGES/rougail_user_data_environment.po +++ b/locale/fr/LC_MESSAGES/rougail_user_data_environment.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-12-29 17:45+0100\n" -"PO-Revision-Date: 2025-12-29 17:52+0100\n" +"POT-Creation-Date: 2026-06-13 06:47+0200\n" +"PO-Revision-Date: 2026-06-13 06:48+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_environment/annotator.py:46 msgid "" @@ -33,8 +33,8 @@ msgstr "" "utiliser de données utilisateur \"environment\", donc \"{0}\" est invalide" #: src/rougail/user_data_environment/config.py:34 -msgid "Load environment variables" -msgstr "Charger les variables d'environnement" +msgid "Load user data from environment variables" +msgstr "Charge les variables d'environnement" #: src/rougail/user_data_environment/config.py:36 msgid "Variable values can be defined directly from an environment variable." @@ -104,6 +104,10 @@ msgstr "" msgid "Environnement variables may contain secrets" msgstr "Les variables d'environnement peuvent contenir des secrets" +#: src/rougail/user_data_environment/data.py:64 +msgid "environment variable" +msgstr "les variables d'environnement" + #~ msgid "The \".\" character could be not allowed in path name" #~ msgstr "" #~ "Le caractère \".\" peut ne pas être autorisé dans le nom des chemins" diff --git a/locale/rougail_user_data_environment.pot b/locale/rougail_user_data_environment.pot index b704068..a55c8df 100644 --- a/locale/rougail_user_data_environment.pot +++ b/locale/rougail_user_data_environment.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-12-29 17:52+0100\n" +"POT-Creation-Date: 2026-06-13 06:49+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,7 +24,7 @@ msgid "variable name must be a lowercase name when we want to use user data \"en msgstr "" #: src/rougail/user_data_environment/config.py:34 -msgid "Load environment variables" +msgid "Load user data from environment variables" msgstr "" #: src/rougail/user_data_environment/config.py:36 @@ -67,3 +67,7 @@ msgstr "" msgid "Environnement variables may contain secrets" msgstr "" +#: src/rougail/user_data_environment/data.py:64 +msgid "environment variable" +msgstr "" + diff --git a/src/rougail/user_data_environment/config.py b/src/rougail/user_data_environment/config.py index fe4f794..9c84ec1 100644 --- a/src/rougail/user_data_environment/config.py +++ b/src/rougail/user_data_environment/config.py @@ -31,7 +31,7 @@ def get_rougail_config( ) -> dict: options = f""" environment: - description: {_("Load environment variables")} + description: {_("Load user data from environment variables")} help: |- {_('Variable values can be defined directly from an environment variable.')} diff --git a/src/rougail/user_data_environment/data.py b/src/rougail/user_data_environment/data.py index 38be35b..3cb6c59 100644 --- a/src/rougail/user_data_environment/data.py +++ b/src/rougail/user_data_environment/data.py @@ -25,6 +25,8 @@ from rougail.config import RougailConfig from rougail.error import ExtensionError from tiramisu.error import ValueOptionError +from .i18n import _ + class RougailUserDataEnvironment: def __init__( @@ -59,7 +61,7 @@ class RougailUserDataEnvironment: values = self.parse() return [ { - "source": "environment variable", + "source": _("environment variable"), "errors": self.errors, "warnings": self.warnings, "values": values, diff --git a/src/rougail/user_data_environment/locale/fr/LC_MESSAGES/rougail_user_data_environment.mo b/src/rougail/user_data_environment/locale/fr/LC_MESSAGES/rougail_user_data_environment.mo index b249445693c35b7b38529c4b8ca89f31f9e2b9cd..ac5268dcfbc749f74a20ecdf7a3ab3a507bd800a 100644 GIT binary patch delta 464 zcmX}oy)Q#i9LDkI-j=GCiZtnn~B~=Ho;l^#(NA9dh3%? z{8yW#H~hdJeDO~AI%Ljma-m+^PM;h@xsmw18?XybH?l+>2A$KaHSJN&=2 zIFrZ~S%1aS-wU-Oc_OP`E4B`4z6XyvA{W=y&npJlpN P{;FBI_D9{N;F0kILoPp` delta 394 zcmX}ou}Z^G6vpxIrcGmQ6{$m^tssaFhCmant=$DJh)QR15(jZ{am)iKs01Iw#S22| zAjQ?qS*a*E^c58RCxQnKzuZ8+drn4;aXo&kv_pyA2-o+r6b(I04**_vEF$&=7n33e()4aTz29~UC!rI(irb? z8Iz*4iUUjs`@|kTPfIUYE&b(9@QQQ4EUn`Qu3>FPy2f2J>6heYMUI#yE3(9bVg@l! zR^??SYGd