Skip to content

Commit f25e806

Browse files
committed
Traducido archivo library/contextvars.po (75% fuzzy)
1 parent eca10c2 commit f25e806

File tree

1 file changed

+119
-21
lines changed

1 file changed

+119
-21
lines changed

library/contextvars.po

Lines changed: 119 additions & 21 deletions
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-07 17:04+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,75 +31,107 @@ 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

41+
# ¿"concurrent code"?
42+
# (añadir a Memoria de traducción)
3343
#: ../Doc/library/contextvars.rst:17
44+
#, fuzzy
3445
msgid ""
3546
"Context managers that have state should use Context Variables instead of :"
3647
"func:`threading.local()` to prevent their state from bleeding to other code "
3748
"unexpectedly, when used in concurrent code."
3849
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*)."
3954

4055
#: ../Doc/library/contextvars.rst:21
4156
msgid "See also :pep:`567` for additional details."
42-
msgstr ""
57+
msgstr "Ver :pep:`567` para más detalles."
4358

4459
#: ../Doc/library/contextvars.rst:27
4560
msgid "Context Variables"
46-
msgstr ""
61+
msgstr "Variables de Contexto"
4762

63+
# ¿"e.g." = por ejemplo, en este contexto?
4864
#: ../Doc/library/contextvars.rst:31
65+
#, fuzzy
4966
msgid "This class is used to declare a new Context Variable, e.g.::"
5067
msgstr ""
68+
"Esta clase se utiliza para declarar una nueva Variable de Contexto, por "
69+
"ejemplo::"
5170

5271
#: ../Doc/library/contextvars.rst:35
5372
msgid ""
5473
"The required *name* parameter is used for introspection and debug purposes."
5574
msgstr ""
75+
"El parámetro obligatorio *name* se utiliza para introspección y depuración."
5676

5777
#: ../Doc/library/contextvars.rst:38
5878
msgid ""
5979
"The optional keyword-only *default* parameter is returned by :meth:"
6080
"`ContextVar.get` when no value for the variable is found in the current "
6181
"context."
6282
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."
6386

87+
# ¿"at the top module level and never in closures"?
88+
# ¿Traducción técnica de "garbage collector"?
6489
#: ../Doc/library/contextvars.rst:42
90+
#, fuzzy
6591
msgid ""
6692
"**Important:** Context Variables should be created at the top module level "
6793
"and never in closures. :class:`Context` objects hold strong references to "
6894
"context variables which prevents context variables from being properly "
6995
"garbage collected."
7096
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."
71101

72102
#: ../Doc/library/contextvars.rst:49
73103
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."
75105

76106
#: ../Doc/library/contextvars.rst:55
77107
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."
79109

80110
#: ../Doc/library/contextvars.rst:57
81111
msgid ""
82112
"If there is no value for the variable in the current context, the method "
83113
"will:"
84-
msgstr ""
114+
msgstr "Si la variable no tiene ningún valor en el contexto actual, el método:"
85115

86116
#: ../Doc/library/contextvars.rst:60
87117
msgid ""
88118
"return the value of the *default* argument of the method, if provided; or"
89119
msgstr ""
120+
"retornará el valor del argumento *default* del método, si alguno fue dado; o"
90121

91122
#: ../Doc/library/contextvars.rst:63
92123
msgid ""
93124
"return the default value for the context variable, if it was created with "
94125
"one; or"
95126
msgstr ""
127+
"retornará el valor por defecto de la variable de contexto, si ésta fue "
128+
"creada con alguno; o"
96129

97130
#: ../Doc/library/contextvars.rst:66
98131
msgid "raise a :exc:`LookupError`."
99-
msgstr ""
132+
msgstr "lanzará :exc:`LookupError`."
100133

134+
# ¿Verbo correcto? (ver contexto del texto original?
101135
#: ../Doc/library/contextvars.rst:70
102136
msgid ""
103137
"Call to set a new value for the context variable in the current context."
@@ -107,147 +141,206 @@ msgstr ""
107141
msgid ""
108142
"The required *value* argument is the new value for the context variable."
109143
msgstr ""
144+
"El argumento obligatorio *value* es el nuevo valor de la variable de "
145+
"contexto."
110146

111147
#: ../Doc/library/contextvars.rst:76
112148
msgid ""
113149
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
114150
"variable to its previous value via the :meth:`ContextVar.reset` method."
115151
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`."
116155

117156
#: ../Doc/library/contextvars.rst:82
118157
msgid ""
119158
"Reset the context variable to the value it had before the :meth:`ContextVar."
120159
"set` that created the *token* was used."
121160
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."
122163

123164
#: ../Doc/library/contextvars.rst:85
124165
msgid "For example::"
125-
msgstr ""
166+
msgstr "Por ejemplo::"
126167

127168
#: ../Doc/library/contextvars.rst:99
128169
msgid ""
129170
"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
130171
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
131172
"variable to what it was before the corresponding *set*."
132173
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."
133177

134178
#: ../Doc/library/contextvars.rst:106
135179
msgid ""
136180
"A read-only property. Points to the :class:`ContextVar` object that created "
137181
"the token."
138182
msgstr ""
183+
"Propiedad de sólo lectura. Apunta al objeto :class:`ContextVar` que creó el "
184+
"*token*."
139185

186+
# Se podría escribir mejor, sobre todo la última parte, si se traduce "literal" quizás no se entienda del todo bien.
140187
#: ../Doc/library/contextvars.rst:111
188+
#, fuzzy
141189
msgid ""
142190
"A read-only property. Set to the value the variable had before the :meth:"
143191
"`ContextVar.set` method call that created the token. It points to :attr:"
144192
"`Token.MISSING` is the variable was not set before the call."
145193
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."
146197

147198
#: ../Doc/library/contextvars.rst:118
148199
msgid "A marker object used by :attr:`Token.old_value`."
149-
msgstr ""
200+
msgstr "Marcador utilizado por :attr:`Token.old_value`."
150201

151202
#: ../Doc/library/contextvars.rst:122
152203
msgid "Manual Context Management"
153-
msgstr ""
204+
msgstr "Gestión de Contexto Manual"
154205

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

159210
#: ../Doc/library/contextvars.rst:128
160211
msgid ""
161212
"The following snippet gets a copy of the current context and prints all "
162213
"variables and their values that are set in it::"
163214
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::"
164217

165218
#: ../Doc/library/contextvars.rst:134
166219
msgid ""
167220
"The function has an O(1) complexity, i.e. works equally fast for contexts "
168221
"with a few context variables and for contexts that have a lot of them."
169222
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."
170225

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

175230
#: ../Doc/library/contextvars.rst:143
176231
msgid ""
177232
"``Context()`` creates an empty context with no values in it. To get a copy "
178233
"of the current context use the :func:`~contextvars.copy_context` function."
179234
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`."
180238

239+
# ¿Artículo "El"? (ver contexto de artículo original)
181240
#: ../Doc/library/contextvars.rst:147
241+
#, fuzzy
182242
msgid "Context implements the :class:`collections.abc.Mapping` interface."
183-
msgstr ""
243+
msgstr "El contexto implementa la interfaz :class:`collections.abc.Mapping`."
184244

185245
#: ../Doc/library/contextvars.rst:151
186246
msgid ""
187247
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
188248
"method is called on. Return the result of the execution or propagate an "
189249
"exception if one occurred."
190250
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."
191254

192255
#: ../Doc/library/contextvars.rst:155
193256
msgid ""
194257
"Any changes to any context variables that *callable* makes will be contained "
195258
"in the context object::"
196259
msgstr ""
260+
"Cualquier cambio realizado por *callable* sobre cualquier variable de "
261+
"contexto será contenido en el objeto de contexto::"
197262

263+
# ¿"OS thread"?
264+
# (¿añadir a Memoria de traducción?)
198265
#: ../Doc/library/contextvars.rst:184
266+
#, fuzzy
199267
msgid ""
200268
"The method raises a :exc:`RuntimeError` when called on the same context "
201269
"object from more than one OS thread, or when called recursively."
202270
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."
203274

275+
# ¿"shallow copy"?
276+
# (añadir a Memoria de traducción)
204277
#: ../Doc/library/contextvars.rst:190
278+
#, fuzzy
205279
msgid "Return a shallow copy of the context object."
206-
msgstr ""
280+
msgstr "Returna una copia superficial (*shallow copy*) del objeto de contexto."
207281

208282
#: ../Doc/library/contextvars.rst:194
209283
msgid ""
210284
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
211285
"otherwise."
212286
msgstr ""
287+
"Retorna ``True`` si *context* tiene un valor establecido para *var*; de lo "
288+
"contrario, retorna ``False``."
213289

214290
#: ../Doc/library/contextvars.rst:199
215291
msgid ""
216292
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
217293
"is not set in the context object, a :exc:`KeyError` is raised."
218294
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`."
219297

220298
#: ../Doc/library/contextvars.rst:205
221299
msgid ""
222300
"Return the value for *var* if *var* has the value in the context object. "
223301
"Return *default* otherwise. If *default* is not given, return ``None``."
224302
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``."
225306

307+
# ¿"iterator" = iterador?
308+
# (añadir a Memoria de traducción)
226309
#: ../Doc/library/contextvars.rst:211
310+
#, fuzzy
227311
msgid "Return an iterator over the variables stored in the context object."
228312
msgstr ""
313+
"Retorna un iterador de las variables almacenadas en el objeto de contexto."
229314

230315
#: ../Doc/library/contextvars.rst:216
231316
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."
233318

234319
#: ../Doc/library/contextvars.rst:220
235320
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."
237322

238323
#: ../Doc/library/contextvars.rst:224
239324
msgid "Return a list of all variables' values in the context object."
240325
msgstr ""
326+
"Retorna un listado de los valores de todas las variables en el objeto de "
327+
"contexto."
241328

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.
242330
#: ../Doc/library/contextvars.rst:229
331+
#, fuzzy
243332
msgid ""
244333
"Return a list of 2-tuples containing all variables and their values in the "
245334
"context object."
246335
msgstr ""
336+
"Retorna un listado de dos tuplas que contienen todas las variables y sus "
337+
"variables en el contexto actual."
247338

339+
# Ver contexto, pero si es un encabezado, debería empezar con mayúscula
248340
#: ../Doc/library/contextvars.rst:234
341+
#, fuzzy
249342
msgid "asyncio support"
250-
msgstr ""
343+
msgstr "Soporte *asyncio*"
251344

252345
#: ../Doc/library/contextvars.rst:236
253346
msgid ""
@@ -256,3 +349,8 @@ msgid ""
256349
"server, that uses a context variable to make the address of a remote client "
257350
"available in the Task that handles that client::"
258351
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

Comments
 (0)