|
7 | 7 | msgstr ""
|
8 | 8 | "Project-Id-Version: Python 3.12\n"
|
9 | 9 | "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" |
11 | 11 | "PO-Revision-Date: 2016-11-19 00:31+0000\n"
|
12 | 12 | "Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
|
13 | 13 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -38,279 +38,270 @@ msgstr ""
|
38 | 38 | msgid ""
|
39 | 39 | "The module formerly strictly applied the parsing rules described in the :rfc:"
|
40 | 40 | "`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." |
45 | 45 | msgstr ""
|
46 | 46 |
|
47 |
| -#: ../../library/http.cookies.rst:25 |
| 47 | +#: ../../library/http.cookies.rst:26 |
48 | 48 | msgid ""
|
49 | 49 | "The character set, :data:`string.ascii_letters`, :data:`string.digits` and "
|
50 | 50 | "``!#$%&'*+-.^_`|~:`` 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`)." |
52 | 52 | msgstr ""
|
53 | 53 |
|
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." |
56 | 56 | msgstr ""
|
57 | 57 |
|
58 |
| -#: ../../library/http.cookies.rst:35 |
| 58 | +#: ../../library/http.cookies.rst:36 |
59 | 59 | msgid ""
|
60 | 60 | "On encountering an invalid cookie, :exc:`CookieError` is raised, so if your "
|
61 | 61 | "cookie data comes from a browser you should always prepare for invalid data "
|
62 | 62 | "and catch :exc:`CookieError` on parsing."
|
63 | 63 | msgstr ""
|
64 | 64 |
|
65 |
| -#: ../../library/http.cookies.rst:42 |
| 65 | +#: ../../library/http.cookies.rst:43 |
66 | 66 | msgid ""
|
67 | 67 | "Exception failing because of :rfc:`2109` invalidity: incorrect attributes, "
|
68 | 68 | "incorrect :mailheader:`Set-Cookie` header, etc."
|
69 | 69 | msgstr ""
|
70 | 70 |
|
71 |
| -#: ../../library/http.cookies.rst:48 |
| 71 | +#: ../../library/http.cookies.rst:49 |
72 | 72 | msgid ""
|
73 | 73 | "This class is a dictionary-like object whose keys are strings and whose "
|
74 | 74 | "values are :class:`Morsel` instances. Note that upon setting a key to a "
|
75 | 75 | "value, the value is first converted to a :class:`Morsel` containing the key "
|
76 | 76 | "and the value."
|
77 | 77 | msgstr ""
|
78 | 78 |
|
79 |
| -#: ../../library/http.cookies.rst:52 |
| 79 | +#: ../../library/http.cookies.rst:53 |
80 | 80 | msgid "If *input* is given, it is passed to the :meth:`load` method."
|
81 | 81 | msgstr ""
|
82 | 82 |
|
83 |
| -#: ../../library/http.cookies.rst:57 |
| 83 | +#: ../../library/http.cookies.rst:58 |
84 | 84 | 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." |
90 | 90 | msgstr ""
|
91 | 91 |
|
92 |
| -#: ../../library/http.cookies.rst:66 |
| 92 | +#: ../../library/http.cookies.rst:68 |
93 | 93 | msgid "Module :mod:`http.cookiejar`"
|
94 | 94 | msgstr ":mod:`http.cookiejar` 模組"
|
95 | 95 |
|
96 |
| -#: ../../library/http.cookies.rst:65 |
| 96 | +#: ../../library/http.cookies.rst:67 |
97 | 97 | msgid ""
|
98 | 98 | "HTTP cookie handling for web *clients*. The :mod:`http.cookiejar` and :mod:"
|
99 | 99 | "`http.cookies` modules do not depend on each other."
|
100 | 100 | msgstr ""
|
101 | 101 |
|
102 |
| -#: ../../library/http.cookies.rst:68 |
| 102 | +#: ../../library/http.cookies.rst:70 |
103 | 103 | msgid ":rfc:`2109` - HTTP State Management Mechanism"
|
104 | 104 | msgstr ""
|
105 | 105 |
|
106 |
| -#: ../../library/http.cookies.rst:69 |
| 106 | +#: ../../library/http.cookies.rst:71 |
107 | 107 | msgid "This is the state management specification implemented by this module."
|
108 | 108 | msgstr ""
|
109 | 109 |
|
110 |
| -#: ../../library/http.cookies.rst:75 |
| 110 | +#: ../../library/http.cookies.rst:77 |
111 | 111 | msgid "Cookie Objects"
|
112 | 112 | msgstr "Cookie 物件"
|
113 | 113 |
|
114 |
| -#: ../../library/http.cookies.rst:80 |
| 114 | +#: ../../library/http.cookies.rst:82 |
115 | 115 | msgid ""
|
116 | 116 | "Return a tuple ``(real_value, coded_value)`` from a string representation. "
|
117 | 117 | "``real_value`` can be any type. This method does no decoding in :class:"
|
118 | 118 | "`BaseCookie` --- it exists so it can be overridden."
|
119 | 119 | msgstr ""
|
120 | 120 |
|
121 |
| -#: ../../library/http.cookies.rst:87 |
| 121 | +#: ../../library/http.cookies.rst:89 |
122 | 122 | msgid ""
|
123 | 123 | "Return a tuple ``(real_value, coded_value)``. *val* can be any type, but "
|
124 | 124 | "``coded_value`` will always be converted to a string. This method does no "
|
125 | 125 | "encoding in :class:`BaseCookie` --- it exists so it can be overridden."
|
126 | 126 | msgstr ""
|
127 | 127 |
|
128 |
| -#: ../../library/http.cookies.rst:92 |
| 128 | +#: ../../library/http.cookies.rst:94 |
129 | 129 | msgid ""
|
130 | 130 | "In general, it should be the case that :meth:`value_encode` and :meth:"
|
131 | 131 | "`value_decode` are inverses on the range of *value_decode*."
|
132 | 132 | msgstr ""
|
133 | 133 |
|
134 |
| -#: ../../library/http.cookies.rst:98 |
| 134 | +#: ../../library/http.cookies.rst:100 |
135 | 135 | msgid ""
|
136 | 136 | "Return a string representation suitable to be sent as HTTP headers. *attrs* "
|
137 | 137 | "and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* "
|
138 | 138 | "is used to join the headers together, and is by default the combination "
|
139 | 139 | "``'\\r\\n'`` (CRLF)."
|
140 | 140 | msgstr ""
|
141 | 141 |
|
142 |
| -#: ../../library/http.cookies.rst:106 |
| 142 | +#: ../../library/http.cookies.rst:108 |
143 | 143 | msgid ""
|
144 | 144 | "Return an embeddable JavaScript snippet, which, if run on a browser which "
|
145 | 145 | "supports JavaScript, will act the same as if the HTTP headers was sent."
|
146 | 146 | msgstr ""
|
147 | 147 |
|
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 |
150 | 150 | msgid "The meaning for *attrs* is the same as in :meth:`output`."
|
151 | 151 | msgstr ""
|
152 | 152 |
|
153 |
| -#: ../../library/http.cookies.rst:114 |
| 153 | +#: ../../library/http.cookies.rst:116 |
154 | 154 | msgid ""
|
155 | 155 | "If *rawdata* is a string, parse it as an ``HTTP_COOKIE`` and add the values "
|
156 | 156 | "found there as :class:`Morsel`\\ s. If it is a dictionary, it is equivalent "
|
157 | 157 | "to::"
|
158 | 158 | msgstr ""
|
159 | 159 |
|
160 |
| -#: ../../library/http.cookies.rst:124 |
| 160 | +#: ../../library/http.cookies.rst:126 |
161 | 161 | msgid "Morsel Objects"
|
162 | 162 | msgstr "Morsel 物件"
|
163 | 163 |
|
164 |
| -#: ../../library/http.cookies.rst:129 |
| 164 | +#: ../../library/http.cookies.rst:131 |
165 | 165 | msgid "Abstract a key/value pair, which has some :rfc:`2109` attributes."
|
166 | 166 | msgstr ""
|
167 | 167 |
|
168 |
| -#: ../../library/http.cookies.rst:131 |
| 168 | +#: ../../library/http.cookies.rst:133 |
169 | 169 | msgid ""
|
170 | 170 | "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:" |
172 | 172 | msgstr ""
|
173 | 173 |
|
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 |
211 | 175 | msgid ""
|
212 | 176 | "The attribute :attr:`httponly` specifies that the cookie is only transferred "
|
213 | 177 | "in HTTP requests, and is not accessible through JavaScript. This is intended "
|
214 | 178 | "to mitigate some forms of cross-site scripting."
|
215 | 179 | msgstr ""
|
216 | 180 |
|
217 |
| -#: ../../library/http.cookies.rst:148 |
| 181 | +#: ../../library/http.cookies.rst:150 |
218 | 182 | msgid ""
|
219 | 183 | "The attribute :attr:`samesite` specifies that the browser is not allowed to "
|
220 | 184 | "send the cookie along with cross-site requests. This helps to mitigate CSRF "
|
221 | 185 | "attacks. Valid values for this attribute are \"Strict\" and \"Lax\"."
|
222 | 186 | msgstr ""
|
223 | 187 |
|
224 |
| -#: ../../library/http.cookies.rst:152 |
| 188 | +#: ../../library/http.cookies.rst:154 |
225 | 189 | msgid "The keys are case-insensitive and their default value is ``''``."
|
226 | 190 | msgstr ""
|
227 | 191 |
|
228 |
| -#: ../../library/http.cookies.rst:154 |
| 192 | +#: ../../library/http.cookies.rst:156 |
229 | 193 | 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." |
232 | 196 | msgstr ""
|
233 | 197 |
|
234 |
| -#: ../../library/http.cookies.rst:158 |
| 198 | +#: ../../library/http.cookies.rst:160 |
235 | 199 | msgid ""
|
236 | 200 | "Attributes :attr:`~Morsel.key`, :attr:`~Morsel.value` and :attr:`~Morsel."
|
237 | 201 | "coded_value` are read-only. Use :meth:`~Morsel.set` for setting them."
|
238 | 202 | msgstr ""
|
239 | 203 |
|
240 |
| -#: ../../library/http.cookies.rst:163 |
| 204 | +#: ../../library/http.cookies.rst:165 |
241 | 205 | msgid "Added support for the :attr:`samesite` attribute."
|
242 | 206 | msgstr "新增 :attr:`samesite` 屬性的支援"
|
243 | 207 |
|
244 |
| -#: ../../library/http.cookies.rst:169 |
| 208 | +#: ../../library/http.cookies.rst:171 |
245 | 209 | msgid "The value of the cookie."
|
246 | 210 | msgstr ""
|
247 | 211 |
|
248 |
| -#: ../../library/http.cookies.rst:174 |
| 212 | +#: ../../library/http.cookies.rst:176 |
249 | 213 | msgid "The encoded value of the cookie --- this is what should be sent."
|
250 | 214 | msgstr ""
|
251 | 215 |
|
252 |
| -#: ../../library/http.cookies.rst:179 |
| 216 | +#: ../../library/http.cookies.rst:181 |
253 | 217 | msgid "The name of the cookie."
|
254 | 218 | msgstr ""
|
255 | 219 |
|
256 |
| -#: ../../library/http.cookies.rst:184 |
| 220 | +#: ../../library/http.cookies.rst:186 |
257 | 221 | msgid "Set the *key*, *value* and *coded_value* attributes."
|
258 | 222 | msgstr ""
|
259 | 223 |
|
260 |
| -#: ../../library/http.cookies.rst:189 |
| 224 | +#: ../../library/http.cookies.rst:191 |
261 | 225 | msgid "Whether *K* is a member of the set of keys of a :class:`Morsel`."
|
262 | 226 | msgstr ""
|
263 | 227 |
|
264 |
| -#: ../../library/http.cookies.rst:194 |
| 228 | +#: ../../library/http.cookies.rst:196 |
265 | 229 | msgid ""
|
266 | 230 | "Return a string representation of the Morsel, suitable to be sent as an HTTP "
|
267 | 231 | "header. By default, all the attributes are included, unless *attrs* is "
|
268 | 232 | "given, in which case it should be a list of attributes to use. *header* is "
|
269 | 233 | "by default ``\"Set-Cookie:\"``."
|
270 | 234 | msgstr ""
|
271 | 235 |
|
272 |
| -#: ../../library/http.cookies.rst:202 |
| 236 | +#: ../../library/http.cookies.rst:204 |
273 | 237 | msgid ""
|
274 | 238 | "Return an embeddable JavaScript snippet, which, if run on a browser which "
|
275 | 239 | "supports JavaScript, will act the same as if the HTTP header was sent."
|
276 | 240 | msgstr ""
|
277 | 241 |
|
278 |
| -#: ../../library/http.cookies.rst:210 |
| 242 | +#: ../../library/http.cookies.rst:212 |
279 | 243 | msgid ""
|
280 | 244 | "Return a string representing the Morsel, without any surrounding HTTP or "
|
281 | 245 | "JavaScript."
|
282 | 246 | msgstr ""
|
283 | 247 |
|
284 |
| -#: ../../library/http.cookies.rst:218 |
| 248 | +#: ../../library/http.cookies.rst:220 |
285 | 249 | msgid ""
|
286 | 250 | "Update the values in the Morsel dictionary with the values in the dictionary "
|
287 | 251 | "*values*. Raise an error if any of the keys in the *values* dict is not a "
|
288 | 252 | "valid :rfc:`2109` attribute."
|
289 | 253 | msgstr ""
|
290 | 254 |
|
291 |
| -#: ../../library/http.cookies.rst:222 |
| 255 | +#: ../../library/http.cookies.rst:224 |
292 | 256 | msgid "an error is raised for invalid keys."
|
293 | 257 | msgstr ""
|
294 | 258 |
|
295 |
| -#: ../../library/http.cookies.rst:228 |
| 259 | +#: ../../library/http.cookies.rst:230 |
296 | 260 | msgid "Return a shallow copy of the Morsel object."
|
297 | 261 | msgstr ""
|
298 | 262 |
|
299 |
| -#: ../../library/http.cookies.rst:230 |
| 263 | +#: ../../library/http.cookies.rst:232 |
300 | 264 | msgid "return a Morsel object instead of a dict."
|
301 | 265 | msgstr ""
|
302 | 266 |
|
303 |
| -#: ../../library/http.cookies.rst:236 |
| 26
10000
7 | +#: ../../library/http.cookies.rst:238 |
304 | 268 | msgid ""
|
305 | 269 | "Raise an error if key is not a valid :rfc:`2109` attribute, otherwise behave "
|
306 | 270 | "the same as :meth:`dict.setdefault`."
|
307 | 271 | msgstr ""
|
308 | 272 |
|
309 |
| -#: ../../library/http.cookies.rst:243 |
| 273 | +#: ../../library/http.cookies.rst:245 |
310 | 274 | msgid "Example"
|
311 | 275 | msgstr "範例"
|
312 | 276 |
|
313 |
| -#: ../../library/http.cookies.rst:245 |
| 277 | +#: ../../library/http.cookies.rst:247 |
314 | 278 | msgid ""
|
315 | 279 | "The following example demonstrates how to use the :mod:`http.cookies` module."
|
316 | 280 | 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