From 0eaee7459932ef2b285fe7e479aeb59ad858c0ac Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 17 Feb 2025 09:54:47 +0100 Subject: [PATCH] fix: translation --- .../fr/LC_MESSAGES/rougail_output_ansible.po | 102 ++++++++++++------ locale/rougail_output_ansible.pot | 39 +++++-- src/rougail/output_ansible/__init__.py | 4 +- src/rougail/output_ansible/config.py | 35 +++--- .../fr/LC_MESSAGES/rougail_output_ansible.mo | Bin 1125 -> 1313 bytes 5 files changed, 122 insertions(+), 58 deletions(-) diff --git a/locale/fr/LC_MESSAGES/rougail_output_ansible.po b/locale/fr/LC_MESSAGES/rougail_output_ansible.po index 418a75a..d4b72d0 100644 --- a/locale/fr/LC_MESSAGES/rougail_output_ansible.po +++ b/locale/fr/LC_MESSAGES/rougail_output_ansible.po @@ -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 :" diff --git a/locale/rougail_output_ansible.pot b/locale/rougail_output_ansible.pot index cea5bc1..6651e34 100644 --- a/locale/rougail_output_ansible.pot +++ b/locale/rougail_output_ansible.pot @@ -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 \n" "Language-Team: LANGUAGE \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 "" + diff --git a/src/rougail/output_ansible/__init__.py b/src/rougail/output_ansible/__init__.py index 5bbed20..0788167 100644 --- a/src/rougail/output_ansible/__init__.py +++ b/src/rougail/output_ansible/__init__.py @@ -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 diff --git a/src/rougail/output_ansible/config.py b/src/rougail/output_ansible/config.py index 92ae530..12b2145 100644 --- a/src/rougail/output_ansible/config.py +++ b/src/rougail/output_ansible/config.py @@ -16,6 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . """ +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 { diff --git a/src/rougail/output_ansible/locale/fr/LC_MESSAGES/rougail_output_ansible.mo b/src/rougail/output_ansible/locale/fr/LC_MESSAGES/rougail_output_ansible.mo index a6ac73d1240bfd44019fbfcc24ca22d4bcb63051..2b91502a901a2fa46f0b0974661a3f4c6684c9ae 100644 GIT binary patch literal 1313 zcmZ{jO=}ZD7{^DgZvhd!2u12cF1~J?#0E=Lq-vEyYpYiA;AOJ=B$=|AS$1ZlLA(fl z0m1LkdiErq%=ZvH^sXO3@ISlTCaJja__ylZ%8^?sGf*-)!;0|~N z+ymFZvonR?D{ukpkKi2m9lQ(v1d&3Vg!u=@1YU{buv0MK4^rjN3H+We|BK}~rh!bA zY{zU#S&{>(V!xt}Nl9Y6XRNd0zR?}k%~I)<(PTPgGM8kImbF#z{&zpKoKhs6B*Z!7 z{8;wcCNgAttz0k9fGXmQt=Q1OIF>g{#nJ;#F8S&XGuDiZUGfl2ODF8DFb2)Mg4zKf!4H-13(8$FiB4 zZ4OP@OQT8oRwywo<8W zES*Vla!u-PCc7MLvFuN*ThvJ_>#OT4<1F?0S_PNpSR=+TK@!Jr+(HsdrEgK#lc{BQ z=lRydU}@~#{3(xR7>?8$ayGqcRhM)Mx} z5Pb*ldaJMCGx!36|H)?aA;p1{U*_aL=PT#e+R`_Ma~HM_bFfv|512nI*BHA6u7dZ# zC*Xas0X_s@g9l(6+y=jbPr;wy1Mv5R%hwqTa9;=ifDQ0A`0NH_YhV*x0e3)O#|hX1 zHMk3Y2OA(;V(c;S9DD@sfWG#RAX1Hw&vOUn>s}svst-sQ!Z4&B=l1XFbF==kD+(vI zVtdpVW$yS;%xu^%I3aByle@Tl_I0CLt-#@Pk7%1?Zfu|EKA&sf?bV{6k?1DByse` zZ4|kX>J9Im3uDQ>J?$KX+cTZd)h83~s~#qxvV?DUr3>DZB7;KH@ZBik#V8}^gEfm0 zkDIT858*`MYdqGJO2=Qq&svuk8L5;ok(^4y3t@PAd4UCSwX2%n<;7JRo;LJ&VTiS` z4fWJ5x1}6XY2mZzaA8F(HbPGPLzzNCj_YnNGmKCg+>d6CppELyd{@;1{i|CHFx#T3-xvB92xdMo