diff --git a/dictionaries/library_tokenize.txt b/dictionaries/library_tokenize.txt new file mode 100644 index 0000000000..8b8ea86c7d --- /dev/null +++ b/dictionaries/library_tokenize.txt @@ -0,0 +1 @@ +tokenización diff --git a/library/tokenize.po b/library/tokenize.po index bee100028c..1b0dc8c6d1 100644 --- a/library/tokenize.po +++ b/library/tokenize.po @@ -6,27 +6,29 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-07-25 21:23+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: Ignasi Fosch \n" +"Language: es\n" +"X-Generator: Poedit 2.3.1\n" #: ../Doc/library/tokenize.rst:2 msgid ":mod:`tokenize` --- Tokenizer for Python source" -msgstr "" +msgstr ":mod:`tokenize` --- Conversor a tokens para código Python" #: ../Doc/library/tokenize.rst:10 msgid "**Source code:** :source:`Lib/tokenize.py`" -msgstr "" +msgstr "**Código fuente:** :source:`Lib/tokenize.py`" #: ../Doc/library/tokenize.rst:14 msgid "" @@ -35,6 +37,10 @@ msgid "" "tokens as well, making it useful for implementing \"pretty-printers\", " "including colorizers for on-screen displays." msgstr "" +"El módulo :mod:`tokenize` provee un analizador léxico para código fuente " +"Python, implementado en Python. Este analizador también retorna comentarios " +"como tokens, siendo útil para implementar *\"pretty-printers\"*, como " +"*colorizers* para impresiones en pantalla." #: ../Doc/library/tokenize.rst:19 msgid "" @@ -44,14 +50,19 @@ msgid "" "checking the ``exact_type`` property on the :term:`named tuple` returned " "from :func:`tokenize.tokenize`." msgstr "" +"Para simplificar el manejo de flujos de tokens, todos los tokens :ref:" +"`operator ` y :ref:`delimiter ` y :data:`Ellipsis` se " +"retorna usando el tipo genérico :data:`~token.OP`. El tipo exacto se puede " +"determinar usando la propiedad ``exact_type`` en la :term:`named tuple` " +"retornada por :func:`tokenize.tokenize`." #: ../Doc/library/tokenize.rst:26 msgid "Tokenizing Input" -msgstr "" +msgstr "Convirtiendo la entrada en *tokens*" #: ../Doc/library/tokenize.rst:28 msgid "The primary entry point is a :term:`generator`:" -msgstr "" +msgstr "El punto de entrada principal es un :term:`generador`:" #: ../Doc/library/tokenize.rst:32 msgid "" @@ -60,6 +71,10 @@ msgid "" "IOBase.readline` method of file objects. Each call to the function should " "return one line of input as bytes." msgstr "" +"El generador :func:`.tokenize` requiere un argumento, *readline*, que debe " +"ser un objeto invocable que provee la misma interfaz que el método :meth:`io." +"IOBase.readline` de los objetos archivos. Cada llamada a la función debe " +"retornar una línea de entrada como bytes." #: ../Doc/library/tokenize.rst:37 msgid "" @@ -71,6 +86,14 @@ msgid "" "is the *physical* line. The 5 tuple is returned as a :term:`named tuple` " "with the field names: ``type string start end line``." msgstr "" +"El generador produce una tupla con los siguientes 5 miembros: El tipo de " +"token, la cadena del token, una tupla ``(srow, scol)`` de enteros " +"especificando la fila y columna donde el token empieza en el código, una " +"``(erow, ecol)`` de enteros especificando la fila y columna donde el token " +"acaba en el código, y la línea en la que se encontró el token. La línea " +"pasada (el último elemento de la tupla) es la línea *física*. La tupla se " +"retorna como una :term:`named tuple` con los campos: ``type string start end " +"line``." #: ../Doc/library/tokenize.rst:46 msgid "" @@ -79,24 +102,31 @@ msgid "" "tokens. For all other token types ``exact_type`` equals the named tuple " "``type`` field." msgstr "" +"La :term:`named tuple` retorna tiene una propiedad adicional llamada " +"``exact_type`` que contiene el tipo de operador exacto para tokens :data:" +"`~token.OP`. Para todos los otros tipos de token, ``exact_type`` es el valor " +"del campo ``type`` de la tupla con su respectivo nombre." #: ../Doc/library/tokenize.rst:51 msgid "Added support for named tuples." -msgstr "" +msgstr "Añadido soporte para tuplas con nombre." #: ../Doc/library/tokenize.rst:54 msgid "Added support for ``exact_type``." -msgstr "" +msgstr "Añadido soporte para ``exact_type``." #: ../Doc/library/tokenize.rst:57 msgid "" ":func:`.tokenize` determines the source encoding of the file by looking for " "a UTF-8 BOM or encoding cookie, according to :pep:`263`." msgstr "" +":func:`tokenize` determina la codificación del fichero buscando una marca " +"BOM UTF-8 o una *cookie* de codificación, de acuerdo con :pep:`263`." #: ../Doc/library/tokenize.rst:62 msgid "Tokenize a source reading unicode strings instead of bytes." msgstr "" +"Convertir a tokens una fuente leyendo cadenas unicode en lugar de bytes." #: ../Doc/library/tokenize.rst:64 msgid "" @@ -104,18 +134,25 @@ msgid "" "single line of input. However, :func:`generate_tokens` expects *readline* to " "return a str object rather than bytes." msgstr "" +"Como :func:`.tokenize`, el argumento *readline* es un invocable que retorna " +"una sola línea de entrada. Sin embargo, :func:`generate_tokens` espera que " +"*readline* devuelva un objeto *str* en lugar de *bytes*." #: ../Doc/library/tokenize.rst:68 msgid "" "The result is an iterator yielding named tuples, exactly like :func:`." "tokenize`. It does not yield an :data:`~token.ENCODING` token." msgstr "" +"El resultado es un iterador que produce tuplas con nombre, exactamente como :" +"func:`.tokenize`. No produce un token :data:`~token.ENCODING`." #: ../Doc/library/tokenize.rst:71 msgid "" "All constants from the :mod:`token` module are also exported from :mod:" "`tokenize`." msgstr "" +"Todas las constantes del módulo :mod:`token` se exportan también desde :mod:" +"`tokenize`." #: ../Doc/library/tokenize.rst:74 msgid "" @@ -123,6 +160,9 @@ msgid "" "useful for creating tools that tokenize a script, modify the token stream, " "and write back the modified script." msgstr "" +"Otra función se encarga de invertir el proceso de conversión. Esto es útil " +"para crear herramientas que convierten a tokens un script, modificar el " +"flujo de token, y escribir el script modificado." #: ../Doc/library/tokenize.rst:81 msgid "" @@ -130,6 +170,9 @@ msgid "" "sequences with at least two elements, the token type and the token string. " "Any additional sequence elements are ignored." msgstr "" +"Convierte los *tokens* de vuelta en código fuente Python. El *iterable* debe " +"retornar secuencias con al menos dos elementos, el tipo de *token* y la " +"cadena del *token*. Cualquier otro elemento de la secuencia es ignorado." #: ../Doc/library/tokenize.rst:85 msgid "" @@ -139,6 +182,12 @@ msgid "" "token type and token string as the spacing between tokens (column positions) " "may change." msgstr "" +"El *script* reconstruido se retorna como una cadena simple. El resultado " +"está garantizado de que se convierte en *tokens* de vuelta a la misma " +"entrada, de modo que la conversión no tiene pérdida y que las conversiones " +"de ida y de vuelta están aseguradas. La garantía aplica sólo al tipo y la " +"cadena del *token*, ya que el espaciado entre *tokens* (posiciones de " +"columna) pueden variar." #: ../Doc/library/tokenize.rst:91 msgid "" @@ -146,12 +195,18 @@ msgid "" "the first token sequence output by :func:`.tokenize`. If there is no " "encoding token in the input, it returns a str instead." msgstr "" +"Retorna bytes, codificados usando el token :data:`~token.ENCODING`, que es " +"el primer elemento de la secuencia retornada por :func:`.tokenize`. Si no " +"hay un token de codificación en la entrada, retorna una cadena." #: ../Doc/library/tokenize.rst:96 msgid "" ":func:`.tokenize` needs to detect the encoding of source files it tokenizes. " "The function it uses to do this is available:" msgstr "" +":func:`.tokenize` necesita detectar la codificación de los ficheros fuente " +"que convierte a tokens. La función que utiliza para hacer esto está " +"disponible como:" #: ../Doc/library/tokenize.rst:101 msgid "" @@ -159,12 +214,18 @@ msgid "" "should be used to decode a Python source file. It requires one argument, " "readline, in the same way as the :func:`.tokenize` generator." msgstr "" +"La función :func:`detect_encoding` se usa para detectar la codificación que " +"debería usarse al leer un fichero fuente Python. Requiere un argumento, " +"*readline*, del mismo modo que el generador :func:`.tokenize`." #: ../Doc/library/tokenize.rst:105 msgid "" "It will call readline a maximum of twice, and return the encoding used (as a " "string) and a list of any lines (not decoded from bytes) it has read in." msgstr "" +"Llamará a *readline* un máximo de dos veces, retornando la codificación " +"usada, como cadena, y una lista del resto de líneas leídas, no " +"descodificadas de *bytes*." #: ../Doc/library/tokenize.rst:109 msgid "" @@ -173,34 +234,46 @@ msgid "" "but disagree, a :exc:`SyntaxError` will be raised. Note that if the BOM is " "found, ``'utf-8-sig'`` will be returned as an encoding." msgstr "" +"Detecta la codificación a partir de la presencia de una marca BOM UTF-8 o " +"una *cookie* de codificación, como se especifica en :pep:`263`. Si ambas " +"están presentes pero en desacuerdo, se lanzará un :exc:`SyntaxError`. " +"Resaltar que si se encuentra la marca BOM, se retornará ``'utf-8-sig'`` como " +"codificación." #: ../Doc/library/tokenize.rst:114 msgid "" "If no encoding is specified, then the default of ``'utf-8'`` will be " "returned." msgstr "" +"Si no se especifica una codificación, por defecto se retornará ``'utf-8'``." #: ../Doc/library/tokenize.rst:117 msgid "" "Use :func:`.open` to open Python source files: it uses :func:" "`detect_encoding` to detect the file encoding." msgstr "" +"Usa :func:`.open` para abrir ficheros fuente Python: Ésta utiliza :func:" +"`detect_encoding` para detectar la codificación del fichero." #: ../Doc/library/tokenize.rst:123 msgid "" "Open a file in read only mode using the encoding detected by :func:" "`detect_encoding`." msgstr "" +"Abrir un fichero en modo sólo lectura usando la codificación detectada por :" +"func:`detect_encoding`." #: ../Doc/library/tokenize.rst:130 msgid "" "Raised when either a docstring or expression that may be split over several " "lines is not completed anywhere in the file, for example::" msgstr "" +"Lanzada cuando una expresión o docstring que puede separarse en más líneas " +"no está completa en el fichero, por ejemplo::" #: ../Doc/library/tokenize.rst:136 msgid "or::" -msgstr "" +msgstr "o::" #: ../Doc/library/tokenize.rst:142 msgid "" @@ -208,48 +281,56 @@ msgid "" "They are tokenized as :data:`~token.ERRORTOKEN`, followed by the " "tokenization of their contents." msgstr "" +"Destacar que cadenas con comillas simples sin finalizar no lanzan un error. " +"Se convertirán en tokens como :data:`~token.ERRORTOKEN`, seguido de la " +"conversión de su contenido." #: ../Doc/library/tokenize.rst:150 msgid "Command-Line Usage" -msgstr "" +msgstr "Uso como línea de comandos" #: ../Doc/library/tokenize.rst:154 msgid "" "The :mod:`tokenize` module can be executed as a script from the command " "line. It is as simple as:" msgstr "" +"El módulo :mod:`tokenize` se puede ejecutar como script desde la línea de " +"comandos. Es tan simple como:" #: ../Doc/library/tokenize.rst:161 msgid "The following options are accepted:" -msgstr "" +msgstr "Se aceptan las siguientes opciones:" #: ../Doc/library/tokenize.rst:167 msgid "show this help message and exit" -msgstr "" +msgstr "muestra el mensaje de ayuda y sale" #: ../Doc/library/tokenize.rst:171 msgid "display token names using the exact type" -msgstr "" +msgstr "muestra los nombres de token usando el tipo exacto" #: ../Doc/library/tokenize.rst:173 msgid "" "If :file:`filename.py` is specified its contents are tokenized to stdout. " "Otherwise, tokenization is performed on stdin." msgstr "" +"Si se especifica :file:`filename.py`, se convierte su contenido a tokens por " +"la salida estándar. En otro caso, se convierte la entrada estándar." #: ../Doc/library/tokenize.rst:177 msgid "Examples" -msgstr "" +msgstr "Ejemplos" #: ../Doc/library/tokenize.rst:179 msgid "" "Example of a script rewriter that transforms float literals into Decimal " "objects::" msgstr "" +"Ejemplo de un script que transforma literales float en objetos Decimal::" #: ../Doc/library/tokenize.rst:221 msgid "Example of tokenizing from the command line. The script::" -msgstr "" +msgstr "Ejemplo de conversión desde la línea de comandos. El *script*::" #: ../Doc/library/tokenize.rst:228 msgid "" @@ -258,18 +339,25 @@ msgid "" "column is the name of the token, and the final column is the value of the " "token (if any)" msgstr "" +"se convertirá en la salida siguiente, donde la primera columna es el rango " +"de coordenadas línea/columna donde se encuentra el token, la segunda columna " +"es el nombre del token, y la última columna es el valor del token, si lo hay" #: ../Doc/library/tokenize.rst:256 msgid "" "The exact token type names can be displayed using the :option:`-e` option:" msgstr "" +"Los nombres de tipos de token exactos se pueden mostrar con la opción :" +"option:`-e`:" #: ../Doc/library/tokenize.rst:282 msgid "" "Example of tokenizing a file programmatically, reading unicode strings " "instead of bytes with :func:`generate_tokens`::" msgstr "" +"Ejemplo de tokenización de un fichero programáticamente, leyendo cadenas " +"unicode en lugar de *bytes* con :func:`generate_tokens`::" #: ../Doc/library/tokenize.rst:292 msgid "Or reading bytes directly with :func:`.tokenize`::" -msgstr "" +msgstr "O leyendo *bytes* directamente con :func:`.tokenize`::"