-
Notifications
You must be signed in to change notification settings - Fork 396
Traducido archivo tutorial/errors #2345
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
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d86195f
Traducido archivo tutorial/errors
srmorita dd1378b
Avance
srmorita 77a394e
Add dictionaries/tutorial_error
srmorita 599e18e
Finaliza traducción y revision de fuzzy
srmorita e5d80db
Merge branch '3.11' into traduccion-tutorial-errors
3a7bb5d
Fix powrap
srmorita 71a01c0
Merge branch 'traduccion-tutorial-errors' of github.com:fmoradev/pyth…
srmorita e591914
Fix powrap
srmorita 25de7b1
Fix
srmorita b1de4cb
Fix
srmorita 249eeda
Merge branch '3.11' into traduccion-tutorial-errors
5660187
Fix translatetion
srmorita 8af42ee
Merge branch 'traduccion-tutorial-errors' of github.com:fmoradev/pyth…
srmorita b0f7384
Fix translate
srmorita f057cb0
Merge branch '3.11' into traduccion-tutorial-errors
f60c33d
Delete line
srmorita e4d7b2a
Merge branch 'traduccion-tutorial-errors' of github.com:fmoradev/pyth…
srmorita 9a15098
Merge branch '3.11' into traduccion-tutorial-errors
a6cd3ce
Fix translate and delete old translates
srmorita 073544a
Update tutorial/errors.po
1389aaa
Update tutorial/errors.po
a097c0d
Update tutorial/errors.po
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gestionadores |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,16 @@ msgstr "" | |
"Project-Id-Version: Python 3.8\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-10-25 19:47+0200\n" | ||
"PO-Revision-Date: 2021-11-26 15:03+0100\n" | ||
"Last-Translator: Cristián Maureira-Fredes <[email protected]>\n" | ||
"Language: es\n" | ||
"PO-Revision-Date: 2023-03-21 10:58-0300\n" | ||
"Last-Translator: Francisco Mora <[email protected]>\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.10.3\n" | ||
"X-Generator: Poedit 3.2.2\n" | ||
|
||
#: ../Doc/tutorial/errors.rst:5 | ||
msgid "Errors and Exceptions" | ||
|
@@ -240,7 +241,6 @@ msgstr "" | |
"coincidente." | ||
|
||
#: ../Doc/tutorial/errors.rst:150 | ||
#, fuzzy | ||
msgid "" | ||
"When an exception occurs, it may have associated values, also known as the " | ||
"exception's *arguments*. The presence and types of the arguments depend on " | ||
|
@@ -258,16 +258,20 @@ msgid "" | |
"types define :meth:`__str__` to print all the arguments without explicitly " | ||
"accessing ``.args``. ::" | ||
msgstr "" | ||
"La *cláusula except* puede especificar una variable después del nombre de la " | ||
"excepción. La variable está ligada a la instancia de la excepción, que " | ||
"normalmente tiene un atributo ``args`` que almacena los argumentos. Por " | ||
"conveniencia, los tipos de excepción incorporados definen :meth:`__str__` " | ||
"para imprimir todos los argumentos sin acceder explícitamente a ``.args``. ::" | ||
|
||
# No estoy seguro si es la mejor traducción. | ||
#: ../Doc/tutorial/errors.rst:177 | ||
#, fuzzy | ||
msgid "" | ||
"The exception's :meth:`__str__` output is printed as the last part " | ||
This conversation was marked as resolved.
Show resolved
Hide resolved
|
||
"('detail') of the message for unhandled exceptions." | ||
msgstr "" | ||
"Si una excepción tiene argumentos, estos se imprimen como en la parte final " | ||
"(el 'detalle') del mensaje para las excepciones no gestionadas ('*Unhandled " | ||
"exception*')." | ||
"La salida :meth:`__str__` de la excepción se imprime como la última parte " | ||
"('detalle') del mensaje para las excepciones no gestionadas." | ||
|
||
#: ../Doc/tutorial/errors.rst:180 | ||
msgid "" | ||
|
@@ -279,6 +283,13 @@ msgid "" | |
"exit` and :exc:`KeyboardInterrupt` which is raised when a user wishes to " | ||
"interrupt the program." | ||
msgstr "" | ||
":exc:`BaseException` es la clase base común de todas las excepciones. Una de " | ||
"sus subclases, :exc:`Exception`, es la clase base de todas las excepciones " | ||
"no fatales. Las excepciones que no son subclases de :exc:`Exception` no se " | ||
"suelen manejar, porque se utilizan para indicar que el programa debe " | ||
"terminar. Entre ellas se incluyen :exc:`SystemExit`, que es lanzada por :" | ||
"meth:`sys.exit` y :exc:`KeyboardInterrupt`, que se lanza cuando un usuario " | ||
"desea interrumpir el programa." | ||
|
||
#: ../Doc/tutorial/errors.rst:188 | ||
msgid "" | ||
|
@@ -287,13 +298,20 @@ msgid "" | |
"exceptions that we intend to handle, and to allow any unexpected exceptions " | ||
"to propagate on." | ||
msgstr "" | ||
":exc:`Exception` se puede utilizar como un comodín que atrapa (casi) todo. " | ||
"Sin embargo, es una buena práctica ser lo más específico posible con los " | ||
"tipos de excepciones que pretendemos manejar, y permitir que cualquier " | ||
"excepción inesperada se propague." | ||
|
||
#: ../Doc/tutorial/errors.rst:193 | ||
msgid "" | ||
"The most common pattern for handling :exc:`Exception` is to print or log the " | ||
"exception and then re-raise it (allowing a caller to handle the exception as " | ||
"well)::" | ||
msgstr "" | ||
"El patrón más común para gestionar :exc:`Exception` es imprimir o registrar " | ||
"la excepción y luego volver a re-lanzarla (permitiendo a un llamador manejar " | ||
"la excepción también)::" | ||
|
||
#: ../Doc/tutorial/errors.rst:211 | ||
msgid "" | ||
|
@@ -325,6 +343,10 @@ msgid "" | |
"the *try clause*, but also those that occur inside functions that are called " | ||
"(even indirectly) in the *try clause*. For example::" | ||
msgstr "" | ||
"Los gestores de excepciones no sólo gestionan excepciones que ocurren " | ||
"inmediatamente en la *cláusula try*, sino también aquellas que ocurren " | ||
"dentro de funciones que son llamadas (incluso indirectamente) en la " | ||
"*cláusula try*. Por ejemplo::" | ||
|
||
#: ../Doc/tutorial/errors.rst:248 | ||
msgid "Raising Exceptions" | ||
|
@@ -339,19 +361,18 @@ msgstr "" | |
"una excepción específica. Por ejemplo::" | ||
|
||
#: ../Doc/tutorial/errors.rst:258 | ||
#, fuzzy | ||
msgid "" | ||
"The sole argument to :keyword:`raise` indicates the exception to be raised. " | ||
"This must be either an exception instance or an exception class (a class " | ||
"that derives from :class:`BaseException`, such as :exc:`Exception` or one of " | ||
"its subclasses). If an exception class is passed, it will be implicitly " | ||
"instantiated by calling its constructor with no arguments::" | ||
msgstr "" | ||
"El único argumento de :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 será instanciada implícitamente llamando a su constructor sin " | ||
"argumentos::" | ||
"El único argumento de :keyword:`raise` indica la excepción a lanzar. Debe " | ||
"ser una instancia de excepción o una clase de excepción (una clase que " | ||
"derive de :class:`BaseException`, como :exc:`Exception` o una de sus " | ||
"subclases). Si se pasa una clase de excepción, se instanciará implícitamente " | ||
"llamando a su constructor sin argumentos::" | ||
|
||
#: ../Doc/tutorial/errors.rst:266 | ||
msgid "" | ||
|
@@ -373,12 +394,18 @@ msgid "" | |
"will have the exception being handled attached to it and included in the " | ||
"error message::" | ||
msgstr "" | ||
"Si se produce una excepción no gestionada dentro de una sección :keyword:" | ||
"`except`, se le adjuntará la excepción que se está gestionando y se incluirá " | ||
"en el mensaje de error::" | ||
|
||
#: ../Doc/tutorial/errors.rst:306 | ||
msgid "" | ||
"To indicate that an exception is a direct consequence of another, the :" | ||
"keyword:`raise` statement allows an optional :keyword:`from<raise>` clause::" | ||
msgstr "" | ||
"Para indicar que una excepción es consecuencia directa de otra, la " | ||
"sentencia :keyword:`raise` permite una cláusula opcional :keyword:" | ||
"`from<raise>`::" | ||
|
||
#: ../Doc/tutorial/errors.rst:312 | ||
msgid "This can be useful when you are transforming exceptions. For example::" | ||
|
@@ -390,6 +417,8 @@ msgid "" | |
"It also allows disabling automatic exception chaining using the ``from " | ||
"None`` idiom::" | ||
msgstr "" | ||
"También permite deshabilitar el encadenamiento automático de excepciones " | ||
"utilizando el modismo ``from None``::" | ||
|
||
#: ../Doc/tutorial/errors.rst:345 | ||
msgid "" | ||
|
@@ -415,7 +444,6 @@ msgstr "" | |
"`Exception`, directa o indirectamente." | ||
|
||
#: ../Doc/tutorial/errors.rst:357 | ||
#, fuzzy | ||
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 " | ||
|
@@ -425,10 +453,7 @@ msgstr "" | |
"Las clases de Excepción pueden ser definidas de la misma forma que cualquier " | ||
"otra clase, pero es habitual mantenerlas lo más simples posible, a menudo " | ||
"ofreciendo solo un número de atributos con información sobre el error que " | ||
"leerán los gestores 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::" | ||
"leerán los gestores de la excepción." | ||
|
||
#: ../Doc/tutorial/errors.rst:361 | ||
msgid "" | ||
|
@@ -439,14 +464,12 @@ msgstr "" | |
"de manera similar a la nomenclatura de las excepciones estándar." | ||
|
||
#: ../Doc/tutorial/errors.rst:364 | ||
#, fuzzy | ||
msgid "" | ||
"Many standard modules define their own exceptions to report errors that may " | ||
"occur in functions they define." | ||
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`." | ||
"errores que pueden ocurrir en funciones propias." | ||
|
||
#: ../Doc/tutorial/errors.rst:371 | ||
msgid "Defining Clean-up Actions" | ||
|
@@ -606,7 +629,7 @@ msgstr "" | |
|
||
#: ../Doc/tutorial/errors.rst:496 | ||
msgid "Raising and Handling Multiple Unrelated Exceptions" | ||
msgstr "" | ||
msgstr "Lanzando y gestionando múltiples excepciones no relacionadas" | ||
|
||
#: ../Doc/tutorial/errors.rst:498 | ||
msgid "" | ||
|
@@ -616,13 +639,21 @@ msgid "" | |
"cases where it is desirable to continue execution and collect multiple " | ||
"errors rather than raise the first exception." | ||
msgstr "" | ||
"Hay situaciones en las que es necesario informar de varias excepciones que " | ||
"se han producido. Este es a menudo el caso en los marcos de concurrencia, " | ||
"cuando varias tareas pueden haber fallado en paralelo, pero también hay " | ||
"otros casos de uso en los que es deseable continuar la ejecución y recoger " | ||
"múltiples errores en lugar de lanzar la primera excepción." | ||
|
||
#: ../Doc/tutorial/errors.rst:504 | ||
msgid "" | ||
"The builtin :exc:`ExceptionGroup` wraps a list of exception instances so " | ||
"that they can be raised together. It is an exception itself, so it can be " | ||
"caught like any other exception. ::" | ||
msgstr "" | ||
"El incorporado :exc:`ExceptionGroup` envuelve una lista de instancias de " | ||
"excepción para que puedan ser lanzadas juntas. Es una excepción en sí misma, " | ||
"por lo que puede capturarse como cualquier otra excepción. ::" | ||
|
||
#: ../Doc/tutorial/errors.rst:530 | ||
msgid "" | ||
|
@@ -632,6 +663,13 @@ msgid "" | |
"extracts from the group exceptions of a certain type while letting all other " | ||
"exceptions propagate to other clauses and eventually to be reraised. ::" | ||
msgstr "" | ||
"Utilizando ``except*`` en lugar de ``except``, podemos manejar " | ||
"selectivamente sólo las excepciones del grupo que coincidan con un " | ||
"determinado tipo. En el siguiente ejemplo, que muestra un grupo de " | ||
"excepciones anidado, cada cláusula ``except*`` extrae del grupo las " | ||
"excepciones de un tipo determinado, mientras que deja que el resto de " | ||
"excepciones se propaguen a otras cláusulas y, finalmente, se vuelvan a " | ||
"lanzar. ::" | ||
|
||
#: ../Doc/tutorial/errors.rst:564 | ||
msgid "" | ||
|
@@ -640,10 +678,14 @@ msgid "" | |
"that have already been raised and caught by the program, along the following " | ||
"pattern::" | ||
msgstr "" | ||
"Tenga en cuenta que las excepciones anidadas en un grupo de excepciones " | ||
"deben ser instancias, no tipos. Esto se debe a que en la práctica las " | ||
"excepciones serían típicamente las que ya han sido planteadas y capturadas " | ||
"por el programa, siguiendo el siguiente patrón::" | ||
|
||
#: ../Doc/tutorial/errors.rst:582 | ||
msgid "Enriching Exceptions with Notes" | ||
msgstr "" | ||
msgstr "Enriqueciendo excepciones con notas" | ||
|
||
#: ../Doc/tutorial/errors.rst:584 | ||
msgid "" | ||
|
@@ -655,76 +697,21 @@ msgid "" | |
"standard traceback rendering includes all notes, in the order they were " | ||
"added, after the exception. ::" | ||
msgstr "" | ||
"Cuando se crea una excepción para ser lanzada, normalmente se inicializa con " | ||
"información que describe el error que se ha producido. Hay casos en los que " | ||
"es útil añadir información después de que la excepción haya sido capturada. " | ||
"Para este propósito, las excepciones tienen un método ``add_note(note)`` que " | ||
"acepta una cadena y la añade a la lista de notas de la excepción. La " | ||
"representación estándar del rastreo incluye todas las notas, en el orden en " | ||
"que fueron añadidas, después de la excepción. ::" | ||
|
||
#: ../Doc/tutorial/errors.rst:605 | ||
msgid "" | ||
"For example, when collecting exceptions into an exception group, we may want " | ||
"to add context information for the individual errors. In the following each " | ||
"exception in the group has a note indicating when this error has occurred. ::" | ||
msgstr "" | ||
|
||
#~ msgid "" | ||
#~ "All exceptions inherit from :exc:`BaseException`, and so it can be used " | ||
#~ "to serve as a wildcard. Use this with extreme caution, since it is easy " | ||
#~ "to mask a real programming error in this way! It can also be used to " | ||
#~ "print an error message and then re-raise the exception (allowing a caller " | ||
#~ "to handle the exception as well)::" | ||
#~ msgstr "" | ||
#~ "Todas las excepciones heredan de :exc:`BaseException`, por lo que se " | ||
#~ "puede utilizar como comodín. ¡Use esto con extrema precaución, ya que es " | ||
#~ "fácil enmascarar un error de programación real de esta manera! También se " | ||
#~ "puede usar para imprimir un mensaje de error y luego volver a generar la " | ||
#~ "excepción (permitiendo que la función que llama también maneje la " | ||
#~ "excepción):" | ||
|
||
#~ msgid "" | ||
#~ "Alternatively the last except clause may omit the exception name(s), " | ||
#~ "however the exception value must then be retrieved from ``sys.exc_info()" | ||
#~ "[1]``." | ||
#~ msgstr "" | ||
#~ "Alternativamente, la última cláusula except puede omitir el(los) " | ||
#~ "nombre(s) de excepción, sin embargo, el valor de la excepción debe " | ||
#~ "recuperarse de ``sys.exc_info()[1]``." | ||
|
||
#~ 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 " | ||
#~ "reference ``.args``. One may also instantiate an exception first before " | ||
#~ "raising it and add any attributes to it as desired. ::" | ||
#~ msgstr "" | ||
#~ "La *cláusula except* puede especificar una variable después del nombre de " | ||
#~ "la excepción. La variable está vinculada 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 los argumentos se " | ||
#~ "puedan imprimir directamente sin tener que hacer referencia a ``.args``. " | ||
#~ "También se puede crear una instancia de una excepción antes de generarla " | ||
#~ "y agregarle los atributos que desee. ::" | ||
|
||
#~ 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 (even indirectly) in the *try clause*. For example::" | ||
#~ msgstr "" | ||
#~ "Los gestores de excepciones no solo gestionan las excepciones si ocurren " | ||
#~ "inmediatamente en la *cláusula try*, sino también si ocurren dentro de " | ||
#~ "funciones que son llamadas (incluso indirectamente) en la *cláusula try*. " | ||
#~ "Por ejemplo::" | ||
|
||
#~ msgid "" | ||
#~ "The :keyword:`raise` statement allows an optional :keyword:`from<raise>` " | ||
#~ "which enables chaining exceptions. For example::" | ||
#~ msgstr "" | ||
#~ "La declaración :keyword:`raise` permite una palabra clave opcional :" | ||
#~ "keyword:`from<raise>` que habilita el encadenamiento de excepciones. Por " | ||
#~ "ejemplo::" | ||
|
||
#~ msgid "" | ||
#~ "Exception chaining happens automatically when an exception is raised " | ||
#~ "inside an :keyword:`except` or :keyword:`finally` section. This can be " | ||
#~ "disabled by using ``from None`` idiom:" | ||
#~ msgstr "" | ||
#~ "El encadenamiento de excepciones ocurre automáticamente cuando se lanza " | ||
#~ "una excepción dentro de una sección :keyword:`except` o :keyword:" | ||
#~ "`finally`. Esto se puede desactivar usando el modismo ``from None``:" | ||
"Por ejemplo, al recopilar excepciones en un grupo de excepciones, es posible " | ||
"que queramos añadir información de contexto para los errores individuales. A " | ||
"continuación, cada excepción del grupo tiene una nota que indica cuándo se " | ||
"ha producido ese error. ::" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.