Skip to content

Commit 5ab14cb

Browse files
authored
Traducido archivo library/contextvars.po (#999)
1 parent 243b929 commit 5ab14cb

File tree

3 files changed

+100
-22
lines changed

3 files changed

+100
-22
lines changed

dictionaries/library_contextvars.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tuplas
2+
iterador
3+
frameworks

library/asyncio-future.po

-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ msgid "Cancel the Future and schedule callbacks."
306306
msgstr "Cancela el Future y programa retrollamadas (*callbacks*)."
307307

308308
#: ../Doc/library/asyncio-future.rst:177
309-
#, fuzzy
310309
msgid ""
311310
"If the Future is already *done* or *cancelled*, return ``False``. Otherwise, "
312311
"change the Future's state to *cancelled*, schedule the callbacks, and return "

library/contextvars.po

+97-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
# Copyright (C) 2001-2020, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
3-
# Maintained by the python-doc-es workteam.
3+
# Maintained by the python-doc-es workteam.
44
# docs-es@python.org / https://mail.python.org/mailman3/lists/docs-es.python.org/
55
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get the list of volunteers
66
#
7-
#, fuzzy
87
msgid ""
98
msgstr ""
109
"Project-Id-Version: Python 3.8\n"
1110
"Report-Msgid-Bugs-To: \n"
1211
"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-09 10:52+0200\n"
1513
"Language-Team: python-doc-es\n"
1614
"MIME-Version: 1.0\n"
1715
"Content-Type: text/plain; charset=UTF-8\n"
1816
"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"
1921

2022
#: ../Doc/library/contextvars.rst:2
2123
msgid ":mod:`contextvars` --- Context Variables"
22-
msgstr ""
24+
msgstr ":mod:`contextvars` --- Variables de Contexto"
2325

2426
#: ../Doc/library/contextvars.rst:11
2527
msgid ""
@@ -29,37 +31,53 @@ msgid ""
2931
"the :class:`~contextvars.Context` class should be used to manage the current "
3032
"context in asynchronous frameworks."
3133
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."
3240

3341
#: ../Doc/library/contextvars.rst:17
3442
msgid ""
3543
"Context managers that have state should use Context Variables instead of :"
3644
"func:`threading.local()` to prevent their state from bleeding to other code "
3745
"unexpectedly, when used in concurrent code."
3846
msgstr ""
47+
"Los gestores de contexto que tienen un estado establecido deberían utilizar "
48+
"Variables de Contexto en lugar de :func:`threading.local()`, para así evitar "
49+
"que este estado se inyecte inesperadamente a otro código, cuando se utilice "
50+
"en código concurrente."
3951

4052
#: ../Doc/library/contextvars.rst:21
4153
msgid "See also :pep:`567` for additional details."
42-
msgstr ""
54+
msgstr "Ver :pep:`567` para más detalles."
4355

4456
#: ../Doc/library/contextvars.rst:27
4557
msgid "Context Variables"
46-
msgstr ""
58+
msgstr "Variables de Contexto"
4759

4860
#: ../Doc/library/contextvars.rst:31
4961
msgid "This class is used to declare a new Context Variable, e.g.::"
5062
msgstr ""
63+
"Esta clase se utiliza para declarar una nueva Variable de Contexto, por "
64+
"ejemplo::"
5165

5266
#: ../Doc/library/contextvars.rst:35
5367
msgid ""
5468
"The required *name* parameter is used for introspection and debug purposes."
5569
msgstr ""
70+
"El parámetro obligatorio *name* se utiliza para introspección y depuración."
5671

5772
#: ../Doc/library/contextvars.rst:38
5873
msgid ""
5974
"The optional keyword-only *default* parameter is returned by :meth:"
6075
"`ContextVar.get` when no value for the variable is found in the current "
6176
"context."
6277
msgstr ""
78+
"El parámetro opcional de sólo palabra clave *default* es utilizado por :meth:"
79+
"`ContextVar.get`, cuando en el contexto actual no se encuentra ningún valor "
80+
"para la variable."
6381

6482
#: ../Doc/library/contextvars.rst:42
6583
msgid ""
@@ -68,186 +86,239 @@ msgid ""
6886
"context variables which prevents context variables from being properly "
6987
"garbage collected."
7088
msgstr ""
89+
"**Importante:** las Variables de Contexto deberían ser creadas en lo más "
90+
"alto a nivel de módulo y nunca en clausura. Los objetos :class:`Context` "
91+
"mantienen referencias a variables de contexto, lo cual no permitiría que "
92+
"estas variables de contexto sean limpiadas por el recolector de basura."
7193

7294
#: ../Doc/library/contextvars.rst:49
7395
msgid "The name of the variable. This is a read-only property."
74-
msgstr ""
96+
msgstr "El nombre de la variable. Propiedad de sólo lectura."
7597

7698
#: ../Doc/library/contextvars.rst:55
7799
msgid "Return a value for the context variable for the current context."
78-
msgstr ""
100+
msgstr "Retorna un valor para la variable de contexto en el contexto actual."
79101

80102
#: ../Doc/library/contextvars.rst:57
81103
msgid ""
82104
"If there is no value for the variable in the current context, the method "
83105
"will:"
84-
msgstr ""
106+
msgstr "Si la variable no tiene ningún valor en el contexto actual, el método:"
85107

86108
#: ../Doc/library/contextvars.rst:60
87109
msgid ""
88110
"return the value of the *default* argument of the method, if provided; or"
89111
msgstr ""
112+
"retornará el valor del argumento *default* del método, si alguno fue dado; o"
90113

91114
#: ../Doc/library/contextvars.rst:63
92115
msgid ""
93116
"return the default value for the context variable, if it was created with "
94117
"one; or"
95118
msgstr ""
119+
"retornará el valor por defecto de la variable de contexto, si ésta fue "
120+
"creada con alguno; o"
96121

97122
#: ../Doc/library/contextvars.rst:66
98123
msgid "raise a :exc:`LookupError`."
99-
msgstr ""
124+
msgstr "lanzará :exc:`LookupError`."
100125

101126
#: ../Doc/library/contextvars.rst:70
102127
msgid ""
103128
"Call to set a new value for the context variable in the current context."
104129
msgstr ""
130+
"Establece un nuevo valor para la variable de contexto en el contexto actual."
105131

106132
#: ../Doc/library/contextvars.rst:73
107133
msgid ""
108134
"The required *value* argument is the new value for the context variable."
109135
msgstr ""
136+
"El argumento obligatorio *value* es el nuevo valor de la variable de "
137+
"contexto."
110138

111139
#: ../Doc/library/contextvars.rst:76
112140
msgid ""
113141
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
114142
"variable to its previous value via the :meth:`ContextVar.reset` method."
115143
msgstr ""
144+
"Retorna un objeto :class:`~contextvars.Token` que puede utilizarse para "
145+
"restaurar la variable a su valor anterior, utilizando el método :meth:"
146+
"`ContextVar.reset`."
116147

117148
#: ../Doc/library/contextvars.rst:82
118149
msgid ""
119150
"Reset the context variable to the value it had before the :meth:`ContextVar."
120151
"set` that created the *token* was used."
121152
msgstr ""
153+
"Restablece la variable de contexto al valor que tenía antes de llamar al "
154+
"método :meth:`ContextVar.set`, que creó el *token* utilizado."
122155

123156
#: ../Doc/library/contextvars.rst:85
124157
msgid "For example::"
125-
msgstr ""
158+
msgstr "Por ejemplo::"
126159

127160
#: ../Doc/library/contextvars.rst:99
128161
msgid ""
129162
"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
130163
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
131164
"variable to what it was before the corresponding *set*."
132165
msgstr ""
166+
"Los objetos *token* son retornados por el método :meth:`ContextVar.set`. Se "
167+
"le pueden dar al método :meth:`ContextVar.reset` para restablecer el valor "
168+
"de la variable al que estuviese dado antes del *set* correspondiente."
133169

134170
#: ../Doc/library/contextvars.rst:106
135171
msgid ""
136172
"A read-only property. Points to the :class:`ContextVar` object that created "
137173
"the token."
138174
msgstr ""
175+
"Propiedad de sólo lectura. Apunta al objeto :class:`ContextVar` que creó el "
176+
"*token*."
139177

140178
#: ../Doc/library/contextvars.rst:111
141179
msgid ""
142180
"A read-only property. Set to the value the variable had before the :meth:"
143181
"`ContextVar.set` method call that created the token. It points to :attr:"
144182
"`Token.MISSING` is the variable was not set before the call."
145183
msgstr ""
184+
"Propiedad de sólo lectura. Es el valor que la variable tenía antes de llamar "
185+
"al método :meth:`ContextVar.set` que creó el *token*. Apunta a :attr:`Token."
186+
"MISSING` si la variable no estaba establecida antes de la llamada."
146187

147188
#: ../Doc/library/contextvars.rst:118
148189
msgid "A marker object used by :attr:`Token.old_value`."
149-
msgstr ""
190+
msgstr "Marcador utilizado por :attr:`Token.old_value`."
150191

151192
#: ../Doc/library/contextvars.rst:122
152193
msgid "Manual Context Management"
153-
msgstr ""
194+
msgstr "Gestión de Contexto Manual"
154195

155196
#: ../Doc/library/contextvars.rst:126
156197
msgid "Returns a copy of the current :class:`~contextvars.Context` object."
157-
msgstr ""
198+
msgstr "Retorna una copia del objeto :class:`~contextvars.Context` actual."
158199

159200
#: ../Doc/library/contextvars.rst:128
160201
msgid ""
161202
"The following snippet gets a copy of the current context and prints all "
162203
"variables and their values that are set in it::"
163204
msgstr ""
205+
"El siguiente código obtiene una copia del contexto actual e imprime todas "
206+
"las variables y sus valores establecidos en el contexto::"
164207

165208
#: ../Doc/library/contextvars.rst:134
166209
msgid ""
167210
"The function has an O(1) complexity, i.e. works equally fast for contexts "
168211
"with a few context variables and for contexts that have a lot of them."
169212
msgstr ""
213+
"La función tiene una complejidad de O(1); es decir, trabaja a la misma "
214+
"velocidad en contextos con pocas o con muchas variables de contexto."
170215

171216
#: ../Doc/library/contextvars.rst:141
172217
msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
173-
msgstr ""
218+
msgstr "Mapeo de :class:`ContextVars <ContextVar>` con sus valores."
174219

175220
#: ../Doc/library/contextvars.rst:143
176221
msgid ""
177222
"``Context()`` creates an empty context with no values in it. To get a copy "
178223
"of the current context use the :func:`~contextvars.copy_context` function."
179224
msgstr ""
225+
"``Context()`` crea un contexto vacío sin valores. Para obtener una copia del "
226+
"contexto actual, se puede utilizar la función :func:`~contextvars."
227+
"copy_context`."
180228

181229
#: ../Doc/library/contextvars.rst:147
182230
msgid "Context implements the :class:`collections.abc.Mapping` interface."
183-
msgstr ""
231+
msgstr "*Context* implementa la interfaz :class:`collections.abc.Mapping`."
184232

185233
#: ../Doc/library/contextvars.rst:151
186234
msgid ""
187235
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
188236
"method is called on. Return the result of the execution or propagate an "
189237
"exception if one occurred."
190238
msgstr ""
239+
"Ejecuta el código de ``callable(*args, **kwargs)`` en el objeto de contexto "
240+
"del cual se llama al método *run*. Retorna el resultado de la ejecución, o "
241+
"propaga una excepción si alguna ocurre."
191242

192243
#: ../Doc/library/contextvars.rst:155
193244
msgid ""
194245
"Any changes to any context variables that *callable* makes will be contained "
195246
"in the context object::"
196247
msgstr ""
248+
"Cualquier cambio realizado por *callable* sobre cualquier variable de "
249+
"contexto será contenido en el objeto de contexto::"
197250

198251
#: ../Doc/library/contextvars.rst:184
199252
msgid ""
200253
"The method raises a :exc:`RuntimeError` when called on the same context "
201254
"object from more than one OS thread, or when called recursively."
202255
msgstr ""
256+
"El método lanzará :exc:`RuntimeError` cuando es llamado desde el mismo "
257+
"objeto de contexto desde más de un hilo del sistema operativo, o si se llama "
258+
"recursivamente."
203259

260+
# ¿"shallow copy"?
261+
# (añadir a Memoria de traducción?)
204262
#: ../Doc/library/contextvars.rst:190
263+
#, fuzzy
205264
msgid "Return a shallow copy of the context object."
206-
msgstr ""
265+
msgstr "Retorna una copia superficial (*shallow copy*) del objeto de contexto."
207266

208267
#: ../Doc/library/contextvars.rst:194
209268
msgid ""
210269
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
211270
"otherwise."
212271
msgstr ""
272+
"Retorna ``True`` si *context* tiene un valor establecido para *var*; de lo "
273+
"contrario, retorna ``False``."
213274

214275
#: ../Doc/library/contextvars.rst:199
215276
msgid ""
216277
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
217278
"is not set in the context object, a :exc:`KeyError` is raised."
218279
msgstr ""
280+
"Retorna el valor de la variable :class:`ContextVar` *var*. Si la variable no "
281+
"está establecida en el contexto actual, se lanzará :exc:`KeyError`."
219282

220283
#: ../Doc/library/contextvars.rst:205
221284
msgid ""
222285
"Return the value for *var* if *var* has the value in the context object. "
223286
"Return *default* otherwise. If *default* is not given, return ``None``."
224287
msgstr ""
288+
"Retorna el valor de *var*, si *var* tiene el valor en el objeto de contexto; "
289+
"de lo contrario, retorna *default*. Si *default* no es dado, retorna "
290+
"``None``."
225291

226292
#: ../Doc/library/contextvars.rst:211
227293
msgid "Return an iterator over the variables stored in the context object."
228294
msgstr ""
295+
"Retorna un iterador de las variables almacenadas en el objeto de contexto."
229296

230297
#: ../Doc/library/contextvars.rst:216
231298
msgid "Return the number of variables set in the context object."
232-
msgstr ""
299+
msgstr "Retorna el número de variables establecidas en el objeto de contexto."
233300

234301
#: ../Doc/library/contextvars.rst:220
235302
msgid "Return a list of all variables in the context object."
236-
msgstr ""
303+
msgstr "Retorna un listado de todas las variables en el objeto de contexto."
237304

238305
#: ../Doc/library/contextvars.rst:224
239306
msgid "Return a list of all variables' values in the context object."
240307
msgstr ""
308+
"Retorna un listado de los valores de todas las variables en el objeto de "
309+
"contexto."
241310

242311
#: ../Doc/library/contextvars.rst:229
243312
msgid ""
244313
"Return a list of 2-tuples containing all variables and their values in the "
245314
"context object."
246315
msgstr ""
316+
"Retorna un listado de dos tuplas que contienen todas las variables y sus "
317+
"variables en el contexto actual."
247318

248319
#: ../Doc/library/contextvars.rst:234
249320
msgid "asyncio support"
250-
msgstr ""
321+
msgstr "Soporte *asyncio*"
251322

252323
#: ../Doc/library/contextvars.rst:236
253324
msgid ""
@@ -256,3 +327,8 @@ msgid ""
256327
"server, that uses a context variable to make the address of a remote client "
257328
"available in the Task that handles that client::"
258329
msgstr ""
330+
"Las variables de contexto están soportadas de forma nativa en :mod:`asyncio` "
331+
"y se pueden utilizar sin ninguna configuración adicional. Por ejemplo, el "
332+
"siguiente código crea un servidor simple de respuesta, que utiliza una "
333+
"variable de contexto que hace que la dirección del cliente remoto esté "
334+
"disponible en la *Task* que gestiona al cliente::"

0 commit comments

Comments
 (0)