fix: translation

This commit is contained in:
egarette@silique.fr 2025-02-17 09:54:47 +01:00
parent b2ed0c9d29
commit 0eaee74599
5 changed files with 122 additions and 58 deletions

View file

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2024-11-01 11:03+0100\n"
"PO-Revision-Date: 2024-11-01 11:04+0100\n"
"POT-Creation-Date: 2025-02-15 12:43+0100\n"
"PO-Revision-Date: 2025-02-15 12:44+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@ -16,42 +16,80 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n"
#: src/rougail/output_exporter/__init__.py:73
msgid "The following variables are mandatory but have no value:"
msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
#: src/rougail/output_ansible/__init__.py:57
msgid "no namespace configured"
msgstr "aucun espace de nom configuré"
#: src/rougail/output_exporter/__init__.py:84
msgid "The following variables are inaccessible but are empty and mandatory :"
msgstr "Les variables suiveuses sont inaccessibles mais sont vides et obligatoires :"
#: src/rougail/output_ansible/__init__.py:65
msgid "cannot find host namespace \"{0}\""
msgstr "ne peut trouve l'espace de nom de l'hôte \"{0}\""
#: src/rougail/output_exporter/output/console.py:53
msgid "Undocumented variable"
msgstr "Variable non documentée"
#: src/rougail/output_ansible/__init__.py:70
#, fuzzy
msgid "malformated host namespace \"{0}\", should have the \"hostnames\" key"
msgstr ""
"l'espace de nom de l'hôte \"{0}\" est mal formaté, devrait avoir la clé "
"\"hostnames\""
#: src/rougail/output_exporter/output/console.py:54
msgid "Undocumented but modified variable"
msgstr "Variable non documentée mais modifiée"
#: src/rougail/output_ansible/__init__.py:97
msgid "cannot find \"hostnames\" in \"{0}\" namespace"
msgstr "ne peut trouve \"hostnames\" dans l'espace de nom \"{0}\""
#: src/rougail/output_exporter/output/console.py:57
msgid "Unmodifiable variable"
msgstr "Variable non modifiable"
#: src/rougail/output_ansible/config.py:29
#: src/rougail/output_ansible/config.py:30
msgid "parameter added only to be compatible with Ansible"
msgstr "paramètre ajouté seulement pour être compatible avec Ansible"
#: src/rougail/output_exporter/output/console.py:61
msgid "Default value"
msgstr "Valeur par défaut"
#: src/rougail/output_ansible/config.py:52
msgid "Configuration of user data or output Ansible"
msgstr "Configuration de Ansible comme donnée utilisateur ou sortie"
#: src/rougail/output_exporter/output/console.py:62
msgid "Modified value"
msgstr "Valeur modifiée"
#: src/rougail/output_ansible/config.py:62
msgid "Configuration of output Ansible"
msgstr "Configuration de la sortie Ansible"
#: src/rougail/output_exporter/output/console.py:63
msgid "Original default value"
msgstr "Valeur par défaut d'origine"
#: src/rougail/output_ansible/config.py:72
msgid "Namespace with host values"
msgstr "Espace de nom avec les valeurs de l'hôte"
#: src/rougail/output_exporter/output/console.py:67
msgid "Caption"
msgstr "Légende"
#: src/rougail/output_ansible/config.py:76
msgid "Only variables in host namespace is available by a host"
msgstr ""
"Seules les variables de l'espace de nom de l'hôte est valable pour un hôte"
#: src/rougail/output_exporter/output/console.py:92
msgid "Variables:"
msgstr "Variables :"
#: src/rougail/output_ansible/config.py:77
msgid "All variables is available for all hosts"
msgstr "Tous les variables sont valables pour tous les hôtes"
#~ msgid "The following variables are mandatory but have no value:"
#~ msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
#~ msgid ""
#~ "The following variables are inaccessible but are empty and mandatory :"
#~ msgstr ""
#~ "Les variables suiveuses sont inaccessibles mais sont vides et "
#~ "obligatoires :"
#~ msgid "Undocumented variable"
#~ msgstr "Variable non documentée"
#~ msgid "Undocumented but modified variable"
#~ msgstr "Variable non documentée mais modifiée"
#~ msgid "Unmodifiable variable"
#~ msgstr "Variable non modifiable"
#~ msgid "Default value"
#~ msgstr "Valeur par défaut"
#~ msgid "Modified value"
#~ msgstr "Valeur modifiée"
#~ msgid "Original default value"
#~ msgstr "Valeur par défaut d'origine"
#~ msgid "Caption"
#~ msgstr "Légende"
#~ msgid "Variables:"
#~ msgstr "Variables :"

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-12-29 10:03+0100\n"
"POT-Creation-Date: 2025-02-15 12:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,19 +15,44 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: src/rougail/output_ansible/__init__.py:55
#: src/rougail/output_ansible/__init__.py:57
msgid "no namespace configured"
msgstr ""
#: src/rougail/output_ansible/__init__.py:63
msgid "cannot find hosts namespace \"{0}\""
#: src/rougail/output_ansible/__init__.py:65
msgid "cannot find host namespace \"{0}\""
msgstr ""
#: src/rougail/output_ansible/__init__.py:68
msgid "malformated hosts namespace \"{0}\", should has \"hostnames\""
#: src/rougail/output_ansible/__init__.py:70
msgid "malformated host namespace \"{0}\", should have the \"hostnames\" key"
msgstr ""
#: src/rougail/output_ansible/__init__.py:95
#: src/rougail/output_ansible/__init__.py:97
msgid "cannot find \"hostnames\" in \"{0}\" namespace"
msgstr ""
#: src/rougail/output_ansible/config.py:29
#: src/rougail/output_ansible/config.py:30
msgid "parameter added only to be compatible with Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:52
msgid "Configuration of user data or output Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:62
msgid "Configuration of output Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:72
msgid "Namespace with host values"
msgstr ""
#: src/rougail/output_ansible/config.py:76
msgid "Only variables in host namespace is available by a host"
msgstr ""
#: src/rougail/output_ansible/config.py:77
msgid "All variables is available for all hosts"
msgstr ""

View file

@ -62,12 +62,12 @@ class RougailOutputAnsible(RougailOutputJson):
except AttributeError:
hosts_config = None
if not hosts_config:
self.errors.append(_('cannot find hosts namespace "{0}"').format(self.host_namespace))
self.errors.append(_('cannot find host namespace "{0}"').format(self.host_namespace))
else:
try:
hosts_config.option('hostnames').name()
except AttributeError:
self.errors.append(_('malformated hosts namespace "{0}", should has "hostnames"').format(self.host_namespace))
self.errors.append(_('malformated host namespace "{0}", should have the "hostnames" key').format(self.host_namespace))
return super().manage_errors()
return True

View file

@ -16,6 +16,7 @@ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from .i18n import _
from pathlib import Path
@ -23,57 +24,57 @@ def get_rougail_config(
*,
backward_compatibility=True,
) -> dict:
options = ["""
options = [f"""
list:
description: parameter added only to be compatible with Ansible
negative_description: parameter added only to be compatible with Ansible
description: {_('parameter added only to be compatible with Ansible')}
negative_description: {_('parameter added only to be compatible with Ansible')}
default: false
disabled:
type: jinja
jinja: |
{% if step.output != 'ansible' %}
{{% if step.output != 'ansible' %}}
disabled
{% endif %}
{{% endif %}}
json:
redefine: true
disabled:
type: jinja
jinja: |
{% if step.output != 'json' and step.output != 'ansible' %}
{{% if step.output != 'json' and step.output != 'ansible' %}}
disabled
{% endif %}
{{% endif %}}
""", """
""", f"""
ansible:
exists: true
redefine: true
description: Configuration of user data or output Ansible
description: {_('Configuration of user data or output Ansible')}
disabled:
type: jinja
jinja: |
{% if step.output != 'ansible' and 'ansible' not in step.user_data %}
{{% if step.output != 'ansible' and 'ansible' not in step.user_data %}}
disabled
{% endif %}
{{% endif %}}
""", """
""", f"""
ansible:
description: Configuration of output Ansible
description: {_('Configuration of output Ansible')}
exists: false
disabled:
variable: step.output
when_not: ansible
""", """
""", f"""
ansible:
host_namespace:
description: Namespace with host values
description: {_('Namespace with host values')}
default: "hosts"
namespace_is_hostname:
description: Only variables in hostname namespace is available by a host
negative_description: All variables is available for all hosts
description: {_('Only variables in host namespace is available by a host')}
negative_description: {_('All variables is available for all hosts')}
default: false
"""]
return {