8000 sync with cpython 02fbe893 · python/python-docs-zh-tw@8ca6718 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ca6718

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 02fbe893
1 parent 9eeb48a commit 8ca6718

File tree

2 files changed

+161
-169
lines changed

2 files changed

+161
-169
lines changed

library/http.cookies.po

Lines changed: 86 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-06-20 18:08+0800\n"
10+
"POT-Creation-Date: 2023-12-10 14:21+0000\n"
1111
"PO-Revision-Date: 2016-11-19 00:31+0000\n"
1212
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -38,279 +38,270 @@ msgstr ""
3838
msgid ""
3939
"The module formerly strictly applied the parsing rules described in the :rfc:"
4040
"`2109` and :rfc:`2068` specifications. It has since been discovered that "
41-
"MSIE 3.0x doesn't follow the character rules outlined in those specs and "
42-
"also many current day browsers and servers have relaxed parsing rules when "
43-
"comes to Cookie handling. As a result, the parsing rules used are a bit "
44-
"less strict."
41+
"MSIE 3.0x didn't follow the character rules outlined in those specs; many "
42+
"current-day browsers and servers have also relaxed parsing rules when it "
43+
"comes to cookie handling. As a result, this module now uses parsing rules "
44+
"that are a bit less strict than they once were."
4545
msgstr ""
4646

47-
#: ../../library/http.cookies.rst:25
47+
#: ../../library/http.cookies.rst:26
4848
msgid ""
4949
"The character set, :data:`string.ascii_letters`, :data:`string.digits` and "
5050
"``!#$%&'*+-.^_`|~:`` denote the set of valid characters allowed by this "
51-
"module in Cookie name (as :attr:`~Morsel.key`)."
51+
"module in a cookie name (as :attr:`~Morsel.key`)."
5252
msgstr ""
5353

54-
#: ../../library/http.cookies.rst:29
55-
msgid "Allowed ':' as a valid Cookie name character."
54+
#: ../../library/http.cookies.rst:30
55+
msgid "Allowed ':' as a valid cookie name character."
5656
msgstr ""
5757

58-
#: ../../library/http.cookies.rst:35
58+
#: ../../library/http.cookies.rst:36
5959
msgid ""
6060
"On encountering an invalid cookie, :exc:`CookieError` is raised, so if your "
6161
"cookie data comes from a browser you should always prepare for invalid data "
6262
"and catch :exc:`CookieError` on parsing."
6363
msgstr ""
6464

65-
#: ../../library/http.cookies.rst:42
65+
#: ../../library/http.cookies.rst:43
6666
msgid ""
6767
"Exception failing because of :rfc:`2109` invalidity: incorrect attributes, "
6868
"incorrect :mailheader:`Set-Cookie` header, etc."
6969
msgstr ""
7070

71-
#: ../../library/http.cookies.rst:48
71+
#: ../../library/http.cookies.rst:49
7272
msgid ""
7373
"This class is a dictionary-like object whose keys are strings and whose "
7474
"values are :class:`Morsel` instances. Note that upon setting a key to a "
7575
"value, the value is first converted to a :class:`Morsel` containing the key "
7676
"and the value."
7777
msgstr ""
7878

79-
#: ../../library/http.cookies.rst:52
79+
#: ../../library/http.cookies.rst:53
8080
msgid "If *input* is given, it is passed to the :meth:`load` method."
8181
msgstr ""
8282

83-
#: ../../library/http.cookies.rst:57
83+
#: ../../library/http.cookies.rst:58
8484
msgid ""
85-
"This class derives from :class:`BaseCookie` and overrides :meth:"
86-"`value_decode` and :meth:`value_encode`. SimpleCookie supports strings as "
87-
"cookie values. When setting the value, SimpleCookie calls the builtin :func:"
88-
"`str()` to convert the value to a string. Values received from HTTP are kept "
89-
"as strings."
85+
"This class derives from :class:`BaseCookie` and overrides :meth:`~BaseCookie."
86+
"value_decode` and :meth:`~BaseCookie.value_encode`. :class:`!SimpleCookie` "
87+
"supports strings as cookie values. When setting the value, :class:`!"
88+
"SimpleCookie` calls the builtin :func:`str` to convert the value to a "
89+
"string. Values received from HTTP are kept as strings."
9090
msgstr ""
9191

92-
#: ../../library/http.cookies.rst:66
92+
#: ../../library/http.cookies.rst:68
9393
msgid "Module :mod:`http.cookiejar`"
9494
msgstr ":mod:`http.cookiejar` 模組"
9595

96-
#: ../../library/http.cookies.rst:65
96+
#: ../../library/http.cookies.rst:67
9797
msgid ""
9898
"HTTP cookie handling for web *clients*. The :mod:`http.cookiejar` and :mod:"
9999
"`http.cookies` modules do not depend on each other."
100100
msgstr ""
101101

102-
#: ../../library/http.cookies.rst:68
102+
#: ../../library/http.cookies.rst:70
103103
msgid ":rfc:`2109` - HTTP State Management Mechanism"
104104
msgstr ""
105105

106-
#: ../../library/http.cookies.rst:69
106+
#: ../../library/http.cookies.rst:71
107107
msgid "This is the state management specification implemented by this module."
108108
msgstr ""
109109

110-
#: ../../library/http.cookies.rst:75
110+
#: ../../library/http.cookies.rst:77
111111
msgid "Cookie Objects"
112112
msgstr "Cookie 物件"
113113

114-
#: ../../library/http.cookies.rst:80
114+
#: ../../library/http.cookies.rst:82
115115
msgid ""
116116
"Return a tuple ``(real_value, coded_value)`` from a string representation. "
117117
"``real_value`` can be any type. This method does no decoding in :class:"
118118
"`BaseCookie` --- it exists so it can be overridden."
119119
msgstr ""
120120

121-
#: ../../library/http.cookies.rst:87
121+
#: ../../library/http.cookies.rst:89
122122
msgid ""
123123
"Return a tuple ``(real_value, coded_value)``. *val* can be any type, but "
124124
"``coded_value`` will always be converted to a string. This method does no "
125125
"encoding in :class:`BaseCookie` --- it exists so it can be overridden."
126126
msgstr ""
127127

128-
#: ../../library/http.cookies.rst:92
128+
#: ../../library/http.cookies.rst:94
129129
msgid ""
130130
"In general, it should be the case that :meth:`value_encode` and :meth:"
131131
"`value_decode` are inverses on the range of *value_decode*."
132132
msgstr ""
133133

134-
#: ../../library/http.cookies.rst:98
134+
#: ../../library/http.cookies.rst:100
135135
msgid ""
136136
"Return a string representation suitable to be sent as HTTP headers. *attrs* "
137137
"and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* "
138138
"is used to join the headers together, and is by default the combination "
139139
"``'\\r\\n'`` (CRLF)."
140140
msgstr ""
141141

142-
#: ../../library/http.cookies.rst:106
142+
#: ../../library/http.cookies.rst:108
143143
msgid ""
144144
"Return an embeddable JavaScript snippet, which, if run on a browser which "
145145
"supports JavaScript, will act the same as if the HTTP headers was sent."
146146
msgstr ""
147147

148-
#: ../../library/http.cookies.rst:109 ../../library/http.cookies.rst:205
149-
#: ../../library/http.cookies.rst:213
148+
#: ../../library/http.cookies.rst:111 ../../library/http.cookies.rst:207
149+
#: ../../library/http.cookies.rst:215
150150
msgid "The meaning for *attrs* is the same as in :meth:`output`."
151151
msgstr ""
152152

153-
#: ../../library/http.cookies.rst:114
153+
#: ../../library/http.cookies.rst:116
154154
msgid ""
155155
"If *rawdata* is a string, parse it as an ``HTTP_COOKIE`` and add the values "
156156
"found there as :class:`Morsel`\\ s. If it is a dictionary, it is equivalent "
157157
"to::"
158158
msgstr ""
159159

160-
#: ../../library/http.cookies.rst:124
160+
#: ../../library/http.cookies.rst:126
161161
msgid "Morsel Objects"
162162
msgstr "Morsel 物件"
163163

164-
#: ../../library/http.cookies.rst:129
164+
#: ../../library/http.cookies.rst:131
165165
msgid "Abstract a key/value pair, which has some :rfc:`2109` attributes."
166166
msgstr ""
167167

168-
#: ../../library/http.cookies.rst:131
168+
#: ../../library/http.cookies.rst:133
169169
msgid ""
170170
"Morsels are dictionary-like objects, whose set of keys is constant --- the "
171-
"valid :rfc:`2109` attributes, which are"
171+
"valid :rfc:`2109` attributes, which are:"
172172
msgstr ""
173173

174-
#: ../../library/http.cookies.rst:134
175-
msgid "``expires``"
176-
msgstr "``expires``"
177-
178-
#: ../../library/http.cookies.rst:135
179-
msgid "``path``"
180-
msgstr "``path``"
181-
182-
#: ../../library/http.cookies.rst:136
183-
msgid "``comment``"
184-
msgstr "``comment``"
185-
186-
#: ../../library/http.cookies.rst:137
187-
msgid "``domain``"
188-
msgstr "``domain``"
189-
190-
#: ../../library/http.cookies.rst:138
191-
msgid "``max-age``"
192-
msgstr "``max-age``"
193-
194-
#: ../../library/http.cookies.rst:139
195-
msgid "``secure``"
196-
msgstr "``secure``"
197-
198-
#: ../../library/http.cookies.rst:140
199-
msgid "``version``"
200-
msgstr "``version``"
201-
202-
#: ../../library/http.cookies.rst:141
203-
msgid "``httponly``"
204-
msgstr "``httponly``"
205-
206-
#: ../../library/http.cookies.rst:142
207-
msgid "``samesite``"
208-
msgstr "``samesite``"
209-
210-
#: ../../library/http.cookies.rst:144
174+
#: ../../library/http.cookies.rst:146
211175
msgid ""
212176
"The attribute :attr:`httponly` specifies that the cookie is only transferred "
213177
"in HTTP requests, and is not accessible through JavaScript. This is intended "
214178
"to mitigate some forms of cross-site scripting."
215179
msgstr ""
216180

217-
#: ../../library/http.cookies.rst:148
181+
#: ../../library/http.cookies.rst:150
218182
msgid ""
219183
"The attribute :attr:`samesite` specifies that the browser is not allowed to "
220184
"send the cookie along with cross-site requests. This helps to mitigate CSRF "
221185
"attacks. Valid values for this attribute are \"Strict\" and \"Lax\"."
222186
msgstr ""
223187

224-
#: ../../library/http.cookies.rst:152
188+
#: ../../library/http.cookies.rst:154
225189
msgid "The keys are case-insensitive and their default value is ``''``."
226190
msgstr ""
227191

228-
#: ../../library/http.cookies.rst:154
192+
#: ../../library/http.cookies.rst:156
229193
msgid ""
230-
":meth:`~Morsel.__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel."
231-
"value` into account."
194+
":meth:`!__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel.value` into "
195+
"account."
232196
msgstr ""
233197

234-
#: ../../library/http.cookies.rst:158
198+
#: ../../library/http.cookies.rst:160
235199
msgid ""
236200
"Attributes :attr:`~Morsel.key`, :attr:`~Morsel.value` and :attr:`~Morsel."
237201
"coded_value` are read-only. Use :meth:`~Morsel.set` for setting them."
238202
msgstr ""
239203

240-
#: ../../library/http.cookies.rst:163
204+
#: ../../library/http.cookies.rst:165
241205
msgid "Added support for the :attr:`samesite` attribute."
242206
msgstr "新增 :attr:`samesite` 屬性的支援"
243207

244-
#: ../../library/http.cookies.rst:169
208+
#: ../../library/http.cookies.rst:171
245209
msgid "The value of the cookie."
246210
msgstr ""
247211

248-
#: ../../library/http.cookies.rst:174
212+
#: ../../library/http.cookies.rst:176
249213
msgid "The encoded value of the cookie --- this is what should be sent."
250214
msgstr ""
251215

252-
#: ../../library/http.cookies.rst:179
216+
#: ../../library/http.cookies.rst:181
253217
msgid "The name of the cookie."
254218
msgstr ""
255219

256-
#: ../../library/http.cookies.rst:184
220+
#: ../../library/http.cookies.rst:186
257221
msgid "Set the *key*, *value* and *coded_value* attributes."
258222
msgstr ""
259223

260-
#: ../../library/http.cookies.rst:189
224+
#: ../../library/http.cookies.rst:191
261225
msgid "Whether *K* is a member of the set of keys of a :class:`Morsel`."
262226
msgstr ""
263227

264-
#: ../../library/http.cookies.rst:194
228+
#: ../../library/http.cookies.rst:196
265229
msgid ""
266230
"Return a string representation of the Morsel, suitable to be sent as an HTTP "
267231
"header. By default, all the attributes are included, unless *attrs* is "
268232
"given, in which case it should be a list of attributes to use. *header* is "
269233
"by default ``\"Set-Cookie:\"``."
270234
msgstr ""
271235

272-
#: ../../library/http.cookies.rst:202
236+
#: ../../library/http.cookies.rst:204
273237
msgid ""
274238
"Return an embeddable JavaScript snippet, which, if run on a browser which "
275239
"supports JavaScript, will act the same as if the HTTP header was sent."
276240
msgstr ""
277241

278-
#: ../../library/http.cookies.rst:210
242+
#: ../../library/http.cookies.rst:212
279243
msgid ""
280244
"Return a string representing the Morsel, without any surrounding HTTP or "
281245
"JavaScript."
282246
msgstr ""
283247

284-
#: ../../library/http.cookies.rst:218
248+
#: ../../library/http.cookies.rst:220
285249
msgid ""
286250
"Update the values in the Morsel dictionary with the values in the dictionary "
287251
"*values*. Raise an error if any of the keys in the *values* dict is not a "
288252
"valid :rfc:`2109` attribute."
289253
msgstr ""
290254

291-
#: ../../library/http.cookies.rst:222
255+
#: ../../library/http.cookies.rst:224
292256
msgid "an error is raised for invalid keys."
293257
msgstr ""
294258

295-
#: ../../library/http.cookies.rst:228
259+
#: ../../library/http.cookies.rst:230
296260
msgid "Return a shallow copy of the Morsel object."
297261
msgstr ""
298262

299-
#: ../../library/http.cookies.rst:230
263+
#: ../../library/http.cookies.rst:232
300264
msgid "return a Morsel object instead of a dict."
301265
msgstr ""
302266

303-
#: ../../library/http.cookies.rst:236
26 10000 7+
#: ../../library/http.cookies.rst:238
304268
msgid ""
305269
"Raise an error if key is not a valid :rfc:`2109` attribute, otherwise behave "
306270
"the same as :meth:`dict.setdefault`."
307271
msgstr ""
308272

309-
#: ../../library/http.cookies.rst:243
273+
#: ../../library/http.cookies.rst:245
310274
msgid "Example"
311275
msgstr "範例"
312276

313-
#: ../../library/http.cookies.rst:245
277+
#: ../../library/http.cookies.rst:247
314278
msgid ""
315279
"The following example demonstrates how to use the :mod:`http.cookies` module."
316280
msgstr ""
281+
282+
#~ msgid "``expires``"
283+
#~ msgstr "``expires``"
284+
285+
#~ msgid "``path``"
286+
#~ msgstr "``path``"
287+
288+
#~ msgid "``comment``"
289+
#~ msgstr "``comment``"
290+
291+
#~ msgid "``domain``"
292+
#~ msgstr "``domain``"
293+
294+
#~ msgid "``max-age``"
295+
#~ msgstr "``max-age``"
296+
297+
#~ msgid "``secure``"
298+
#~ msgstr "``secure``"
299+
300+
#~ msgid "``version``"
301+
#~ msgstr "``version``"
302+
303+
#~ msgid "``httponly``"
304+
#~ msgstr "``httponly``"
305+
306+
#~ msgid "``samesite``"
307+
#~ msgstr "``samesite``"

0 commit comments

Comments
 (0)
0