Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdc9e0c2

Browse files
aandreaAlegrecmaureirrtobar
authored
Traduccion asyncio runner (#2209)
Closes#1963Co-authored-by: Alegre <ovyfe4@splm.siemens.com>Co-authored-by: Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io>Co-authored-by: rtobar <rtobarc@gmail.com>
1 parent7f87339 commitdc9e0c2

File tree

1 file changed

+90
-16
lines changed

1 file changed

+90
-16
lines changed

‎library/asyncio-runner.po

Lines changed: 90 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,101 +4,129 @@
44
# package.
55
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
66
#
7-
#,fuzzy
87
msgid ""
98
msgstr ""
109
"Project-Id-Version:Python en Español 3.11\n"
1110
"Report-Msgid-Bugs-To:\n"
1211
"POT-Creation-Date:2022-10-25 19:47+0200\n"
13-
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
14-
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:LANGUAGE <LL@li.org>\n"
12+
"PO-Revision-Date:2022-12-10 14:55+0100\n"
13+
"Last-Translator:Andrea ALEGRE <devel@andrea.mozmail.com>\n"
14+
"Language-Team:\n"
15+
"Language:es_ES\n"
1616
"MIME-Version:1.0\n"
17-
"Content-Type:text/plain; charset=utf-8\n"
17+
"Content-Type:text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding:8bit\n"
19+
"Plural-Forms:nplurals=2; plural=(n != 1);\n"
1920
"Generated-By:Babel 2.10.3\n"
21+
"X-Generator:Poedit 3.2.2\n"
2022

2123
#:../Doc/library/asyncio-runner.rst:6
2224
msgid"Runners"
23-
msgstr""
25+
msgstr"Ejecutores"
2426

2527
#:../Doc/library/asyncio-runner.rst:8
2628
msgid"**Source code:** :source:`Lib/asyncio/runners.py`"
27-
msgstr""
29+
msgstr"**Código fuente:** :source:`Lib/asyncio/runners.py`"
2830

2931
#:../Doc/library/asyncio-runner.rst:11
3032
msgid""
3133
"This section outlines high-level asyncio primitives to run asyncio code."
3234
msgstr""
35+
"Esta sección muestra las primitivas asyncio de alto nivel para ejecutar "
36+
"código asyncio."
3337

3438
#:../Doc/library/asyncio-runner.rst:13
3539
msgid""
3640
"They are built on top of an :ref:`event loop <asyncio-event-loop>` with the "
3741
"aim to simplify async code usage for common wide-spread scenarios."
3842
msgstr""
43+
"Están construidos sobre un :ref:`event loop <asyncio-event-loop>` con el "
44+
"objetivo de simplificar el uso de código async para escenarios comunes de "
45+
"alta difusión."
3946

4047
#:../Doc/library/asyncio-runner.rst:23
4148
msgid"Running an asyncio Program"
42-
msgstr""
49+
msgstr"Ejecutando un programa asyncio"
4350

4451
#:../Doc/library/asyncio-runner.rst:27
4552
msgid"Execute the :term:`coroutine` *coro* and return the result."
46-
msgstr""
53+
msgstr"Ejecutar el :term:`coroutine` *coro* y retornar el resultado."
4754

4855
#:../Doc/library/asyncio-runner.rst:29
4956
msgid""
5057
"This function runs the passed coroutine, taking care of managing the asyncio "
5158
"event loop, *finalizing asynchronous generators*, and closing the threadpool."
5259
msgstr""
60+
"Esta función ejecuta la co-rutina pasada, teniendo cuidado de manejar el "
61+
"bucle de eventos asyncio, *terminando los generadores asíncronos* y cerrando "
62+
"el pool de hilos."
5363

5464
#:../Doc/library/asyncio-runner.rst:33../Doc/library/asyncio-runner.rst:103
5565
msgid""
5666
"This function cannot be called when another asyncio event loop is running in "
5767
"the same thread."
5868
msgstr""
69+
"Esta función no puede ser llamada cuando otro bucle de eventos asyncio está "
70+
"corriendo en el mismo hilo."
5971

72+
# is used to respect the global :
73+
# =>se usa para respetar la configuración global
74+
# (la traducción directa me parece poco clara)
6075
#:../Doc/library/asyncio-runner.rst:36../Doc/library/asyncio-runner.rst:73
6176
msgid""
6277
"If *debug* is ``True``, the event loop will be run in debug mode. ``False`` "
6378
"disables debug mode explicitly. ``None`` is used to respect the global :ref:"
6479
"`asyncio-debug-mode` settings."
6580
msgstr""
81+
"Si *debug* es ``True``, el bucle de eventos se ejecutará en modo debug. "
82+
"``False`` deshabilita el modo debug de manera explícita. ``None`` se usa "
83+
"para respetar la configuración global :ref:`asyncio-debug-mode`."
6684

6785
#:../Doc/library/asyncio-runner.rst:40
6886
msgid""
6987
"This function always creates a new event loop and closes it at the end. It "
7088
"should be used as a main entry point for asyncio programs, and should "
7189
"ideally only be called once."
7290
msgstr""
91+
"Esta función siempre crea un nuevo bucle de eventos y lo cierra al final. "
92+
"Debería ser usado como el punto de entrada principal para programas asyncio "
93+
"e idealmente, llamado una sola vez."
7394

7495
#:../Doc/library/asyncio-runner.rst:44
7596
msgid"Example::"
76-
msgstr""
97+
msgstr"Ejemplo::"
7798

7899
#:../Doc/library/asyncio-runner.rst:54
79100
msgid"Updated to use :meth:`loop.shutdown_default_executor`."
80-
msgstr""
101+
msgstr"Actualizado para usar :meth:`loop.shutdown_default_executor`."
81102

82103
#:../Doc/library/asyncio-runner.rst:59
83104
msgid""
84105
"*debug* is ``None`` by default to respect the global debug mode settings."
85106
msgstr""
107+
"*debug* es ``None`` por defecto para respetar la configuración global del "
108+
"modo debug."
86109

87110
#:../Doc/library/asyncio-runner.rst:63
88111
msgid"Runner context manager"
89-
msgstr""
112+
msgstr"Administrador de contexto del ejecutor"
90113

91114
#:../Doc/library/asyncio-runner.rst:67
92115
msgid""
93116
"A context manager that simplifies *multiple* async function calls in the "
94117
"same context."
95118
msgstr""
119+
"Un administrador de contexto que simplifica *multiples* llamadas asíncronas "
120+
"en el mismo contexto."
96121

97122
#:../Doc/library/asyncio-runner.rst:70
98123
msgid""
99124
"Sometimes several top-level async functions should be called in the same :"
100125
"ref:`event loop <asyncio-event-loop>` and :class:`contextvars.Context`."
101126
msgstr""
127+
"A veces varias funciones asíncronas de alto nivel deberían ser llamadas en "
128+
"el mismo :ref:`bucle de eventos <asyncio-event-loop>` y :class:`contextvars."
129+
"Context`."
102130

103131
#:../Doc/library/asyncio-runner.rst:77
104132
msgid""
@@ -107,86 +135,121 @@ msgid ""
107135
"one. By default :func:`asyncio.new_event_loop` is used and set as current "
108136
"event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``."
109137
msgstr""
138+
"*loop_factory* puede ser usado para redefinir la creación de bucles. Es "
139+
"responsabilidad de la *loop_factory* configurar el bucle creado como el "
140+
"bucle actual. Por defecto :func:`asyncio.new_event_loop` es usado y "
141+
"configura el nuevo bucle de eventos como el actual con :func:`asyncio."
142+
"set_event_loop` si *loop_factory* es ``None``."
110143

111144
#:../Doc/library/asyncio-runner.rst:82
112145
msgid""
113146
"Basically, :func:`asyncio.run()` example can be rewritten with the runner "
114147
"usage::"
115148
msgstr""
149+
"Básicamente, el ejemplo :func:`asyncio.run()` puede ser re-escrito usando el "
150+
"ejecutor::"
116151

117152
#:../Doc/library/asyncio-runner.rst:95
118153
msgid"Run a :term:`coroutine <coroutine>` *coro* in the embedded loop."
119-
msgstr""
154+
msgstr"Ejecuta una :term:`co-rutina <coroutine>` *coro* en el bucle embebido."
120155

156+
# más info sobre el origen de la excepción
121157
#:../Doc/library/asyncio-runner.rst:97
122158
msgid"Return the coroutine's result or raise its exception."
123159
msgstr""
160+
"Retorna el resultado de la co-rutina o lanza excepción de dicha co-rutina."
124161

162+
# - hice un poco más clara la segunda oración
163+
# - corrijo traduccion de keyboard-only -> keyword-only
125164
#:../Doc/library/asyncio-runner.rst:99
126165
msgid""
127166
"An optional keyword-only *context* argument allows specifying a custom :"
128167
"class:`contextvars.Context` for the *coro* to run in. The runner's default "
129168
"context is used if ``None``."
130169
msgstr""
170+
"Un argumento opcional del *contexto* que consiste en una palabra clave "
171+
"permite especificar un :class:`contextvars.Context` personalizado donde "
172+
"correr la *coro* . El contexto por defecto del ejecutor es usado si el modo "
173+
"debug es ``None``."
131174

132175
#:../Doc/library/asyncio-runner.rst:108
133176
msgid"Close the runner."
134-
msgstr""
177+
msgstr"Cierra el ejecutor."
135178

136179
#:../Doc/library/asyncio-runner.rst:110
137180
msgid""
138181
"Finalize asynchronous generators, shutdown default executor, close the event "
139182
"loop and release embedded :class:`contextvars.Context`."
140183
msgstr""
184+
"Termina los generadores asíncronos, apaga el ejecutor por defecto, cierra el "
185+
"bucle de eventos y libera el :class:`contextvars.Context` embebido."
141186

142187
#:../Doc/library/asyncio-runner.rst:115
143188
msgid"Return the event loop associated with the runner instance."
144-
msgstr""
189+
msgstr"Retorna el bucle de eventos asociado a la instancia del ejecutor."
145190

146191
#:../Doc/library/asyncio-runner.rst:119
147192
msgid""
148193
":class:`Runner` uses the lazy initialization strategy, its constructor "
149194
"doesn't initialize underlying low-level structures."
150195
msgstr""
196+
":class:`Runner` usa una estrategia de inicialización perezosa, su "
197+
"constructor no inicializa las estructuras de bajo nivel subyacentes."
151198

152199
#:../Doc/library/asyncio-runner.rst:122
153200
msgid""
154201
"Embedded *loop* and *context* are created at the :keyword:`with` body "
155202
"entering or the first call of :meth:`run` or :meth:`get_loop`."
156203
msgstr""
204+
"El *bucle* y el *contexto* embebidos son creados al entrar al cuerpo :"
205+
"keyword:`with` o en la primera llamada a :meth:`run` o a :meth:`get_loop`."
157206

158207
#:../Doc/library/asyncio-runner.rst:127
159208
msgid"Handling Keyboard Interruption"
160-
msgstr""
209+
msgstr"Manejando interrupciones de teclado"
161210

211+
# Oración muy poco clara, incluso en inglés=> adaptación para que sea más comprensible
162212
#:../Doc/library/asyncio-runner.rst:131
163213
msgid""
164214
"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, :exc:"
165215
"`KeyboardInterrupt` exception is raised in the main thread by default. "
166216
"However this doesn't work with :mod:`asyncio` because it can interrupt "
167217
"asyncio internals and can hang the program from exiting."
168218
msgstr""
219+
"Cuando la excepción :const:`signal.SIGINT` es lanzada por :kbd:`Ctrl-C`, la "
220+
"excepción :exc:`KeyboardInterrupt` es lanzada en el hilo principal por "
221+
"defecto. Sin embargo, esto no siempre funciona con :mod:`asyncio` porque "
222+
"puede interrumpir llamadas internas a asyncio e impedir la salida del "
223+
"programa."
169224

170225
#:../Doc/library/asyncio-runner.rst:136
171226
msgid""
172227
"To mitigate this issue, :mod:`asyncio` handles :const:`signal.SIGINT` as "
173228
"follows:"
174229
msgstr""
230+
"Para mitigar este problema, :mod:`asyncio` maneja :const:`signal.SIGINT` de "
231+
"la siguiente forma:"
175232

176233
#:../Doc/library/asyncio-runner.rst:138
177234
msgid""
178235
":meth:`asyncio.Runner.run` installs a custom :const:`signal.SIGINT` handler "
179236
"before any user code is executed and removes it when exiting from the "
180237
"function."
181238
msgstr""
239+
":meth:`asyncio.Runner.run` instala un administrador :const:`signal.SIGINT` "
240+
"personalizado antes que cualquier código de usuario sea ejecutado y lo "
241+
"remueve a la salida de la función."
182242

183243
#:../Doc/library/asyncio-runner.rst:140
184244
msgid""
185245
"The :class:`~asyncio.Runner` creates the main task for the passed coroutine "
186246
"for its execution."
187247
msgstr""
248+
"La :class:`~asyncio.Runner` crea la tarea principal que será pasada a la co-"
249+
"rutina para su ejecución."
188250

189251
#:../Doc/library/asyncio-runner.rst:142
252+
#,fuzzy
190253
msgid""
191254
"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, the custom signal "
192255
"handler cancels the main task by calling :meth:`asyncio.Task.cancel` which "
@@ -195,6 +258,13 @@ msgid ""
195258
"used for resource cleanup. After the main task is cancelled, :meth:`asyncio."
196259
"Runner.run` raises :exc:`KeyboardInterrupt`."
197260
msgstr""
261+
"Cuando :const:`signal.SIGINT` es lanzado por :kbd:`Ctrl-C`, el administrador "
262+
"de señales personalizado cancela la tarea principal llamando :meth:`asyncio."
263+
"Task.cancel` que lanza :exc:`asyncio.CancelledError` dentro de la tarea "
264+
"principal. Esto hace que la pila de Python se desenvuelva, los bloques``try/"
265+
"except`` y ``try/finally`` pueden ser usados para liberar recursos. Luego de "
266+
"que la tarea principal es cancelada, :meth:`asyncio.Runner.run` lanza :exc:"
267+
"`KeyboardInterrupt`."
198268

199269
#:../Doc/library/asyncio-runner.rst:148
200270
msgid""
@@ -203,3 +273,7 @@ msgid ""
203273
"immediately raises the :exc:`KeyboardInterrupt` without cancelling the main "
204274
"task."
205275
msgstr""
276+
"Un usuario podría escribir un bucle cerrado que no puede ser interrumpido "
277+
"por :meth:`asyncio.Task.cancel`, en cuyo caso la segunda llamada a :kbd:"
278+
"`Ctrl-C` lanza inmediatamente :exc:`KeyboardInterrupt` sin cancelar la tarea "
279+
"principal."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp