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
Show file tree
Hide file tree
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
Translate errors.po
  • Loading branch information
humitos committed May 2, 2020
commit 76368ac56c94da8d623e1bce0aabb3bdba23f3ef
2 changes: 1 addition & 1 deletion .migration/tutorialpyar
196 changes: 147 additions & 49 deletions tutorial/errors.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,35 @@ msgid ""
"not in other handlers of the same :keyword:`!try` statement. An except "
"clause may name multiple exceptions as a parenthesized tuple, for example::"
msgstr ""
"Una declaración :keyword:`try` puede tener más de un :keyword:`except`, para"
" especificar manejadores para distintas excepciones. A lo sumo un manejador"
" será ejecutado. Sólo se manejan excepciones que ocurren en el "
"correspondiente :keyword:`try`, no en otros manejadores del mismo "
":keyword:`try`. Un :keyword:`except` puede nombrar múltiples excepciones "
"usando paréntesis, por ejemplo::"

#: ../Doc/tutorial/errors.rst:123
msgid ""
"A class in an :keyword:`except` clause is compatible with an exception if it "
"is the same class or a base class thereof (but not the other way around --- "
"an except clause listing a derived class is not compatible with a base "
"A class in an :keyword:`except` clause is compatible with an exception if it"
" is the same class or a base class thereof (but not the other way around ---"
" an except clause listing a derived class is not compatible with a base "
"class). For example, the following code will print B, C, D in that order::"
msgstr ""
"Una clase en una clausula :keyword:`except` es compatible con una excepción "
"si la misma esta en la misma clase o una clase base de la misma (pero no de "
"la otra manera --- una clausula except listando una clase derivada no es "
"compatible con una clase base). Por ejemplo, el siguiente código imprimirá "
"B, C, D, en ese orden::"

#: ../Doc/tutorial/errors.rst:147
msgid ""
"Note that if the except clauses were reversed (with ``except B`` first), it "
"would have printed B, B, B --- the first matching except clause is triggered."
"would have printed B, B, B --- the first matching except clause is "
"triggered."
msgstr ""
"Notese que si las clausulas de except estuvieran invertidas (con ``except "
"B`` primero), habría impreso B, B, B --- la primera clausula de except "
"coincidente es usada."

#: ../Doc/tutorial/errors.rst:150
msgid ""
Expand All @@ -211,6 +226,11 @@ msgid ""
"message and then re-raise the exception (allowing a caller to handle the "
"exception as well)::"
msgstr ""
"El último :keyword:`except` puede omitir nombrar qué excepción captura, para"
" servir como comodín. Usá esto con extremo cuidado, ya que de esta manera "
"es fácil ocultar un error real de programación. También puede usarse para "
"mostrar un mensaje de error y luego re-generar la excepción (permitiéndole "
"al que llama, manejar también la excepción)::"

#: ../Doc/tutorial/errors.rst:169
msgid ""
Expand All @@ -219,54 +239,80 @@ msgid ""
"for code that must be executed if the try clause does not raise an "
"exception. For example::"
msgstr ""
"Las declaraciones :keyword:`try` ... :keyword:`except` tienen un *bloque "
"else* opcional, el cual, cuando está presente, debe seguir a los except. Es"
" útil para aquel código que debe ejecutarse si el *bloque try* no genera una"
" excepción. Por ejemplo::"

#: ../Doc/tutorial/errors.rst:183
msgid ""
"The use of the :keyword:`!else` clause is better than adding additional code "
"to the :keyword:`try` clause because it avoids accidentally catching an "
"exception that wasn't raised by the code being protected by the :keyword:`!"
"try` ... :keyword:`!except` statement."
"The use of the :keyword:`!else` clause is better than adding additional code"
" to the :keyword:`try` clause because it avoids accidentally catching an "
"exception that wasn't raised by the code being protected by the "
":keyword:`!try` ... :keyword:`!except` statement."
msgstr ""
"El uso de :keyword:`else` es mejor que agregar código adicional en el "
":keyword:`try` porque evita capturar accidentalmente una excepción que no "
"fue generada por el código que está protegido por la declaración "
":keyword:`try` ... :keyword:`except`."

#: ../Doc/tutorial/errors.rst:188
msgid ""
"When an exception occurs, it may have an associated value, also known as the "
"exception's *argument*. The presence and type of the argument depend on the "
"exception type."
"When an exception occurs, it may have an associated value, also known as the"
" exception's *argument*. The presence and type of the argument depend on the"
" exception type."
msgstr ""
"Cuando ocurre una excepción, puede tener un valor asociado, también conocido"
" como el *argumento* de la excepción. La presencia y el tipo de argumento "
"depende del tipo de excepción."

#: ../Doc/tutorial/errors.rst:192
msgid ""
"The except clause may specify a variable after the exception name. The "
"variable is bound to an exception instance with the arguments stored in "
"``instance.args``. For convenience, the exception instance defines :meth:"
"`__str__` so the arguments can be printed directly without having to "
"``instance.args``. For convenience, the exception instance defines "
":meth:`__str__` so the arguments can be printed directly without having to "
"reference ``.args``. One may also instantiate an exception first before "
"raising it and add any attributes to it as desired. ::"
msgstr ""
"El :keyword:`except` puede especificar una variable luego del nombre de "
"excepción. La variable se vincula a una instancia de excepción con los "
"argumentos almacenados en ``instance.args``. Por conveniencia, la instancia"
" de excepción define :meth:`__str__` para que se pueda mostrar los "
"argumentos directamente, sin necesidad de hacer referencia a ``.args``. "
"También se puede instanciar la excepción primero, antes de generarla, y "
"agregarle los atributos que se desee::"

#: ../Doc/tutorial/errors.rst:216
msgid ""
"If an exception has arguments, they are printed as the last part ('detail') "
"of the message for unhandled exceptions."
msgstr ""
"Si una excepción tiene argumentos, estos se imprimen como la última parte "
"(el 'detalle') del mensaje para las excepciones que no están manejadas."

#: ../Doc/tutorial/errors.rst:219
msgid ""
"Exception handlers don't just handle exceptions if they occur immediately in "
"the try clause, but also if they occur inside functions that are called "
"Exception handlers don't just handle exceptions if they occur immediately in"
" the try clause, but also if they occur inside functions that are called "
"(even indirectly) in the try clause. For example::"
msgstr ""
"Los manejadores de excepciones no manejan solamente las excepciones que "
"ocurren en el *bloque try*, también manejan las excepciones que ocurren "
"dentro de las funciones que se llaman (inclusive indirectamente) dentro del "
"*bloque try*. Por ejemplo::"

#: ../Doc/tutorial/errors.rst:237
msgid "Raising Exceptions"
msgstr ""
msgstr "Levantando excepciones"

#: ../Doc/tutorial/errors.rst:239
msgid ""
"The :keyword:`raise` statement allows the programmer to force a specified "
"exception to occur. For example::"
msgstr ""
"La declaración :keyword:`raise` permite al programador forzar a que ocurra "
"una excepción específica. Por ejemplo::"

#: ../Doc/tutorial/errors.rst:247
msgid ""
Expand All @@ -276,17 +322,25 @@ msgid ""
"will be implicitly instantiated by calling its constructor with no "
"arguments::"
msgstr ""
"El único argumento a :keyword:`raise` indica la excepción a generarse. Tiene"
" que ser o una instancia de excepción, o una clase de excepción (una clase "
"que hereda de :class:`Exception`). Si se pasa una clase de excepción, la "
"misma sera instanciada implicitamente llamandoa su constructor sin "
"argumentos::"

#: ../Doc/tutorial/errors.rst:254
msgid ""
"If you need to determine whether an exception was raised but don't intend to "
"handle it, a simpler form of the :keyword:`raise` statement allows you to re-"
"raise the exception::"
"If you need to determine whether an exception was raised but don't intend to"
" handle it, a simpler form of the :keyword:`raise` statement allows you to "
"re-raise the exception::"
msgstr ""
"Si necesitás determinar cuando una excepción fue lanzada pero no querés "
"manejarla, una forma simplificada de la instrucción :keyword:`raise` te "
"permite relanzarla::"

#: ../Doc/tutorial/errors.rst:273
msgid "User-defined Exceptions"
msgstr ""
msgstr "Excepciones definidas por el usuario"

#: ../Doc/tutorial/errors.rst:275
msgid ""
Expand All @@ -295,91 +349,135 @@ msgid ""
"typically be derived from the :exc:`Exception` class, either directly or "
"indirectly."
msgstr ""
"Los programas pueden nombrar sus propias excepciones creando una nueva clase"
" excepción (mirá :ref:`tut-classes` para más información sobre las clases de"
" Python). Las excepciones, típicamente, deberán derivar de la clase "
":exc:`Exception`, directa o indirectamente."

#: ../Doc/tutorial/errors.rst:279
msgid ""
"Exception classes can be defined which do anything any other class can do, "
"but are usually kept simple, often only offering a number of attributes that "
"allow information about the error to be extracted by handlers for the "
"exception. When creating a module that can raise several distinct errors, a "
"common practice is to create a base class for exceptions defined by that "
"module, and subclass that to create specific exception classes for different "
"error conditions::"
msgstr ""
"but are usually kept simple, often only offering a number of attributes that"
" allow information about the error to be extracted by handlers for the "
"exception. When creating a module that can raise several distinct errors, a"
" common practice is to create a base class for exceptions defined by that "
"module, and subclass that to create specific exception classes for different"
" error conditions::"
msgstr ""
"Las clases de Excepciones pueden ser definidas de la misma forma que "
"cualquier otra clase, pero usualmente se mantienen simples, a menudo solo "
"ofreciendo un número de atributos con información sobre el error que leerán "
"los manejadores de la excepción. Al crear un módulo que puede lanzar varios"
" errores distintos, una práctica común es crear una clase base para "
"excepciones definidas en ese módulo y extenderla para crear clases "
"excepciones específicas para distintas condiciones de error::"

#: ../Doc/tutorial/errors.rst:317
msgid ""
"Most exceptions are defined with names that end in \"Error\", similar to the "
"naming of the standard exceptions."
"Most exceptions are defined with names that end in \"Error\", similar to the"
" naming of the standard exceptions."
msgstr ""

#: ../Doc/tutorial/errors.rst:320
msgid ""
"Many standard modules define their own exceptions to report errors that may "
"occur in functions they define. More information on classes is presented in "
"chapter :ref:`tut-classes`."
"occur in functions they define. More information on classes is presented in"
" chapter :ref:`tut-classes`."
msgstr ""
"Muchos módulos estándar definen sus propias excepciones para reportar "
"errores que pueden ocurrir en funciones propias. Se puede encontrar más "
"información sobre clases en el capítulo :ref:`tut-classes`."

#: ../Doc/tutorial/errors.rst:328
msgid "Defining Clean-up Actions"
msgstr ""
msgstr "Definiendo acciones de limpieza"

#: ../Doc/tutorial/errors.rst:330
msgid ""
"The :keyword:`try` statement has another optional clause which is intended "
"to define clean-up actions that must be executed under all circumstances. "
"For example::"
msgstr ""
"La declaración :keyword:`try` tiene otra cláusula opcional que intenta "
"definir acciones de limpieza que deben ser ejecutadas bajo ciertas "
"circunstancias. Por ejemplo::"

#: ../Doc/tutorial/errors.rst:344
msgid ""
"A *finally clause* is always executed before leaving the :keyword:`try` "
"statement, whether an exception has occurred or not. When an exception has "
"occurred in the :keyword:`!try` clause and has not been handled by an :"
"keyword:`except` clause (or it has occurred in an :keyword:`!except` or :"
"keyword:`!else` clause), it is re-raised after the :keyword:`finally` clause "
"has been executed. The :keyword:`!finally` clause is also executed \"on the "
"way out\" when any other clause of the :keyword:`!try` statement is left via "
"a :keyword:`break`, :keyword:`continue` or :keyword:`return` statement. A "
"more complicated example::"
msgstr ""
"occurred in the :keyword:`!try` clause and has not been handled by an "
":keyword:`except` clause (or it has occurred in an :keyword:`!except` or "
":keyword:`!else` clause), it is re-raised after the :keyword:`finally` "
"clause has been executed. The :keyword:`!finally` clause is also executed "
"\"on the way out\" when any other clause of the :keyword:`!try` statement is"
" left via a :keyword:`break`, :keyword:`continue` or :keyword:`return` "
"statement. A more complicated example::"
msgstr ""
"Una *cláusula finally* siempre es ejecutada antes de salir de la declaración"
" :keyword:`try`, ya sea que una excepción haya ocurrido o no. Cuando ocurre"
" una excepción en la cláusula :keyword:`try` y no fue manejada por una "
"cláusula :keyword:`except` (o ocurrió en una cláusula :keyword:`except` o "
":keyword:`else`), es relanzada luego de que se ejecuta la cláusula "
":keyword:`finally`. El :keyword:`finally` es también ejecutado \"a la "
"salida\" cuando cualquier otra cláusula de la declaración :keyword:`try` es "
"dejada via :keyword:`break`, :keyword:`continue` or :keyword:`return`. Un "
"ejemplo más complicado::"

#: ../Doc/tutorial/errors.rst:377
msgid ""
"As you can see, the :keyword:`finally` clause is executed in any event. "
"The :exc:`TypeError` raised by dividing two strings is not handled by the :"
"keyword:`except` clause and therefore re-raised after the :keyword:`!"
"finally` clause has been executed."
"As you can see, the :keyword:`finally` clause is executed in any event. The"
" :exc:`TypeError` raised by dividing two strings is not handled by the "
":keyword:`except` clause and therefore re-raised after the "
":keyword:`!finally` clause has been executed."
msgstr ""
"Como podés ver, la cláusula :keyword:`finally` es ejecutada siempre. La "
"excepción :exc:`TypeError` lanzada al dividir dos cadenas de texto no es "
"manejado por la cláusula :keyword:`except` y por lo tanto es relanzada luego"
" de que se ejecuta la cláusula :keyword:`finally`."

#: ../Doc/tutorial/errors.rst:382
msgid ""
"In real world applications, the :keyword:`finally` clause is useful for "
"releasing external resources (such as files or network connections), "
"regardless of whether the use of the resource was successful."
msgstr ""
"En aplicaciones reales, la cláusula :keyword:`finally` es útil para liberar "
"recursos externos (como archivos o conexiones de red), sin importar si el "
"uso del recurso fue exitoso."

#: ../Doc/tutorial/errors.rst:390
msgid "Predefined Clean-up Actions"
msgstr ""
msgstr "Acciones predefinidas de limpieza"

#: ../Doc/tutorial/errors.rst:392
msgid ""
"Some objects define standard clean-up actions to be undertaken when the "
"object is no longer needed, regardless of whether or not the operation using "
"the object succeeded or failed. Look at the following example, which tries "
"object is no longer needed, regardless of whether or not the operation using"
" the object succeeded or failed. Look at the following example, which tries "
"to open a file and print its contents to the screen. ::"
msgstr ""
"Algunos objetos definen acciones de limpieza estándar que llevar a cabo "
"cuando el objeto no es más necesitado, independientemente de que las "
"operaciones sobre el objeto hayan sido exitosas o no. Mirá el siguiente "
"ejemplo, que intenta abrir un archivo e imprimir su contenido en la "
"pantalla.::"

#: ../Doc/tutorial/errors.rst:400
msgid ""
"The problem with this code is that it leaves the file open for an "
"indeterminate amount of time after this part of the code has finished "
"executing. This is not an issue in simple scripts, but can be a problem for "
"larger applications. The :keyword:`with` statement allows objects like files "
"to be used in a way that ensures they are always cleaned up promptly and "
"larger applications. The :keyword:`with` statement allows objects like files"
" to be used in a way that ensures they are always cleaned up promptly and "
"correctly. ::"
msgstr ""
"El problema con este código es que deja el archivo abierto por un periodo de"
" tiempo indeterminado luego de que esta parte termine de ejecutarse. Esto "
"no es un problema en scripts simples, pero puede ser un problema en "
"aplicaciones más grandes. La declaración :keyword:`with` permite que "
"objetos como archivos sean usados de una forma que asegure que siempre se "
"los libera rápido y en forma correcta.::"

#: ../Doc/tutorial/errors.rst:410
msgid ""
Expand Down