Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Script rst2po.py to migrate tutorial.python.org.ar to this new version #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
May 2, 2020
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3be6970
Tutorial PyAr submodule
humitos May 2, 2020
f71c1fd
rst2po.py
humitos May 2, 2020
3951c61
Skel for the rst2po.py script
humitos May 2, 2020
3cea73b
Merge branch '3.7' into rst2po
humitos May 2, 2020
8cbe9ed
About to start the (english, spanish) mapping list
humitos May 2, 2020
a274828
Merge branch '3.7' of github.com:raulcd/python-docs-es into rst2po
humitos May 2, 2020
5e07374
Merge branch 'rst2po' of github.com:raulcd/python-docs-es into rst2po
humitos May 2, 2020
25b5aa7
Initial working version of rst2po.py
humitos May 2, 2020
9ff4f8c
Only save translated files
humitos May 2, 2020
cfb3344
Use tutorialpyar with fixes
humitos May 2, 2020
4a30a79
First pass reviewed
humitos May 2, 2020
7f679cf
ignore ! when comparing
gilgamezh May 2, 2020
5144e29
update translation
gilgamezh May 2, 2020
d7569d2
More translations
humitos May 2, 2020
ae92662
Merge branch 'rst2po' of github.com:raulcd/python-docs-es into rst2po
humitos May 2, 2020
72b4d3d
More inputoutput
humitos May 2, 2020
cf3a545
update datastructures.po translation (migration)
gilgamezh May 2, 2020
08e56cc
Update tutorialpyar submodule
humitos May 2, 2020
2b39104
update datastructures.po translation (migration)
gilgamezh May 2, 2020
7e9682c
update datastructures.po translation (migration)
gilgamezh May 2, 2020
5ba9b04
Merge branch 'rst2po' of github.com:raulcd/python-docs-es into rst2po
gilgamezh May 2, 2020
bfc7aec
Classes
humitos May 2, 2020
2a7a07f
Update tutorialpyar with fixes
humitos May 2, 2020
81a7350
Merge branch 'rst2po' of github.com:raulcd/python-docs-es into rst2po
humitos May 2, 2020
76368ac
Translate errors.po
humitos May 2, 2020
0dc54d5
modules.po
humitos May 2, 2020
a4d592e
stdlib.po translated from pyar tutorial
humitos May 2, 2020
3b5c9d0
update stdlib2 translation (migration)
gilgamezh May 2, 2020
edd1505
update stdlib2 translation (migration)
gilgamezh May 2, 2020
322f1a7
update submodule
gilgamezh May 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More inputoutput
  • Loading branch information
humitos committed May 2, 2020
commit 72b4d3d3414e7e032b6a6476e049f81dc45a8e55
169 changes: 133 additions & 36 deletions tutorial/inputoutput.po
Original file line number Diff line number Diff line change
Expand Up @@ -342,98 +342,150 @@ msgid ""
"endings (``\\n`` on Unix, ``\\r\\n`` on Windows) to just ``\\n``. When "
"writing in text mode, the default is to convert occurrences of ``\\n`` back "
"to platform-specific line endings. This behind-the-scenes modification to "
"file data is fine for text files, but will corrupt binary data like that in :"
"file:`JPEG` or :file:`EXE` files. Be very careful to use binary mode when "
"file data is fine for text files, but will corrupt binary data like that in "
":file:`JPEG` or :file:`EXE` files. Be very careful to use binary mode when "
"reading and writing such files."
msgstr ""
"Cuando se lee en modo texto, por defecto se convierten los fines de lineas "
"que son específicos a las plataformas (``\\n`` en Unix, ``\\r\\n`` en "
"Windows) a solamente ``\\n``. Cuando se escribe en modo texto, por defecto "
"se convierten los ``\\n`` a los finales de linea específicos de la "
"plataforma. Este cambio automático está bien para archivos de texto, pero "
"corrompería datos binarios como los de archivos :file:`JPEG` o :file:`EXE`."
" Asegurate de usar modo binario cuando leas y escribas tales archivos."

#: ../Doc/tutorial/inputoutput.rst:317
msgid ""
"It is good practice to use the :keyword:`with` keyword when dealing with "
"file objects. The advantage is that the file is properly closed after its "
"suite finishes, even if an exception is raised at some point. Using :"
"keyword:`!with` is also much shorter than writing equivalent :keyword:`try`"
"\\ -\\ :keyword:`finally` blocks::"
"suite finishes, even if an exception is raised at some point. Using "
":keyword:`!with` is also much shorter than writing equivalent "
":keyword:`try`\\ -\\ :keyword:`finally` blocks::"
msgstr ""
"Es una buena práctica usar la declaración :keyword:`with` cuando manejamos "
"objetos archivo. Tiene la ventaja que el archivo es cerrado apropiadamente "
"luego de que el bloque termina, incluso si se generó una excepción. También"
" es mucho más corto que escribir los equivalentes bloques :keyword:`try`\\ "
"-\\ :keyword:`finally` ::"

#: ../Doc/tutorial/inputoutput.rst:328
msgid ""
"If you're not using the :keyword:`with` keyword, then you should call ``f."
"close()`` to close the file and immediately free up any system resources "
"used by it. If you don't explicitly close a file, Python's garbage collector "
"will eventually destroy the object and close the open file for you, but the "
"file may stay open for a while. Another risk is that different Python "
"implementations will do this clean-up at different times."
msgstr ""
"If you're not using the :keyword:`with` keyword, then you should call "
"``f.close()`` to close the file and immediately free up any system resources"
" used by it. If you don't explicitly close a file, Python's garbage "
"collector will eventually destroy the object and close the open file for "
"you, but the file may stay open for a while. Another risk is that different"
" Python implementations will do this clean-up at different times."
msgstr ""
"Si no estuvieses usando el bloque :keyword:`with`, entonces deberías llamar "
"``f.close()`` para cerrar el archivo e inmediatamente liberar cualquier "
"recurso del sistema usado por este. Si no cierras explícitamente el archivo,"
" el «garbage collector» de Python eventualmente destruirá el objeto y "
"cerrará el archivo por vos, pero el archivo puede estar abierto por un "
"tiempo. Otro riesgo es que diferentes implementaciones de Python harán esta "
"limpieza en diferentes momentos."

#: ../Doc/tutorial/inputoutput.rst:336
msgid ""
"After a file object is closed, either by a :keyword:`with` statement or by "
"calling ``f.close()``, attempts to use the file object will automatically "
"fail. ::"
msgstr ""
"Después de que un objeto de archivo es cerrado, ya sea por :keyword:`with` o"
" llamando a ``f.close()``, intentar volver a utilizarlo fallará "
"automáticamente::"

#: ../Doc/tutorial/inputoutput.rst:350
msgid "Methods of File Objects"
msgstr ""
msgstr "Métodos de los objetos Archivo"

#: ../Doc/tutorial/inputoutput.rst:352
msgid ""
"The rest of the examples in this section will assume that a file object "
"called ``f`` has already been created."
msgstr ""
"El resto de los ejemplos en esta sección asumirán que ya se creó un objeto "
"archivo llamado ``f``."

#: ../Doc/tutorial/inputoutput.rst:355
msgid ""
"To read a file's contents, call ``f.read(size)``, which reads some quantity "
"of data and returns it as a string (in text mode) or bytes object (in binary "
"mode). *size* is an optional numeric argument. When *size* is omitted or "
"of data and returns it as a string (in text mode) or bytes object (in binary"
" mode). *size* is an optional numeric argument. When *size* is omitted or "
"negative, the entire contents of the file will be read and returned; it's "
"your problem if the file is twice as large as your machine's memory. "
"Otherwise, at most *size* bytes are read and returned. If the end of the "
"file has been reached, ``f.read()`` will return an empty string (``''``). ::"
msgstr ""
"file has been reached, ``f.read()`` will return an empty string (``''``). "
"::"
msgstr ""
"Para leer el contenido de una archivo llamá a ``f.read(cantidad)``, el cual "
"lee alguna cantidad de datos y los devuelve como una cadena de (en modo "
"texto) o un objeto de bytes (en modo binario). *cantidad* es un argumento "
"numérico opcional. Cuando se omite *cantidad* o es negativo, el contenido "
"entero del archivo será leido y devuelto; es tu problema si el archivo es el"
" doble de grande que la memoria de tu máquina. De otra manera, a lo sumo "
"una *cantidad* de bytes son leídos y devueltos. Si se alcanzó el fin del "
"archivo, ``f.read()`` devolverá una cadena vacía (``\"\"``). ::"

#: ../Doc/tutorial/inputoutput.rst:369
msgid ""
"``f.readline()`` reads a single line from the file; a newline character (``"
"\\n``) is left at the end of the string, and is only omitted on the last "
"``f.readline()`` reads a single line from the file; a newline character "
"(``\\n``) is left at the end of the string, and is only omitted on the last "
"line of the file if the file doesn't end in a newline. This makes the "
"return value unambiguous; if ``f.readline()`` returns an empty string, the "
"end of the file has been reached, while a blank line is represented by "
"``'\\n'``, a string containing only a single newline. ::"
msgstr ""
"``f.readline()`` lee una sola linea del archivo; el caracter de fin de linea"
" (``\\n``) se deja al final de la cadena, y sólo se omite en la última linea"
" del archivo si el mismo no termina en un fin de linea. Esto hace que el "
"valor de retorno no sea ambiguo; si ``f.readline()`` devuelve una cadena "
"vacía, es que se alcanzó el fin del archivo, mientras que una linea en "
"blanco es representada por ``'\\n'``, una cadena conteniendo sólo un único "
"fin de linea. ::"

#: ../Doc/tutorial/inputoutput.rst:383
msgid ""
"For reading lines from a file, you can loop over the file object. This is "
"memory efficient, fast, and leads to simple code::"
msgstr ""
"Para leer líneas de un archivo, podés iterar sobre el objeto archivo. Esto "
"es eficiente en memoria, rápido, y conduce a un código más simple::"

#: ../Doc/tutorial/inputoutput.rst:392
msgid ""
"If you want to read all the lines of a file in a list you can also use "
"``list(f)`` or ``f.readlines()``."
msgstr ""
"Si querés leer todas las líneas de un archivo en una lista también podés "
"usar ``list(f)`` o ``f.readlines()``."

#: ../Doc/tutorial/inputoutput.rst:395
msgid ""
"``f.write(string)`` writes the contents of *string* to the file, returning "
"the number of characters written. ::"
msgstr ""
"``f.write(cadena)`` escribe el contenido de la *cadena* al archivo, "
"devolviendo la cantidad de caracteres escritos. ::"

#: ../Doc/tutorial/inputoutput.rst:401
msgid ""
"Other types of objects need to be converted -- either to a string (in text "
"mode) or a bytes object (in binary mode) -- before writing them::"
msgstr ""
"Otros tipos de objetos necesitan serconvertidos -- tanto a una cadena (en "
"modo texto) o a un objeto de bytes (en modo binario) -- antes de "
"escribirlos::"

#: ../Doc/tutorial/inputoutput.rst:409
msgid ""
"``f.tell()`` returns an integer giving the file object's current position in "
"the file represented as number of bytes from the beginning of the file when "
"in binary mode and an opaque number when in text mode."
"``f.tell()`` returns an integer giving the file object's current position in"
" the file represented as number of bytes from the beginning of the file when"
" in binary mode and an opaque number when in text mode."
msgstr ""
"``f.tell()`` devuelve un entero que indica la posición actual en el archivo "
"representada como número de bytes desde el comienzo del archivo en modo "
"binario y un número opaco en modo texto."

#: ../Doc/tutorial/inputoutput.rst:413
msgid ""
Expand All @@ -445,26 +497,42 @@ msgid ""
"*from_what* can be omitted and defaults to 0, using the beginning of the "
"file as the reference point. ::"
msgstr ""
"Para cambiar la posición del objeto archivo, usá ``f.seek(desplazamiento, "
"desde_donde)``. La posición es calculada agregando el *desplazamiento* a un"
" punto de referencia; el punto de referencia se selecciona del argumento "
"*desde_donde*. Un valor *desde_donde* de 0 mide desde el comienzo del "
"archivo, 1 usa la posición actual del archivo, y 2 usa el fin del archivo "
"como punto de referencia. *desde_donde* puede omitirse, el default es 0, "
"usando el comienzo del archivo como punto de referencia. ::"

#: ../Doc/tutorial/inputoutput.rst:432
msgid ""
"In text files (those opened without a ``b`` in the mode string), only seeks "
"relative to the beginning of the file are allowed (the exception being "
"seeking to the very file end with ``seek(0, 2)``) and the only valid "
"*offset* values are those returned from the ``f.tell()``, or zero. Any other "
"*offset* value produces undefined behaviour."
"*offset* values are those returned from the ``f.tell()``, or zero. Any other"
" *offset* value produces undefined behaviour."
msgstr ""
"En los archivos de texto (aquellos que se abrieron sin una ``b`` en el "
"modo), se permiten solamente desplazamientos con ``seek`` relativos al "
"comienzo (con la excepción de ir justo al final con ``seek(0, 2)``) y los "
"únicos valores de *desplazamiento* válidos son aquellos retornados por "
"``f.tell()``, o cero. Cualquier otro valor de *desplazamiento* produce un "
"comportamiento indefinido."

#: ../Doc/tutorial/inputoutput.rst:438
msgid ""
"File objects have some additional methods, such as :meth:`~file.isatty` and :"
"meth:`~file.truncate` which are less frequently used; consult the Library "
"File objects have some additional methods, such as :meth:`~file.isatty` and "
":meth:`~file.truncate` which are less frequently used; consult the Library "
"Reference for a complete guide to file objects."
msgstr ""
"Los objetos archivo tienen algunos métodos más, como :meth:`isatty` y "
":meth:`truncate` que son usados menos frecuentemente; consultá la Referencia"
" de la Biblioteca para una guía completa sobre los objetos archivo."

#: ../Doc/tutorial/inputoutput.rst:446
msgid "Saving structured data with :mod:`json`"
msgstr ""
msgstr "Guardar datos estructurados con :mod:`json`"

#: ../Doc/tutorial/inputoutput.rst:450
msgid ""
Expand All @@ -475,19 +543,36 @@ msgid ""
"complex data types like nested lists and dictionaries, parsing and "
"serializing by hand becomes complicated."
msgstr ""
"Las cadenas pueden facilmente escribirse y leerse de un archivo. Los "
"números toman algo más de esfuerzo, ya que el método :meth:`read` sólo "
"devuelve cadenas, que tendrán que ser pasadas a una función como "
":func:`int`, que toma una cadena como ``'123'`` y devuelve su valor numérico"
" 123. Sin embargo, cuando querés grabar tipos de datos más complejos como "
"listas, diccionarios, o instancias de clases, las cosas se ponen más "
"complicadas."

#: ../Doc/tutorial/inputoutput.rst:457
msgid ""
"Rather than having users constantly writing and debugging code to save "
"complicated data types to files, Python allows you to use the popular data "
"interchange format called `JSON (JavaScript Object Notation) <http://json."
"org>`_. The standard module called :mod:`json` can take Python data "
"hierarchies, and convert them to string representations; this process is "
"called :dfn:`serializing`. Reconstructing the data from the string "
"interchange format called `JSON (JavaScript Object Notation) "
"<http://json.org>`_. The standard module called :mod:`json` can take Python"
" data hierarchies, and convert them to string representations; this process "
"is called :dfn:`serializing`. Reconstructing the data from the string "
"representation is called :dfn:`deserializing`. Between serializing and "
"deserializing, the string representing the object may have been stored in a "
"file or data, or sent over a network connection to some distant machine."
msgstr ""
"En lugar de tener a los usuarios constantemente escribiendo y debugueando "
"código para grabar tipos de datos complicados, Python te permite usar "
"formato intercambiable de datos popular llamado `JSON (JavaScript Object "
"Notation) <http://json.org>`_. El módulo estandar llamado :mod:`json` puede "
"tomar datos de Python con una jerarquía, y convertirlo a representaciones de"
" cadena de caracteres; este proceso es llamado :dfn:`serializing`. "
"Reconstruir los datos desde la representación de cadena de caracteres es "
"llamado :dfn:`deserializing`. Entre serialización y deserialización, la "
"cadena de caracteres representando el objeto quizás haya sido guardado en un"
" archivo o datos, o enviado a una máquina distante por una conexión de red."

#: ../Doc/tutorial/inputoutput.rst:468
msgid ""
Expand All @@ -501,19 +586,27 @@ msgid ""
"If you have an object ``x``, you can view its JSON string representation "
"with a simple line of code::"
msgstr ""
"Si tienes un objeto ``x``, puedes ver su representación JSON con una simple "
"línea de código::"

#: ../Doc/tutorial/inputoutput.rst:479
msgid ""
"Another variant of the :func:`~json.dumps` function, called :func:`~json."
"dump`, simply serializes the object to a :term:`text file`. So if ``f`` is "
"a :term:`text file` object opened for writing, we can do this::"
"Another variant of the :func:`~json.dumps` function, called "
":func:`~json.dump`, simply serializes the object to a :term:`text file`. So"
" if ``f`` is a :term:`text file` object opened for writing, we can do this::"
msgstr ""
"Otra variante de la función :func:`~json.dumps`, llamada :func:`~json.dump`,"
" simplemente serializa el objeto a un :term:`archivo de texto`. Así que, si "
"``f`` es un objeto :term:`archivo de texto` abierto para escritura, podemos "
"hacer::"

#: ../Doc/tutorial/inputoutput.rst:485
msgid ""
"To decode the object again, if ``f`` is a :term:`text file` object which has "
"been opened for reading::"
"To decode the object again, if ``f`` is a :term:`text file` object which has"
" been opened for reading::"
msgstr ""
"Para decodificar un objeto nuevamente, si ``f`` es un objeto :term:`archivo "
"de texto` que fue abierto para lectura::"

#: ../Doc/tutorial/inputoutput.rst:490
msgid ""
Expand All @@ -522,6 +615,10 @@ msgid ""
"effort. The reference for the :mod:`json` module contains an explanation of "
"this."
msgstr ""
"La simple técnica de serialización puede manejar listas y diccionarios, pero"
" serializar instancias de clases arbitrarias en JSON requiere un poco de "
"esfuerzo extra. La referencia del módulo :mod:`json` contiene una "
"explicación de esto."

#: ../Doc/tutorial/inputoutput.rst:496
msgid ":mod:`pickle` - the pickle module"
Expand Down