Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd9b3ce

Browse files
committed
editing json.po, up to line 348
1 parentc32ec08 commitbd9b3ce

File tree

1 file changed

+41
-29
lines changed

1 file changed

+41
-29
lines changed

‎library/json.po

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ msgstr "對基本 Python 物件階層進行編碼: ::"
6767

6868
#:../../library/json.rst:48
6969
msgid"Compact encoding::"
70-
msgstr"改用密集型編碼方式::"
70+
msgstr"改用緊湊型編碼方式::"
7171

7272
#:../../library/json.rst:54
7373
msgid"Pretty printing::"
@@ -130,19 +130,27 @@ msgid ""
130130
"basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`, "
131131
"``None``) will be skipped instead of raising a :exc:`TypeError`."
132132
msgstr""
133+
"如果 *skipkeys* 被設為 true(預設值:``False``),那麼非基本型別"
134+
"(:class:`str`,:class:`int`,:class:`float`,:class:`bool`,``None``)"
135+
"的 dictionary(字典)鍵值將被略過,而不會引發 :exc:`TypeError`。"
133136

134137
#:../../library/json.rst:150
135138
msgid""
136139
"The :mod:`json` module always produces :class:`str` objects, not :class:"
137140
"`bytes` objects. Therefore, ``fp.write()`` must support :class:`str` input."
138141
msgstr""
142+
":mod:`json` 模組總是產生 :class:`str` 物件,而非 :class:`bytes` 物件。"
143+
"因此,``fp.write()`` 必須支援 :class:`str` 的輸入。"
144+
139145

140146
#:../../library/json.rst:154../../library/json.rst:433
141147
msgid""
142148
"If *ensure_ascii* is true (the default), the output is guaranteed to have "
143149
"all incoming non-ASCII characters escaped. If *ensure_ascii* is false, "
144150
"these characters will be output as-is."
145151
msgstr""
152+
"如果 *ensure_ascii* 被設為 true(預設值),則輸出時將確保所有輸入的非 ASCII 字元都會被轉義。若 *ensure_ascii* 為 false,則這些字元將照原樣輸出。"
153+
146154

147155
#:../../library/json.rst:158
148156
msgid""
@@ -152,7 +160,7 @@ msgid ""
152160
msgstr""
153161
"如果 *check_circular* 設為 false(預設是 ``True``),則針對不同容器型別的循環"
154162
"參照 (circular reference) 的檢查將會被跳過,若有循環參照則最後將引發 :exc:"
155-
"`RecursionError` (或者更糟的錯誤)。"
163+
"`RecursionError` (或其他更糟的錯誤)。"
156164

157165
#:../../library/json.rst:162
158166
msgid""
@@ -183,7 +191,7 @@ msgstr ""
183191

184192
#:../../library/json.rst:175../../library/json.rst:459
185193
msgid"Allow strings for *indent* in addition to integers."
186-
msgstr"除了整數之外,還允許使用字串進行*indent*。"
194+
msgstr"除了整數之外,*indent* 還允許使用字串作為輸入。"
187195

188196
#:../../library/json.rst:178../../library/json.rst:462
189197
msgid""
@@ -192,13 +200,13 @@ msgid ""
192200
"': ')`` otherwise. To get the most compact JSON representation, you should "
193201
"specify ``(',', ':')`` to eliminate whitespace."
194202
msgstr""
195-
"如果有指定,*separators* 應該是一個 ``(item_separator, key_separator)`` 元"
203+
"如果有指定本參數,*separators* 應該是一個 ``(item_separator, key_separator)`` 元"
196204
"組。如果 *indent* 為 ``None`` 則預設為 ``(', ', ': ')``,否則預設為 ``(',', "
197-
"': ')``。要獲得最緊湊的 JSON 表示形式,你應該指定 ``(',', ':')`` 來消除空格。"
205+
"': ')``。想要獲得最緊湊的 JSON 表示形式,你應該指定 ``(',', ':')`` 來消除空格。"
198206

199207
#:../../library/json.rst:183../../library/json.rst:467
200208
msgid"Use ``(',', ': ')`` as default if *indent* is not ``None``."
201-
msgstr"如果 *indent* 不是 ``None``,則用 ``(',', ': ')`` 當預設值"
209+
msgstr"如果 *indent* 不是 ``None``,則使用 ``(',', ': ')`` 當預設值"
202210

203211
#:../../library/json.rst:186../../library/json.rst:470
204212
msgid""
@@ -207,7 +215,7 @@ msgid ""
207215
"version of the object or raise a :exc:`TypeError`. If not specified, :exc:"
208216
"`TypeError` is raised."
209217
msgstr""
210-
"如果有指定,*default* 應該是一個為無法序列化的物件呼叫的函式。它應該傳回物件"
218+
"如果有指定本參數,*default* 應該是一個為無法序列化的物件呼叫的函式。它應該傳回物件"
211219
"的 JSON 可編碼版本或引發 :exc:`TypeError`。如果未指定,則會引發 :exc:"
212220
"`TypeError`。"
213221

@@ -225,32 +233,33 @@ msgid ""
225233
"it with the *cls* kwarg; otherwise :class:`JSONEncoder` is used."
226234
msgstr""
227235
"若要使用自訂 :class:`JSONEncoder` 子類別(例如覆寫 :meth:`~JSONEncoder."
228-
"default` 方法來序列化其他型別的子類別),請使用 *cls* kwarg 指定它;否則使"
236+
"default` 方法來序列化其他型別的子類別),請使用關鍵字參數 *cls* 指定它;否則使"
229237
"用 :class:`JSONEncoder`。"
230238

231239
#:../../library/json.rst:198../../library/json.rst:277
232240
msgid""
233241
"All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`."
234242
msgstr""
235-
"所有可選參數現在都是\\ :ref:`僅限關鍵字 <keyword-only_parameter>`\\ 了。"
243+
"所有可選參數現在都是\\ :ref:`關鍵字參數 <keyword-only_parameter>`\\ 了。"
236244

237245
#:../../library/json.rst:203
238246
msgid""
239247
"Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol, so "
240248
"trying to serialize multiple objects with repeated calls to :func:`dump` "
241249
"using the same *fp* will result in an invalid JSON file."
242250
msgstr""
243-
"與 :mod:`pickle` 和 :mod:`marshal` 不同,JSON 不是框架協定,因此嘗試使用相同"
244-
"的 *fp* 重複呼叫 :func:`dump` 來序列化多個物件將導致無效的 JSON 檔案。"
251+
"與 :mod:`pickle` 和 :mod:`marshal` 不同,JSON 沒有二進位分框的協定,因此嘗試重複呼叫 :func:`dump` "
252+
"來序列化多個物件到同一個 *fp* 裡將導致無效的 JSON 檔案。"
253+
# SkyLull: 我想這裡的 "framed protocol" 指的是 https://peps.python.org/pep-3154/#framing
245254

246255
#:../../library/json.rst:212
247256
msgid""
248257
"Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion "
249258
"table <py-to-json-table>`. The arguments have the same meaning as in :func:"
250259
"`dump`."
251260
msgstr""
252-
"使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *obj* 序列化為 JSON格式化 :"
253-
"class:`str`。這些引數與 :func:`dump`中的意義相同。"
261+
"使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *obj* 序列化為 JSON格式 :"
262+
"class:`str`。這個參數的作用與 :func:`dump`中的同名參數意義相同。"
254263

255264
#:../../library/json.rst:218
256265
msgid""
@@ -260,9 +269,9 @@ msgid ""
260269
"JSON and then back into a dictionary, the dictionary may not equal the "
261270
"original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys."
262271
msgstr""
263-
"JSON 鍵/值對中的鍵始終為 :class:`str` 型別。當字典轉換為 JSON 時,字典的所有"
264-
"鍵都被強制轉換為字串。因此,如果將字典轉換為 JSON,然後再轉換回字典,則該字典"
265-
"可能不等於原始字典。也就是說,如果 x有非字串鍵,則 ``loads(dumps(x)) != "
272+
"JSON 鍵/值對中的鍵始終為 :class:`str` 型別。當字典被轉換為 JSON 時,字典的所有"
273+
"鍵值資料型別都會被強制轉換為字串。因此,如果將字典先轉換為 JSON 格式然後再轉換回字典,則該字典"
274+
"可能不等於原始字典。也就是說,如果字典 x含有非字串鍵值,則 ``loads(dumps(x)) != "
266275
"x``。"
267276

268277
#:../../library/json.rst:227
@@ -283,9 +292,9 @@ msgid ""
283292
"be used to implement custom decoders (e.g. `JSON-RPC <https://www.jsonrpc."
284293
"org>`_ class hinting)."
285294
msgstr""
286-
"*object_hook*是一個可選函式,將使用任何物件文本解碼的結果(一個 :class:"
287-
"`dict`\\來呼叫它。將使用 *object_hook*的回傳值而不是 :class:`dict`。此功"
288-
"能可用於實作自訂解碼器(例如 `JSON-RPC <https://www.jsonrpc.org>`_ 類別提"
295+
"*object_hook*是一個可選參數,其接受一個函數作為輸入。原始的字串解碼結果(一個 :class:"
296+
"`dict`\\將被傳入這個函數、並使用 *object_hook*的回傳值來取代原先的 :class:`dict` 輸出。此功"
297+
"能可用於實作自訂義解碼器(例如 `JSON-RPC <https://www.jsonrpc.org>`_ 類別提"
289298
"示)。"
290299

291300
#:../../library/json.rst:237
@@ -296,9 +305,9 @@ msgid ""
296305
"`dict`. This feature can be used to implement custom decoders. If "
297306
"*object_hook* is also defined, the *object_pairs_hook* takes priority."
298307
msgstr""
299-
"*object_pairs_hook*是一個可選函式,將使用使用有序對列表解碼的任何物件文本的"
300-
"結果來呼叫該函式。將使用 *object_pairs_hook*的回傳值而不是 :class:`dict`。此"
301-
"功能可用於實作自訂解碼器。如果也定義了 *object_hook*,則 *object_pairs_hook* "
308+
"*object_pairs_hook*是一個可選參數,其接受一個函數作為輸入。原始的有序對列表(ordered list of pairs)解碼"
309+
"結果將被傳入這個函數、並使用 *object_pairs_hook*的回傳值來取代原先的 :class:`dict` 輸出。此"
310+
"功能可用於實作自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* "
302311
"優先。"
303312

304313
#:../../library/json.rst:243../../library/json.rst:348
@@ -312,9 +321,9 @@ msgid ""
312321
"This can be used to use another datatype or parser for JSON floats (e.g. :"
313322
"class:`decimal.Decimal`)."
314323
msgstr""
315-
"如有指定 *parse_float*,將使用要解碼的每個 JSON浮點數字串進行呼叫。預設情況"
316-
"下,這相當於 ``float(num_str)``。這可用於將另一種資料型別或剖析器用於 JSON"
317-
"(例如 :class:`decimal.Decimal`\\ )。"
324+
"如有給定 *parse_float* 的話,每個要被解碼的 JSON浮點數字串都會改用這個參數給定的函數來進行解碼。預設情況"
325+
"的浮點數剖析器等效於 ``float(num_str)``。這個參數可用於將 JSON中的浮點數解碼或剖析為另一種資料型別"
326+
"(例如 :class:`decimal.Decimal`\\ )。"
318327

319328
#:../../library/json.rst:251../../library/json.rst:356
320329
msgid""
@@ -323,8 +332,8 @@ msgid ""
323332
"can be used to use another datatype or parser for JSON integers (e.g. :class:"
324333
"`float`)."
325334
msgstr""
326-
"如有指定 *parse_int*,將使用要解碼的每個 JSON整數字串進行呼叫。預設情況下,"
327-
"這相當於 ``int(num_str)``。這可用於對 JSON整數使用另一種資料型別或剖析器(例"
335+
"如有給定 *parse_int* 的話,每個要被解碼的 JSON整數字串都會改用這個參數給定的函數來進行解碼。預設情況"
336+
"的整數剖析器等效於 ``int(num_str)``。這個參數可用於將 JSON中的整數解碼或剖析為另一種資料型別(例"
328337
"如 :class:`float`\\ )。"
329338

330339
#:../../library/json.rst:256
@@ -333,8 +342,8 @@ msgid ""
333342
"integer string via the interpreter's :ref:`integer string conversion length "
334343
"limitation <int_max_str_digits>` to help avoid denial of service attacks."
335344
msgstr""
336-
":func:`int` 預設的 *parse_int*現在對於整數字串有長度上限,上限是直譯器的\\ :"
337-
"ref:`整數字串轉換長度限制 <int_max_str_digits>`,這能防止阻斷服務攻擊 "
345+
":func:`int` 預設的 *parse_int*現在有限制整數字串的長度上限了,上限限制由直譯器的\\ :"
346+
"ref:`整數字串轉換長度限制 <int_max_str_digits>`\\ 達成,這能防止阻斷服務攻擊 "
338347
"(denial of service attacks)。"
339348

340349
#:../../library/json.rst:262../../library/json.rst:361
@@ -498,6 +507,9 @@ msgid ""
498507
"can be used to implement custom decoders. If *object_hook* is also defined, "
499508
"the *object_pairs_hook* takes priority."
500509
msgstr""
510+
"若給定了 *object_pairs_hook*,則會在每次解碼 JSON 物件後,將結果作為一對有序列表傳入 *object_pairs_hook* 中。"
511+
"*object_pairs_hook* 的回傳值將取代 :class:`dictionary`。這個功能可以用來實作自定義的解碼器。"
512+
"如果還同時定義了 *object_hook*,則本 *object_pairs_hook* 具有優先權。"
501513

502514
#:../../library/json.rst:366
503515
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp