You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get the list of volunteers
6
6
#
7
-
#,fuzzy
8
7
msgid ""
9
8
msgstr ""
10
9
"Project-Id-Version: Python 3.8\n"
11
10
"Report-Msgid-Bugs-To: \n"
12
11
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
13
-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
+
"PO-Revision-Date: 2020-10-07 17:04+0200\n"
15
13
"Language-Team: python-doc-es\n"
16
14
"MIME-Version: 1.0\n"
17
15
"Content-Type: text/plain; charset=UTF-8\n"
18
16
"Content-Transfer-Encoding: 8bit\n"
17
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
"Last-Translator: \n"
19
+
"Language: es\n"
20
+
"X-Generator: Poedit 2.4.1\n"
19
21
20
22
#:../Doc/library/contextvars.rst:2
21
23
msgid":mod:`contextvars` --- Context Variables"
22
-
msgstr""
24
+
msgstr":mod:`contextvars` --- Variables de Contexto"
23
25
24
26
#:../Doc/library/contextvars.rst:11
25
27
msgid""
@@ -29,75 +31,107 @@ msgid ""
29
31
"the :class:`~contextvars.Context` class should be used to manage the current "
30
32
"context in asynchronous frameworks."
31
33
msgstr""
34
+
"Este módulo proporciona APIs para gestionar, almacenar y acceder a estados "
35
+
"en el contexto local. La clase :class:`~contextvars.ContextVar` se utiliza "
36
+
"para declarar y trabajar con Variables de Contexto (*Context Variables*). La "
37
+
"función :func:`~contextvars.copy_context` y la clase :class:`~contextvars."
38
+
"Context` deberían ser utilizadas para gestionar el contexto actual en "
39
+
"*frameworks* asíncronos."
32
40
41
+
# ¿"concurrent code"?
42
+
# (añadir a Memoria de traducción)
33
43
#:../Doc/library/contextvars.rst:17
44
+
#,fuzzy
34
45
msgid""
35
46
"Context managers that have state should use Context Variables instead of :"
36
47
"func:`threading.local()` to prevent their state from bleeding to other code "
37
48
"unexpectedly, when used in concurrent code."
38
49
msgstr""
50
+
"Los gestores de contexto que tienen un estado establecido deberían utilizar "
51
+
"Variables de Contexto en lugar de :func:`threading.local()`, para así evitar "
52
+
"que este estado se inyecte inesperadamente a otro código, cuando se utilice "
53
+
"en código concurrente (*concurrent code*)."
39
54
40
55
#:../Doc/library/contextvars.rst:21
41
56
msgid"See also :pep:`567` for additional details."
42
-
msgstr""
57
+
msgstr"Ver :pep:`567` para más detalles."
43
58
44
59
#:../Doc/library/contextvars.rst:27
45
60
msgid"Context Variables"
46
-
msgstr""
61
+
msgstr"Variables de Contexto"
47
62
63
+
# ¿"e.g." = por ejemplo, en este contexto?
48
64
#:../Doc/library/contextvars.rst:31
65
+
#,fuzzy
49
66
msgid"This class is used to declare a new Context Variable, e.g.::"
50
67
msgstr""
68
+
"Esta clase se utiliza para declarar una nueva Variable de Contexto, por "
69
+
"ejemplo::"
51
70
52
71
#:../Doc/library/contextvars.rst:35
53
72
msgid""
54
73
"The required *name* parameter is used for introspection and debug purposes."
55
74
msgstr""
75
+
"El parámetro obligatorio *name* se utiliza para introspección y depuración."
56
76
57
77
#:../Doc/library/contextvars.rst:38
58
78
msgid""
59
79
"The optional keyword-only *default* parameter is returned by :meth:"
60
80
"`ContextVar.get` when no value for the variable is found in the current "
61
81
"context."
62
82
msgstr""
83
+
"El parámetro opcional de sólo palabra clave *default* es utilizado por :meth:"
84
+
"`ContextVar.get`, cuando en el contexto actual no se encuentra ningún valor "
85
+
"para la variable."
63
86
87
+
# ¿"at the top module level and never in closures"?
88
+
# ¿Traducción técnica de "garbage collector"?
64
89
#:../Doc/library/contextvars.rst:42
90
+
#,fuzzy
65
91
msgid""
66
92
"**Important:** Context Variables should be created at the top module level "
67
93
"and never in closures. :class:`Context` objects hold strong references to "
68
94
"context variables which prevents context variables from being properly "
69
95
"garbage collected."
70
96
msgstr""
97
+
"**Importante:** las Variables de Contexto deberían ser creadas en lo más "
98
+
"alto a nivel de módulo y nunca encerradas. Los objetos :class:`Context` "
99
+
"mantienen referencias a variables de contexto, lo cual no permite que estas "
100
+
"variables de contexto sean limpiadas por el recolector de basura."
71
101
72
102
#:../Doc/library/contextvars.rst:49
73
103
msgid"The name of the variable. This is a read-only property."
74
-
msgstr""
104
+
msgstr"El nombre de la variable. Propiedad de sólo lectura."
75
105
76
106
#:../Doc/library/contextvars.rst:55
77
107
msgid"Return a value for the context variable for the current context."
78
-
msgstr""
108
+
msgstr"Retorna un valor para la variable de contexto en el contexto actual."
79
109
80
110
#:../Doc/library/contextvars.rst:57
81
111
msgid""
82
112
"If there is no value for the variable in the current context, the method "
83
113
"will:"
84
-
msgstr""
114
+
msgstr"Si la variable no tiene ningún valor en el contexto actual, el método:"
85
115
86
116
#:../Doc/library/contextvars.rst:60
87
117
msgid""
88
118
"return the value of the *default* argument of the method, if provided; or"
89
119
msgstr""
120
+
"retornará el valor del argumento *default* del método, si alguno fue dado; o"
90
121
91
122
#:../Doc/library/contextvars.rst:63
92
123
msgid""
93
124
"return the default value for the context variable, if it was created with "
94
125
"one; or"
95
126
msgstr""
127
+
"retornará el valor por defecto de la variable de contexto, si ésta fue "
128
+
"creada con alguno; o"
96
129
97
130
#:../Doc/library/contextvars.rst:66
98
131
msgid"raise a :exc:`LookupError`."
99
-
msgstr""
132
+
msgstr"lanzará :exc:`LookupError`."
100
133
134
+
# ¿Verbo correcto? (ver contexto del texto original?
101
135
#:../Doc/library/contextvars.rst:70
102
136
msgid""
103
137
"Call to set a new value for the context variable in the current context."
@@ -107,147 +141,206 @@ msgstr ""
107
141
msgid""
108
142
"The required *value* argument is the new value for the context variable."
109
143
msgstr""
144
+
"El argumento obligatorio *value* es el nuevo valor de la variable de "
145
+
"contexto."
110
146
111
147
#:../Doc/library/contextvars.rst:76
112
148
msgid""
113
149
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
114
150
"variable to its previous value via the :meth:`ContextVar.reset` method."
115
151
msgstr""
152
+
"Retorna un objeto :class:`~contextvars.Token` que puede utilizarse para "
153
+
"restaurar la variable a su valor anterior, utilizando el método :meth:"
154
+
"`ContextVar.reset`."
116
155
117
156
#:../Doc/library/contextvars.rst:82
118
157
msgid""
119
158
"Reset the context variable to the value it had before the :meth:`ContextVar."
120
159
"set` that created the *token* was used."
121
160
msgstr""
161
+
"Restablece la variable de contexto al valor que tenía antes de llamar al "
162
+
"método :meth:`ContextVar.set`, que creó el *token* utilizado."
122
163
123
164
#:../Doc/library/contextvars.rst:85
124
165
msgid"For example::"
125
-
msgstr""
166
+
msgstr"Por ejemplo::"
126
167
127
168
#:../Doc/library/contextvars.rst:99
128
169
msgid""
129
170
"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
130
171
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
131
172
"variable to what it was before the corresponding *set*."
132
173
msgstr""
174
+
"Los objetos *token* son retornados por el método :meth:`ContextVar.set`. Se "
175
+
"le pueden dar al método :meth:`ContextVar.reset` para restablecer el valor "
176
+
"de la variable al que estuviese dado antes del *set* correspondiente."
133
177
134
178
#:../Doc/library/contextvars.rst:106
135
179
msgid""
136
180
"A read-only property. Points to the :class:`ContextVar` object that created "
137
181
"the token."
138
182
msgstr""
183
+
"Propiedad de sólo lectura. Apunta al objeto :class:`ContextVar` que creó el "
184
+
"*token*."
139
185
186
+
# Se podría escribir mejor, sobre todo la última parte, si se traduce "literal" quizás no se entienda del todo bien.
140
187
#:../Doc/library/contextvars.rst:111
188
+
#,fuzzy
141
189
msgid""
142
190
"A read-only property. Set to the value the variable had before the :meth:"
143
191
"`ContextVar.set` method call that created the token. It points to :attr:"
144
192
"`Token.MISSING` is the variable was not set before the call."
145
193
msgstr""
194
+
"Propiedad de sólo lectura. Es el valor que la variable tenía antes de llamar "
195
+
"al método :meth:`ContextVar.set` que creó el *token*. Apunta a :attr:`Token."
196
+
"MISSING` si la variable no estaba establecida antes de la llamada."
146
197
147
198
#:../Doc/library/contextvars.rst:118
148
199
msgid"A marker object used by :attr:`Token.old_value`."
149
-
msgstr""
200
+
msgstr"Marcador utilizado por :attr:`Token.old_value`."
150
201
151
202
#:../Doc/library/contextvars.rst:122
152
203
msgid"Manual Context Management"
153
-
msgstr""
204
+
msgstr"Gestión de Contexto Manual"
154
205
155
206
#:../Doc/library/contextvars.rst:126
156
207
msgid"Returns a copy of the current :class:`~contextvars.Context` object."
157
-
msgstr""
208
+
msgstr"Retorna una copia del objeto :class:`~contextvars.Context` actual."
158
209
159
210
#:../Doc/library/contextvars.rst:128
160
211
msgid""
161
212
"The following snippet gets a copy of the current context and prints all "
162
213
"variables and their values that are set in it::"
163
214
msgstr""
215
+
"El siguiente código obtiene una copia del contexto actual e imprime todas "
216
+
"las variables y sus valores establecidos en el contexto::"
164
217
165
218
#:../Doc/library/contextvars.rst:134
166
219
msgid""
167
220
"The function has an O(1) complexity, i.e. works equally fast for contexts "
168
221
"with a few context variables and for contexts that have a lot of them."
169
222
msgstr""
223
+
"La función tiene una complejidad de O(1); por ejemplo, trabaja a la misma "
224
+
"velocidad en contextos con pocas o con muchas variables de contexto."
170
225
171
226
#:../Doc/library/contextvars.rst:141
172
227
msgid"A mapping of :class:`ContextVars <ContextVar>` to their values."
173
-
msgstr""
228
+
msgstr"Mapeo de :class:`ContextVars <ContextVar>` con sus valores."
174
229
175
230
#:../Doc/library/contextvars.rst:143
176
231
msgid""
177
232
"``Context()`` creates an empty context with no values in it. To get a copy "
178
233
"of the current context use the :func:`~contextvars.copy_context` function."
179
234
msgstr""
235
+
"``Context()`` crea un contexto vacío sin valores. Para obtener una copia del "
236
+
"contexto actual, se puede utilizar la función :func:`~contextvars."
237
+
"copy_context`."
180
238
239
+
# ¿Artículo "El"? (ver contexto de artículo original)
181
240
#:../Doc/library/contextvars.rst:147
241
+
#,fuzzy
182
242
msgid"Context implements the :class:`collections.abc.Mapping` interface."
183
-
msgstr""
243
+
msgstr"El contexto implementa la interfaz :class:`collections.abc.Mapping`."
184
244
185
245
#:../Doc/library/contextvars.rst:151
186
246
msgid""
187
247
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
188
248
"method is called on. Return the result of the execution or propagate an "
189
249
"exception if one occurred."
190
250
msgstr""
251
+
"Ejecuta el código de ``callable(*args, **kwargs)`` en el objeto de contexto "
252
+
"del cual se llama al método *run*. Retorna el resultado de la ejecución, o "
253
+
"propaga una excepción si alguna ocurre."
191
254
192
255
#:../Doc/library/contextvars.rst:155
193
256
msgid""
194
257
"Any changes to any context variables that *callable* makes will be contained "
195
258
"in the context object::"
196
259
msgstr""
260
+
"Cualquier cambio realizado por *callable* sobre cualquier variable de "
261
+
"contexto será contenido en el objeto de contexto::"
197
262
263
+
# ¿"OS thread"?
264
+
# (¿añadir a Memoria de traducción?)
198
265
#:../Doc/library/contextvars.rst:184
266
+
#,fuzzy
199
267
msgid""
200
268
"The method raises a :exc:`RuntimeError` when called on the same context "
201
269
"object from more than one OS thread, or when called recursively."
202
270
msgstr""
271
+
"El método lanzará :exc:`RuntimeError` cuando es llamado desde el mismo "
272
+
"objeto de contexto desde más de un hilo de sistema, o si se llama "
273
+
"recursivamente."
203
274
275
+
# ¿"shallow copy"?
276
+
# (añadir a Memoria de traducción)
204
277
#:../Doc/library/contextvars.rst:190
278
+
#,fuzzy
205
279
msgid"Return a shallow copy of the context object."
206
-
msgstr""
280
+
msgstr"Returna una copia superficial (*shallow copy*) del objeto de contexto."
207
281
208
282
#:../Doc/library/contextvars.rst:194
209
283
msgid""
210
284
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
211
285
"otherwise."
212
286
msgstr""
287
+
"Retorna ``True`` si *context* tiene un valor establecido para *var*; de lo "
288
+
"contrario, retorna ``False``."
213
289
214
290
#:../Doc/library/contextvars.rst:199
215
291
msgid""
216
292
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
217
293
"is not set in the context object, a :exc:`KeyError` is raised."
218
294
msgstr""
295
+
"Retorna el valor de la variable :class:`ContextVar` *var*. Si la variable no "
296
+
"está establecida en el contexto actual, se lanzará :exc:`KeyError`."
219
297
220
298
#:../Doc/library/contextvars.rst:205
221
299
msgid""
222
300
"Return the value for *var* if *var* has the value in the context object. "
223
301
"Return *default* otherwise. If *default* is not given, return ``None``."
224
302
msgstr""
303
+
"Retorna el valor de *var*, si *var* tiene el valor en el objeto de contexto; "
304
+
"de lo contrario, retorna *default*. Si *default* no es dado, retorna "
305
+
"``None``."
225
306
307
+
# ¿"iterator" = iterador?
308
+
# (añadir a Memoria de traducción)
226
309
#:../Doc/library/contextvars.rst:211
310
+
#,fuzzy
227
311
msgid"Return an iterator over the variables stored in the context object."
228
312
msgstr""
313
+
"Retorna un iterador de las variables almacenadas en el objeto de contexto."
229
314
230
315
#:../Doc/library/contextvars.rst:216
231
316
msgid"Return the number of variables set in the context object."
232
-
msgstr""
317
+
msgstr"Retorna el número de variables establecidas en el objeto de contexto."
233
318
234
319
#:../Doc/library/contextvars.rst:220
235
320
msgid"Return a list of all variables in the context object."
236
-
msgstr""
321
+
msgstr"Retorna un listado de todas las variables en el objeto de contexto."
237
322
238
323
#:../Doc/library/contextvars.rst:224
239
324
msgid"Return a list of all variables' values in the context object."
240
325
msgstr""
326
+
"Retorna un listado de los valores de todas las variables en el objeto de "
327
+
"contexto."
241
328
329
+
# Supongo que lo que retorna es [(variable, valor), (variable, valor), ...], y si es así, es un poco confuso cómo está redactado... pero es algo relacionado con el texto original.
242
330
#:../Doc/library/contextvars.rst:229
331
+
#,fuzzy
243
332
msgid""
244
333
"Return a list of 2-tuples containing all variables and their values in the "
245
334
"context object."
246
335
msgstr""
336
+
"Retorna un listado de dos tuplas que contienen todas las variables y sus "
337
+
"variables en el contexto actual."
247
338
339
+
# Ver contexto, pero si es un encabezado, debería empezar con mayúscula
248
340
#:../Doc/library/contextvars.rst:234
341
+
#,fuzzy
249
342
msgid"asyncio support"
250
-
msgstr""
343
+
msgstr"Soporte *asyncio*"
251
344
252
345
#:../Doc/library/contextvars.rst:236
253
346
msgid""
@@ -256,3 +349,8 @@ msgid ""
256
349
"server, that uses a context variable to make the address of a remote client "
257
350
"available in the Task that handles that client::"
258
351
msgstr""
352
+
"Las variables de contexto están soportadas de forma nativa en :mod:`asyncio` "
353
+
"y se pueden utilizar sin ninguna configuración adicional. Por ejemplo, el "
354
+
"siguiente código crea un servidor simple de respuesta, que utiliza una "
355
+
"variable de contexto que hace que la dirección del cliente remoto esté "
356
+
"disponible en la *Task* que gestiona al cliente::"
0 commit comments