From 94e15523f7a21b1f0f296e278580ded49871adb0 Mon Sep 17 00:00:00 2001 From: davidspindola Date: Thu, 10 Apr 2025 20:02:28 +0200 Subject: [PATCH 1/4] Traducido archivo c-api/iter --- c-api/iter.po | 63 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/c-api/iter.po b/c-api/iter.po index e00cbf2466..cd95f4dd6f 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,15 +11,16 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2021-08-16 13:04+0200\n" -"Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\n" +"PO-Revision-Date: 2025-04-10 20:00+0200\n" +"Last-Translator: David Spindola\n" "Language-Team: python-doc-es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.16.0\n" +"X-Generator: Poedit 3.6\n" #: ../Doc/c-api/iter.rst:6 msgid "Iterator Protocol" @@ -30,26 +31,25 @@ msgid "There are two functions specifically for working with iterators." msgstr "Hay dos funciones específicas para trabajar con iteradores." #: ../Doc/c-api/iter.rst:12 -#, fuzzy msgid "" -"Return non-zero if the object *o* can be safely passed to :c:func:" -"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." +"Return non-zero if the object *o* can be safely passed " +"to :c:func:`PyIter_Next`, and ``0`` otherwise. This function always " +"succeeds." msgstr "" -"Retorna un valor distinto de cero si el objeto *o* admite el protocolo de " -"iterador y ``0`` en caso contrario. Esta función siempre tiene éxito." +"Retorna un valor distinto de cero si el objeto *o* puede pasarse de manera " +"segura a :c:func:`PyIter_Next`, y ``0`` en caso contrario. Esta función " +"siempre tiene éxito." #: ../Doc/c-api/iter.rst:17 -#, fuzzy msgid "" "Return non-zero if the object *o* provides the :class:`AsyncIterator` " "protocol, and ``0`` otherwise. This function always succeeds." msgstr "" -"Retorna un valor distinto de cero si el objeto 'obj' proporciona protocolos :" -"class:`AsyncIterator` y ``0`` en caso contrario. Esta función siempre tiene " -"éxito." +"Retorna un valor distinto de cero si el objeto *o* proporciona el " +"protocolo :class:`AsyncIterator`, y ``0`` en caso contrario. Esta función " +"siempre tiene éxito." #: ../Doc/c-api/iter.rst:24 -#, fuzzy msgid "" "Return the next value from the iterator *o*. The object must be an iterator " "according to :c:func:`PyIter_Check` (it is up to the caller to check this). " @@ -57,10 +57,11 @@ msgid "" "an error occurs while retrieving the item, returns ``NULL`` and passes along " "the exception." msgstr "" -"Retorna el siguiente valor de la iteración *o*. El objeto debe ser un " -"iterador (depende de quién llama comprobar esto). Si no quedan valores " -"restantes, retorna ``NULL`` sin establecer ninguna excepción. Si se produce " -"un error al recuperar el elemento, retorna ``NULL`` y pasa la excepción." +"Retorna el siguiente valor del iterador *o*. El objeto debe ser un iterador " +"según :c:func:`PyIter_Check` (depende del llamador verificar esto). Si no " +"hay valores restantes, retorna ``NULL`` sin establecer una excepción. Si " +"ocurre un error al recuperar el elemento, devuelve ``NULL`` y envía la " +"excepción." #: ../Doc/c-api/iter.rst:30 msgid "" @@ -95,13 +96,35 @@ msgid "" " /* continue doing useful work */\n" "}" msgstr "" +"``PyObject *iterator = PyObject_GetIter(obj);``\n" +"``PyObject *item;``\n" +"\n" +"``if (iterator == NULL) {``\n" +"`` /\\* propaga el error \\*/``\n" +"``}``\n" +"\n" +"``while ((item = PyIter_Next(iterator))) {``\n" +"`` /\\* hace algo con *item* \\*/``\n" +"`` ...``\n" +"`` /\\* libera la referencia cuando termina \\*/``\n" +"`` Py_DECREF(item);``\n" +"``}``\n" +"\n" +"``Py_DECREF(iterator);``\n" +"\n" +"``if (PyErr_Occurred()) {``\n" +"`` /\\* propaga el error \\*/``\n" +"``}``\n" +"``else {``\n" +"`` /\\* continua haciendo trabajo útil \\*/``\n" +"``}``" #: ../Doc/c-api/iter.rst:59 msgid "" "The enum value used to represent different results of :c:func:`PyIter_Send`." msgstr "" -"El valor de enumeración utilizado para representar diferentes resultados de :" -"c:func:`PyIter_Send`." +"El valor de enumeración utilizado para representar diferentes resultados " +"de :c:func:`PyIter_Send`." #: ../Doc/c-api/iter.rst:66 msgid "Sends the *arg* value into the iterator *iter*. Returns:" From 8b0719f043db2d901461c1aa329eb46cb53765d4 Mon Sep 17 00:00:00 2001 From: davidspindola Date: Thu, 10 Apr 2025 22:51:50 +0200 Subject: [PATCH 2/4] Fix test sphinx-lint c-api/iter --- c-api/iter.po | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/c-api/iter.po b/c-api/iter.po index cd95f4dd6f..b207b67083 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2025-04-10 20:00+0200\n" +"PO-Revision-Date: 2025-04-10 22:41+0200\n" "Last-Translator: David Spindola\n" "Language-Team: python-doc-es\n" "Language: es\n" @@ -96,28 +96,33 @@ msgid "" " /* continue doing useful work */\n" "}" msgstr "" -"``PyObject *iterator = PyObject_GetIter(obj);``\n" -"``PyObject *item;``\n" +"PyObject ``*iterator`` = PyObject_GetIter(obj);\n" +"PyObject ``*item``;\n" "\n" -"``if (iterator == NULL) {``\n" -"`` /\\* propaga el error \\*/``\n" -"``}``\n" +"if (iterator == NULL) {\n" +" ``/*`` propaga el error ``*/``\n" +"\n" +"}\n" +"\n" +"while ((item = PyIter_Next(iterator))) {\n" +" ``/*`` hace algo con *item* ``*/``\n" +" ...\n" +" ``/*`` libera la referencia cuando termina ``*/``\n" +" Py_DECREF(item);\n" +"\n" +"}\n" +"\n" +"Py_DECREF(iterator);\n" +"\n" +"if (PyErr_Occurred()) {\n" +" ``/*`` propaga el error ``*/``\n" "\n" -"``while ((item = PyIter_Next(iterator))) {``\n" -"`` /\\* hace algo con *item* \\*/``\n" -"`` ...``\n" -"`` /\\* libera la referencia cuando termina \\*/``\n" -"`` Py_DECREF(item);``\n" -"``}``\n" +"}\n" "\n" -"``Py_DECREF(iterator);``\n" +"else {\n" +" ``/*`` continua haciendo trabajo útil ``*/``\n" "\n" -"``if (PyErr_Occurred()) {``\n" -"`` /\\* propaga el error \\*/``\n" -"``}``\n" -"``else {``\n" -"`` /\\* continua haciendo trabajo útil \\*/``\n" -"``}``" +"}" #: ../Doc/c-api/iter.rst:59 msgid "" From 67513705d6db7f6346700212f94e6685f0681439 Mon Sep 17 00:00:00 2001 From: davidspindola Date: Thu, 10 Apr 2025 22:59:10 +0200 Subject: [PATCH 3/4] Fix pospell "Occurred" c-api/iter --- c-api/iter.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c-api/iter.po b/c-api/iter.po index b207b67083..a3b1a3ca75 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2025-04-10 22:41+0200\n" +"PO-Revision-Date: 2025-04-10 22:58+0200\n" "Last-Translator: David Spindola\n" "Language-Team: python-doc-es\n" "Language: es\n" @@ -96,8 +96,8 @@ msgid "" " /* continue doing useful work */\n" "}" msgstr "" -"PyObject ``*iterator`` = PyObject_GetIter(obj);\n" -"PyObject ``*item``;\n" +"``PyObject`` ``*iterator`` = ``PyObject_GetIter(obj)``;\n" +"``PyObject`` ``*item``;\n" "\n" "if (iterator == NULL) {\n" " ``/*`` propaga el error ``*/``\n" @@ -108,13 +108,13 @@ msgstr "" " ``/*`` hace algo con *item* ``*/``\n" " ...\n" " ``/*`` libera la referencia cuando termina ``*/``\n" -" Py_DECREF(item);\n" +" ``Py_DECREF(item)``;\n" "\n" "}\n" "\n" -"Py_DECREF(iterator);\n" +"``Py_DECREF(iterator)``;\n" "\n" -"if (PyErr_Occurred()) {\n" +"if (``PyErr_Occurred()``) {\n" " ``/*`` propaga el error ``*/``\n" "\n" "}\n" From e411ee29a62aec635b685a2ce70ddd412f51037d Mon Sep 17 00:00:00 2001 From: davidspindola Date: Fri, 11 Apr 2025 00:15:57 +0200 Subject: [PATCH 4/4] Build and test pass in local --- c-api/iter.po | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/c-api/iter.po b/c-api/iter.po index a3b1a3ca75..5ebc364693 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2025-04-10 22:58+0200\n" +"PO-Revision-Date: 2025-04-10 23:48+0200\n" "Last-Translator: David Spindola\n" "Language-Team: python-doc-es\n" "Language: es\n" @@ -96,32 +96,27 @@ msgid "" " /* continue doing useful work */\n" "}" msgstr "" -"``PyObject`` ``*iterator`` = ``PyObject_GetIter(obj)``;\n" -"``PyObject`` ``*item``;\n" +"PyObject *iterator = PyObject_GetIter(obj);\n" +"PyObject *item;\n" "\n" "if (iterator == NULL) {\n" -" ``/*`` propaga el error ``*/``\n" -"\n" +" /* propagate error */\n" "}\n" "\n" "while ((item = PyIter_Next(iterator))) {\n" -" ``/*`` hace algo con *item* ``*/``\n" +" /* do something with item */\n" " ...\n" -" ``/*`` libera la referencia cuando termina ``*/``\n" -" ``Py_DECREF(item)``;\n" -"\n" +" /* release reference when done */\n" +" Py_DECREF(item);\n" "}\n" "\n" -"``Py_DECREF(iterator)``;\n" -"\n" -"if (``PyErr_Occurred()``) {\n" -" ``/*`` propaga el error ``*/``\n" +"Py_DECREF(iterator);\n" "\n" +"if (PyErr_Occurred()) {\n" +" /* propagate error */\n" "}\n" -"\n" "else {\n" -" ``/*`` continua haciendo trabajo útil ``*/``\n" -"\n" +" /* continue doing useful work */\n" "}" #: ../Doc/c-api/iter.rst:59