@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.14\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-05-09 14:19 +0000\n "
14
+ "POT-Creation-Date : 2025-07-31 14:20 +0000\n "
15
15
"PO-Revision-Date : 2025-07-18 18:49+0000\n "
16
16
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
17
17
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -172,8 +172,8 @@ msgid ""
172
172
"supports JavaScript, will act the same as if the HTTP headers was sent."
173
173
msgstr "返回一段可供嵌入的 JavaScript 代码,若在支持 JavaScript 的浏览器上运行,其作用如同发送 HTTP 头部信息一样。"
174
174
175
- #: ../../library/http.cookies.rst:111 ../../library/http.cookies.rst:224
176
- #: ../../library/http.cookies.rst:232
175
+ #: ../../library/http.cookies.rst:111 ../../library/http.cookies.rst:227
176
+ #: ../../library/http.cookies.rst:235
177
177
msgid "The meaning for *attrs* is the same as in :meth:`output`."
178
178
msgstr "*attrs* 的含义与 :meth:`output` 的相同。"
179
179
@@ -219,14 +219,15 @@ msgstr ""
219
219
220
220
#: ../../library/http.cookies.rst:151
221
221
msgid ""
222
- "The attribute :attr:`samesite` specifies that the browser is not allowed to "
223
- "send the cookie along with cross-site requests. This helps to mitigate CSRF "
224
- "attacks. Valid values for this attribute are \" Strict\" and \" Lax\" ."
222
+ "The attribute :attr:`samesite` controls when the browser sends the cookie "
223
+ "with cross-site requests. This helps to mitigate CSRF attacks. Valid values "
224
+ "are \" Strict\" (only sent with same-site requests), \" Lax\" (sent with same-"
225
+ "site requests and top-level navigations), and \" None\" (sent with same-site "
226
+ "and cross-site requests). When using \" None\" , the \" secure\" attribute must"
227
+ " also be set, as required by modern browsers."
225
228
msgstr ""
226
- ":attr:`samesite` 属性指明了浏览器不得与跨站请求一起发送该 cookie。这有助于减轻 CSRF 攻击的危害。此属性的有效值为 "
227
- "“Strict”和“Lax”。"
228
229
229
- #: ../../library/http.cookies.rst:155
230
+ #: ../../library/http.cookies.rst:158
230
231
msgid ""
231
232
"The attribute :attr:`partitioned` indicates to user agents that these cross-"
232
233
"site cookies *should* only be available in the same top-level context that "
@@ -236,7 +237,7 @@ msgstr ""
236
237
"属性 :attr:`partitioned` 提示 user agent 这些跨站点 cookie *应当* 仅在首次设置 cookie "
237
238
"所在的同一最高层级上下文中可用。 要让它被 user agent 所接受,你还 **必须** 设置 ``Secure``。"
238
239
239
- #: ../../library/http.cookies.rst:160
240
+ #: ../../library/http.cookies.rst:163
240
241
msgid ""
241
242
"In addition, it is recommended to use the ``__Host`` prefix when setting "
242
243
"partitioned cookies to make them bound to the hostname and not the "
@@ -246,17 +247,17 @@ msgstr ""
246
247
"此外,还建议在设置分块 cookie 时使用 ``__Host`` 前缀以使其绑定到主机名而非可注册域。 请参阅 `CHIPS (Cookies "
247
248
"Having Independent Partitioned State)`_ 获取完整说明和示例。"
248
249
249
- #: ../../library/http.cookies.rst:168
250
+ #: ../../library/http.cookies.rst:171
250
251
msgid "The keys are case-insensitive and their default value is ``''``."
251
252
msgstr "键不区分大小写,默认值为 ``''``。"
252
253
253
- #: ../../library/http.cookies.rst:170
254
+ #: ../../library/http.cookies.rst:173
254
255
msgid ""
255
256
":meth:`!__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel.value` into"
256
257
" account."
257
258
msgstr "现在 :meth:`!__eq__` 会同时考虑 :attr:`~Morsel.key` 和 :attr:`~Morsel.value`。"
258
259
259
- #: ../../library/http.cookies.rst:174
260
+ #: ../../library/http.cookies.rst:177
260
261
msgid ""
261
262
"Attributes :attr:`~Morsel.key`, :attr:`~Morsel.value` and "
262
263
":attr:`~Morsel.coded_value` are read-only. Use :meth:`~Morsel.set` for "
@@ -265,35 +266,35 @@ msgstr ""
265
266
" :attr:`~Morsel.key` 、 :attr:`~Morsel.value` 和 :attr:`~Morsel.coded_value` "
266
267
"是只读属性。可用 :meth:`~Morsel.set` 进行设置。"
267
268
268
- #: ../../library/http.cookies.rst:179
269
+ #: ../../library/http.cookies.rst:182
269
270
msgid "Added support for the :attr:`samesite` attribute."
270
271
msgstr "增加对 :attr:`samesite` 属性的支持。"
271
272
272
- #: ../../library/http.cookies.rst:182
273
+ #: ../../library/http.cookies.rst:185
273
274
msgid "Added support for the :attr:`partitioned` attribute."
274
275
msgstr "增加对 :attr:`partitioned` 属性的支持。"
275
276
276
- #: ../../library/http.cookies.rst:188
277
+ #: ../../library/http.cookies.rst:191
277
278
msgid "The value of the cookie."
278
279
msgstr "Cookie的值。"
279
280
280
- #: ../../library/http.cookies.rst:193
281
+ #: ../../library/http.cookies.rst:196
281
282
msgid "The encoded value of the cookie --- this is what should be sent."
282
283
msgstr "编码后的 cookie 值——也即要发送的内容。"
283
284
284
- #: ../../library/http.cookies.rst:198
285
+ #: ../../library/http.cookies.rst:201
285
286
msgid "The name of the cookie."
286
287
msgstr "cookie 名称"
287
288
288
- #: ../../library/http.cookies.rst:203
289
+ #: ../../library/http.cookies.rst:206
289
290
msgid "Set the *key*, *value* and *coded_value* attributes."
290
291
msgstr "设置 *key*、*value* 和 *coded_value* 属性。"
291
292
292
- #: ../../library/http.cookies.rst:208
293
+ #: ../../library/http.cookies.rst:211
293
294
msgid "Whether *K* is a member of the set of keys of a :class:`Morsel`."
294
295
msgstr "判断 *K* 是否属于 :class:`Morsel` 的键。"
295
296
296
- #: ../../library/http.cookies.rst:213
297
+ #: ../../library/http.cookies.rst:216
297
298
msgid ""
298
299
"Return a string representation of the Morsel, suitable to be sent as an HTTP"
299
300
" header. By default, all the attributes are included, unless *attrs* is "
@@ -303,19 +304,19 @@ msgstr ""
303
304
"返回 morsel 的字符串形式,适用于作为 HTTP 头部信息进行发送。默认包含所有属性,除非给出 *attrs* 属性列表。*header* 默认为"
304
305
" ``\" Set-Cookie:\" ``。"
305
306
306
- #: ../../library/http.cookies.rst:221
307
+ #: ../../library/http.cookies.rst:224
307
308
msgid ""
308
309
"Return an embeddable JavaScript snippet, which, if run on a browser which "
309
310
"supports JavaScript, will act the same as if the HTTP header was sent."
310
311
msgstr "返回一段可供嵌入的 JavaScript 代码,若在支持 JavaScript 的浏览器上运行,其作用如同发送 HTTP 头部信息一样。"
311
312
312
- #: ../../library/http.cookies.rst:229
313
+ #: ../../library/http.cookies.rst:232
313
314
msgid ""
314
315
"Return a string representing the Morsel, without any surrounding HTTP or "
315
316
"JavaScript."
316
317
msgstr "返回 morsel 的字符串形式,不含 HTTP 或 JavaScript 数据。"
317
318
318
- #: ../../library/http.cookies.rst:237
319
+ #: ../../library/http.cookies.rst:240
319
320
msgid ""
320
321
"Update the values in the Morsel dictionary with the values in the dictionary"
321
322
" *values*. Raise an error if any of the keys in the *values* dict is not a "
@@ -324,35 +325,35 @@ msgstr ""
324
325
"用字典 *values* 中的值更新 morsel 字典中的值。若有 *values* 字典中的键不是有效的 :rfc:`2109` "
325
326
"属性,则会触发错误。"
326
327
327
- #: ../../library/http.cookies.rst:241
328
+ #: ../../library/http.cookies.rst:244
328
329
msgid "an error is raised for invalid keys."
329
330
msgstr "无效键会触发错误。"
330
331
331
- #: ../../library/http.cookies.rst:247
332
+ #: ../../library/http.cookies.rst:250
332
333
msgid "Return a shallow copy of the Morsel object."
333
334
msgstr "返回 morsel 对象的浅表复制副本。"
334
335
335
- #: ../../library/http.cookies.rst:249
336
+ #: ../../library/http.cookies.rst:252
336
337
msgid "return a Morsel object instead of a dict."
337
338
msgstr "返回一个 morsel 对象,而非字典。"
338
339
339
- #: ../../library/http.cookies.rst:255
340
+ #: ../../library/http.cookies.rst:258
340
341
msgid ""
341
342
"Raise an error if key is not a valid :rfc:`2109` attribute, otherwise behave"
342
343
" the same as :meth:`dict.setdefault`."
343
344
msgstr "若 key 不是有效的 :rfc:`2109` 属性则触发错误,否则与 :meth:`dict.setdefault` 相同。"
344
345
345
- #: ../../library/http.cookies.rst:262
346
+ #: ../../library/http.cookies.rst:265
346
347
msgid "Example"
347
348
msgstr "示例"
348
349
349
- #: ../../library/http.cookies.rst:264
350
+ #: ../../library/http.cookies.rst:267
350
351
msgid ""
351
352
"The following example demonstrates how to use the :mod:`http.cookies` "
352
353
"module."
353
354
msgstr "以下例子演示了 :mod:`http.cookies` 模块的用法。"
354
355
355
- #: ../../library/http.cookies.rst:266
356
+ #: ../../library/http.cookies.rst:269
356
357
msgid ""
357
358
">>> from http import cookies\n"
358
359
">>> C = cookies.SimpleCookie()\n"
0 commit comments