From 65abfc7688aa13edf29fa50fb321be0eef3c1b2a Mon Sep 17 00:00:00 2001 From: Abelardo Date: Sun, 8 Nov 2026 21:55:50 +0100 Subject: [PATCH 1/5] Traducido archivo library/array --- library/array.po | 104 +++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 57 deletions(-) diff --git a/library/array.po b/library/array.po index 7f9fff01a4..e47dd01220 100644 --- a/library/array.po +++ b/library/array.po @@ -22,12 +22,10 @@ msgstr "" "Generated-By: Babel 2.18.0\n" #: ../Doc/library/array.rst:2 -#, fuzzy msgid ":mod:`!array` --- Efficient arrays of numeric values" msgstr ":mod:`array` --- Arreglos eficientes de valores numéricos" #: ../Doc/library/array.rst:11 -#, fuzzy msgid "" "This module defines an object type which can compactly represent an array of " "basic values: characters, integers, floating-point numbers. Arrays are " @@ -114,13 +112,12 @@ msgid "\\(1)" msgstr "\\(1)" #: ../Doc/library/array.rst:27 -#, fuzzy msgid "``'w'``" -msgstr "``'u'``" +msgstr "``'w'``" #: ../Doc/library/array.rst:27 msgid "Py_UCS4" -msgstr "" +msgstr "Py_UCS4" #: ../Doc/library/array.rst:27 ../Doc/library/array.rst:37 #: ../Doc/library/array.rst:39 ../Doc/library/array.rst:45 @@ -128,9 +125,8 @@ msgid "4" msgstr "4" #: ../Doc/library/array.rst:27 -#, fuzzy msgid "\\(2)" -msgstr "\\(1)" +msgstr "\\(2)" #: ../Doc/library/array.rst:29 msgid "``'h'``" @@ -226,46 +222,42 @@ msgid "It can be 16 bits or 32 bits depending on the platform." msgstr "Puede ser de 16 bits o 32 bits según la plataforma." #: ../Doc/library/array.rst:55 -#, fuzzy msgid "" "``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated " "``Py_UNICODE``. This change doesn't affect its behavior because " "``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3." msgstr "" -"``array('u')`` ahora usa ``wchar_t`` como tipo C en lugar de ``Py_UNICODE`` " -"obsoleto. Este cambio no afecta su comportamiento porque ``Py_UNICODE`` es " -"el alias de ``wchar_t`` desde Python 3.3." +"``array('u')`` ahora usa :c:type:`wchar_t` como tipo C en lugar de " +"``Py_UNICODE`` obsoleto. Este cambio no afecta su comportamiento porque " +"``Py_UNICODE`` es el alias de :c:type:`wchar_t` desde Python 3.3." #: ../Doc/library/array.rst:60 msgid "Please migrate to ``'w'`` typecode." -msgstr "" +msgstr "Por favor, migre al código de tipo ``'w'``." #: ../Doc/library/array.rst:67 -#, fuzzy msgid "" "The actual representation of values is determined by the machine " "architecture (strictly speaking, by the C implementation). The actual size " "can be accessed through the :attr:`array.itemsize` attribute." msgstr "" "La representación real de los valores viene determinada por la arquitectura " -"de la maquina (estrictamente hablando, por la implementación de C). El " -"tamaño actual se puede obtener mediante el atributo :attr:`itemsize`." +"de la máquina (estrictamente hablando, por la implementación de C). El " +"tamaño real se puede obtener mediante el atributo :attr:`array.itemsize`." #: ../Doc/library/array.rst:71 -#, fuzzy msgid "The module defines the following item:" -msgstr "El módulo define los siguientes tipos:" +msgstr "El módulo define el siguiente elemento:" #: ../Doc/library/array.rst:76 msgid "A string with all available type codes." -msgstr "Una cadena de caracteres con todos los códigos de tipos disponible." +msgstr "Una cadena de caracteres con todos los códigos de tipo disponible." #: ../Doc/library/array.rst:79 msgid "The module defines the following type:" -msgstr "El módulo define los siguientes tipos:" +msgstr "El módulo define el siguiente tipo:" #: ../Doc/library/array.rst:84 -#, fuzzy msgid "" "A new array whose items are restricted by *typecode*, and initialized from " "the optional *initializer* value, which must be a :class:`bytes` or :class:" @@ -273,12 +265,11 @@ msgid "" "appropriate type." msgstr "" "Un nuevo arreglo cuyos elementos son restringidos por *typecode*, e " -"inicializados con el valor opcional *initializer*, el cual debe ser una " -"lista, un :term:`bytes-like object`, o un iterable sobre los elementos del " -"tipo apropiado." +"inicializados con el valor opcional *initializer*, el cual debe ser un " +"objeto :class:`bytes` o :class:`bytearray`, una cadena de texto Unicode, o " +"un iterable sobre los elementos del tipo apropiado." #: ../Doc/library/array.rst:89 -#, fuzzy msgid "" "If given a :class:`bytes` or :class:`bytearray` object, the initializer is " "passed to the new array's :meth:`frombytes` method; if given a Unicode " @@ -286,10 +277,11 @@ msgid "" "otherwise, the initializer's iterator is passed to the :meth:`extend` method " "to add initial items to the array." msgstr "" -"Si dada una lista o un string, el inicializador es pasado a los nuevos " -"métodos :meth:`fromlist`, :meth:`frombytes`, :meth:`fromunicode` del arreglo " -"(ver abajo) para añadir nuevos elementos al arreglo. De forma contraria, el " -"iterable inicializador se pasa al método :meth:`extend`." +"Si se proporciona un objeto :class:`bytes` o :class:`bytearray`, el " +"inicializador se pasa al método :meth:`frombytes` del nuevo arreglo; si se " +"proporciona una cadena de texto Unicode, el inicializador se pasa al método " +":meth:`fromunicode`; de lo contrario, el iterador del inicializador se pasa " +"al método :meth:`extend` para añadir los elementos iniciales al arreglo." #: ../Doc/library/array.rst:96 msgid "" @@ -330,7 +322,6 @@ msgid "Append a new item with value *x* to the end of the array." msgstr "Añade un nuevo elemento con valor *x* al final del arreglo." #: ../Doc/library/array.rst:122 -#, fuzzy msgid "" "Return a tuple ``(address, length)`` giving the current memory address and " "the length in elements of the buffer used to hold array's contents. The " @@ -345,9 +336,9 @@ msgstr "" "la longitud de los elementos en el buffer utilizado para almacenar " "temporalmente los elementos del arreglo. El tamaño del buffer de memoria es " "calculado como ``array.buffer_info()[1] * array.itemsize``. Ocasionalmente " -"es practico cuando trabajamos en interfaces E/S de bajo nivel (de manera " +"es práctico cuando trabajamos en interfaces E/S de bajo nivel (de manera " "inherentemente insegura) que requieren direcciones de memoria, por ejemplo " -"ciertas operaciones :c:func:`ioctl`. Los números retornados son válidos " +"ciertas operaciones :c:func:`!ioctl`. Los números retornados son válidos " "mientras el arreglo exista y no se cambie la longitud del mismo." #: ../Doc/library/array.rst:132 @@ -373,7 +364,7 @@ msgid "" "written on a machine with a different byte order." msgstr "" "\"Byteswap\" todos los elementos del arreglo. Solo es soportado para valores " -"de tamaño 1,2,3,4 o 8 bytes; para otros valores se lanza :exc:" +"de tamaño 1,2,4 o 8 bytes; para otros valores se lanza :exc:" "`RuntimeError`. Es útil cuando leemos información de un fichero en una " "máquina con diferente orden de bytes." @@ -395,20 +386,18 @@ msgstr "" "arreglo." #: ../Doc/library/array.rst:162 -#, fuzzy msgid "" "Appends items from the :term:`bytes-like object`, interpreting its content " "as an array of machine values (as if it had been read from a file using the :" "meth:`fromfile` method)." msgstr "" -"Añade los elementos de la cadena de texto, interpretando la cadena de texto " -"como un arreglo de valores máquina (como si se leyera de un fichero " -"utilizando el método :meth:`fromfile`)." +"Añade los elementos del :term:`bytes-like object`, interpretando su " +"contenido como un arreglo de valores de máquina (como si se hubiera leído de " +"un fichero utilizando el método :meth:`fromfile`)." #: ../Doc/library/array.rst:166 -#, fuzzy msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity." -msgstr ":meth:`fromstring` se renombra como :meth:`frombytes` por claridad." +msgstr ":meth:`!fromstring` se renombra como :meth:`frombytes` por claridad." #: ../Doc/library/array.rst:172 msgid "" @@ -431,15 +420,14 @@ msgstr "" "append(x)`` excepto que si hay un error de tipo, el arreglo no se modifica." #: ../Doc/library/array.rst:186 -#, fuzzy msgid "" "Extends this array with data from the given Unicode string. The array must " "have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. " "Use ``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to " "an array of some other type." msgstr "" -"Extiende este arreglo con datos de la cadena de texto unicode. El arreglo " -"debe ser un arreglo tipo ``'u'``; de forma contraria se lanza :exc:" +"Extiende este arreglo con datos de la cadena de texto Unicode. El arreglo " +"debe ser un arreglo tipo ``'u'`` o ``'w'``; de forma contraria se lanza :exc:" "`ValueError`. Utiliza ``array.frombytes(unicodestring.encode(enc))`` para " "añadir datos Unicode a un arreglo de algún otro tipo." @@ -483,9 +471,8 @@ msgid "Remove the first occurrence of *x* from the array." msgstr "Elimina la primera ocurrencia de *x* del arreglo." #: ../Doc/library/array.rst:223 -#, fuzzy msgid "Remove all elements from the array." -msgstr "Elimina la primera ocurrencia de *x* del arreglo." +msgstr "Elimina todos los elementos del arreglo." #: ../Doc/library/array.rst:230 msgid "Reverse the order of the items in the array." @@ -502,14 +489,13 @@ msgstr "" "escribir en un fichero por el método :meth:`tofile`.)" #: ../Doc/library/array.rst:239 -#, fuzzy msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity." -msgstr ":meth:`tostring` se renombra como :meth:`tobytes` para claridad." +msgstr ":meth:`!tostring` se renombra como :meth:`tobytes` por claridad." #: ../Doc/library/array.rst:245 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "" -"Escribe todos los elementos (incluido elementos máquina) a el :term:`file " +"Escribe todos los elementos (como valores de máquina) al :term:`file " "object` *f*." #: ../Doc/library/array.rst:250 @@ -517,19 +503,17 @@ msgid "Convert the array to an ordinary list with the same items." msgstr "Convierte el arreglo a una lista ordinaria con los mismos elementos." #: ../Doc/library/array.rst:255 -#, fuzzy msgid "" "Convert the array to a Unicode string. The array must have a type ``'u'`` " "or ``'w'``; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." "decode(enc)`` to obtain a Unicode string from an array of some other type." msgstr "" -"Convierte el arreglo a una cadena de texto unicode. El arreglo debe ser un " -"arreglo tipo ``'u'`` ; en caso contrario se lanza :exc:`ValueError`. Utiliza " -"``array.tobytes().decode(enc)`` para obtener una cadena de texto unicode de " -"un arreglo de algún otro tipo." +"Convierte el arreglo a una cadena de texto Unicode. El arreglo debe ser un " +"arreglo tipo ``'u'`` o ``'w'``; en caso contrario se lanza :exc:`ValueError`. " +"Utiliza ``array.tobytes().decode(enc)`` para obtener una cadena de texto " +"Unicode de un arreglo de algún otro tipo." #: ../Doc/library/array.rst:260 -#, fuzzy msgid "" "The string representation of array objects has the form ``array(typecode, " "initializer)``. The *initializer* is omitted if the array is empty, " @@ -544,11 +528,13 @@ msgstr "" "Cuando un objeto se imprime o se convierte a una cadena de texto, este se " "representa como ``array(typecode, initializer)``. El *initializer* se omite " "cuando el arreglo está vacío, de forma contraria es una cadena de caracteres " -"si su *typecode* es ``'u'``, de lo contrario es una lista de números. La " -"cadena de caracteres garantiza que es capaz de ser convertida de nuevo a un " -"arreglo con el mismo tipo y valor utilizando :func:`eval`, hasta que la " -"clase :class:`~array.array` ha sido importada utilizando ``from array import " -"array``. Ejemplos::" +"si su *typecode* es ``'u'`` o ``'w'``, de lo contrario es una lista de " +"números. Se garantiza que la cadena de caracteres puede convertirse de nuevo " +"a un arreglo con el mismo tipo y valor utilizando :func:`eval`, siempre que " +"la clase :class:`~array.array` se haya importado utilizando ``from array " +"import array``. Las variables ``inf`` y ``nan`` también deben estar " +"definidas si contiene los valores de punto flotante correspondientes. " +"Ejemplos::" #: ../Doc/library/array.rst:272 msgid "" @@ -557,6 +543,10 @@ msgid "" "array('l', [1, 2, 3, 4, 5])\n" "array('d', [1.0, 2.0, 3.14, -inf, nan])" msgstr "" +"array('l')\n" +"array('w', 'hola \\u2641')\n" +"array('l', [1, 2, 3, 4, 5])\n" +"array('d', [1.0, 2.0, 3.14, -inf, nan])" #: ../Doc/library/array.rst:280 msgid "Module :mod:`struct`" From 2cd42a83fe5f4a819c1ac358b46833d21e0575ac Mon Sep 17 00:00:00 2001 From: Abelardo Date: Sun, 8 Nov 2026 22:17:26 +0100 Subject: [PATCH 2/5] Traducido archivo library/array --- .github/workflows/pr-comment.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 97c12fa919..fbd70c23ae 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -1,3 +1,4 @@ + name: Agrega comentario a PR on: @@ -18,11 +19,14 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false + allow-unsafe-pr-checkout: true + - name: Preparar Python v3.13 uses: actions/setup-python@v7 with: python-version: "3.13" cache: "pip" + # checkout these files from the base branch to guarantee they haven't been # modified by the PR - uses: actions/checkout@v6 @@ -32,15 +36,18 @@ jobs: sparse-checkout: | requirements-own.txt scripts/list_missing_entries.py + - name: Instalar dependencias run: | python -m pip install -r base-branch/requirements-own.txt + - name: Obtiene lista de archivos con cambios id: changed-files uses: tj-actions/changed-files@v47 with: files: | **/*.po + - name: Calcular entradas faltantes if: steps.changed-files.outputs.any_changed == 'true' id: create-pr-comment From 607c5bc33f47e20f5d742e45840b45c7f40d26d2 Mon Sep 17 00:00:00 2001 From: Abelardo Date: Sun, 8 Nov 2026 22:26:49 +0100 Subject: [PATCH 3/5] Traducido archivo library/array --- .github/workflows/pr-comment.yml | 96 ++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index fbd70c23ae..8802d0eb69 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -6,6 +6,7 @@ on: permissions: contents: read + pull-requests: read jobs: define-comment: @@ -14,39 +15,94 @@ jobs: outputs: any_changed: ${{ steps.changed-files.outputs.any_changed }} comment: ${{ steps.create-pr-comment.outputs.comment }} + steps: + # Obtener únicamente los archivos del repositorio original - uses: actions/checkout@v6 with: - ref: ${{ github.event.pull_request.head.sha }} + path: base-branch persist-credentials: false - allow-unsafe-pr-checkout: true - name: Preparar Python v3.13 uses: actions/setup-python@v7 with: python-version: "3.13" cache: "pip" + cache-dependency-path: base-branch/requirements-own.txt - # checkout these files from the base branch to guarantee they haven't been - # modified by the PR - - uses: actions/checkout@v6 + # Obtener los archivos .po modificados mediante la API + - name: Obtiene lista de archivos con cambios + id: changed-files + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: - path: base-branch - sparse-checkout-cone-mode: false - sparse-checkout: | - requirements-own.txt - scripts/list_missing_entries.py + files: | + **/*.po - name: Instalar dependencias + if: steps.changed-files.outputs.any_changed == 'true' run: | python -m pip install -r base-branch/requirements-own.txt - - name: Obtiene lista de archivos con cambios - id: changed-files - uses: tj-actions/changed-files@v47 - with: - files: | - **/*.po + # Descargar los archivos modificados como datos, sin ejecutar su código + - name: Descargar archivos PO de la Pull Request + if: steps.changed-files.outputs.any_changed == 'true' + env: + GH_TOKEN: ${{ github.token }} + GH_REPOSITORY: ${{ github.repository }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + CHANGED_PO_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + python - <<'PY' + import base64 + import json + import os + import pathlib + import urllib.parse + import urllib.request + + repository = os.environ["GH_REPOSITORY"] + commit = os.environ["PR_HEAD_SHA"] + token = os.environ["GH_TOKEN"] + files = os.environ["CHANGED_PO_FILES"].splitlines() + + api_url = os.environ["GITHUB_API_URL"] + + for filename in files: + path = pathlib.PurePosixPath(filename) + + if path.is_absolute() or ".." in path.parts: + raise ValueError(f"Ruta no permitida: {filename}") + + if path.suffix != ".po": + raise ValueError(f"Archivo no permitido: {filename}") + + url = ( + f"{api_url}/repos/{repository}/contents/" + f"{urllib.parse.quote(filename, safe='/')}" + f"?ref={commit}" + ) + + request = urllib.request.Request( + url, + headers={ + "Authorization": f"Bearer {token}", + "Accept": "application/vnd.github+json", + "X-GitHub-Api-Version": "2022-11-28", + }, + ) + + with urllib.request.urlopen(request) as response: + data = json.loads(response.read()) + + if data.get("encoding") != "base64": + raise ValueError(f"Formato inesperado: {filename}") + + destination = pathlib.Path("pr-files") / filename + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_bytes( + base64.b64decode(data["content"]) + ) + PY - name: Calcular entradas faltantes if: steps.changed-files.outputs.any_changed == 'true' @@ -54,9 +110,13 @@ jobs: env: CHANGED_PO_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | + cd pr-files + + mapfile -t PO_FILES <<< "$CHANGED_PO_FILES" + { echo 'comment<> "$GITHUB_OUTPUT" @@ -64,9 +124,11 @@ jobs: runs-on: ubuntu-22.04 needs: [define-comment] if: needs.define-comment.outputs.any_changed == 'true' + permissions: issues: write pull-requests: write + steps: - name: Agregar comentario con entradas faltantes uses: thollander/actions-comment-pull-request@v3 From 4f74c1df03d950c3011667833bf010feb87b5dab Mon Sep 17 00:00:00 2001 From: Abelardo Date: Sun, 8 Nov 2026 22:27:45 +0100 Subject: [PATCH 4/5] Traducido archivo library/array --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5ad131212..b22beb27f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,4 @@ + name: Test on: @@ -47,12 +48,12 @@ jobs: # Cálculo de los archivos .po a verificar. # En el caso de un PR, sólo se chequean los .po que se están editando, - # mientras que en caseo de un push a las ramas 3.* queremos revisar + # mientras que en caso de un push a las ramas 3.* queremos revisar # todos los archivos - name: Obtiene la lista de archivos .po con cambios (sólo en PRs) if: github.event_name == 'pull_request' id: changed-po-files - uses: tj-actions/changed-files@v47 + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: files: | **/*.po From a4b510619d3262a51bbd99caea3c5c74f6b571b7 Mon Sep 17 00:00:00 2001 From: Abelardo Date: Sun, 8 Nov 2026 22:32:48 +0100 Subject: [PATCH 5/5] Traducido archivo library/array --- .github/workflows/pr-comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 8802d0eb69..4639cf55dd 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -20,6 +20,7 @@ jobs: # Obtener únicamente los archivos del repositorio original - uses: actions/checkout@v6 with: + ref: ${{ github.event.pull_request.base.sha }} path: base-branch persist-credentials: false