Skip to content

Commit 558305c

Browse files
committed
docs(library/json.po): part of review 2 fixes
1 parent 3658dc6 commit 558305c

File tree

1 file changed

+45
-46
lines changed

1 file changed

+45
-46
lines changed

library/json.po

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ msgid ""
298298
"be used to implement custom decoders (e.g. `JSON-RPC <https://www.jsonrpc."
299299
"org>`_ class hinting)."
300300
msgstr ""
301-
"*object_hook* 是一個可選參數,其接受一個函數作為輸入。原始的字串解碼結果(一"
302-
"個 :class:`dict`\\將被傳入這個函數、並使用 *object_hook* 的回傳值來取代原"
303-
"先的 :class:`dict` 輸出。此功能可用於實作自訂義解碼器(例如 `JSON-RPC "
304-
"<https://www.jsonrpc.org>`_ 類別提示)。"
301+
"*object_hook* 是一個可選引數,其接受一個函式作為輸入。原始的字串解碼結果(一"
302+
"個 :class:`dict`\\將被傳入這個函式、並使用 *object_hook* 的回傳值來取代原"
303+
"先的 :class:`dict` 輸出。此功能可用於實作自訂解碼器(例如 `JSON-RPC <https://"
304+
"www.jsonrpc.org>`_ 類別提示)。"
305305

306306
#: ../../library/json.rst:237
307307
msgid ""
@@ -311,10 +311,10 @@ msgid ""
311311
"`dict`. This feature can be used to implement custom decoders. If "
312312
"*object_hook* is also defined, the *object_pairs_hook* takes priority."
313313
msgstr ""
314-
"*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對串列"
315-
"(ordered list of pairs)解碼結果將被傳入這個函數、並使用 "
314+
"*object_pairs_hook* 是一個可選引數,其接受一個函式作為輸入。原始的有序對串列"
315+
"(ordered list of pairs)解碼結果將被傳入這個函式、並使用 "
316316
"*object_pairs_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此功能可用於實作"
317-
"自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
317+
"自訂解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
318318

319319
#: ../../library/json.rst:243 ../../library/json.rst:348
320320
msgid "Added support for *object_pairs_hook*."
@@ -328,7 +328,7 @@ msgid ""
328328
"class:`decimal.Decimal`)."
329329
msgstr ""
330330
"如有給定 *parse_float* 的話,每個要被解碼的 JSON 浮點數字串都會改用這個參數給"
331-
"定的函數來進行解碼。預設情況的浮點數剖析器等效於 ``float(num_str)``。這個參數"
331+
"定的函式來進行解碼。預設情況的浮點數剖析器等效於 ``float(num_str)``。這個參數"
332332
"可用於將 JSON 中的浮點數解碼或剖析為另一種資料型別(例如 :class:`decimal."
333333
"Decimal`\\ )。"
334334

@@ -340,7 +340,7 @@ msgid ""
340340
"`float`)."
341341
msgstr ""
342342
"如有給定 *parse_int* 的話,每個要被解碼的 JSON 整數字串都會改用這個參數給定的"
343-
"函數來進行解碼。預設情況的整數剖析器等效於 ``int(num_str)``。這個參數可用於"
343+
"函式來進行解碼。預設情況的整數剖析器等效於 ``int(num_str)``。這個參數可用於"
344344
"將 JSON 中的整數解碼或剖析為另一種資料型別(例如 :class:`float`\\ )。"
345345

346346
#: ../../library/json.rst:256
@@ -349,7 +349,7 @@ msgid ""
349349
"integer string via the interpreter's :ref:`integer string conversion length "
350350
"limitation <int_max_str_digits>` to help avoid denial of service attacks."
351351
msgstr ""
352-
"預設 *parse_int* 使用的 :func:`int` 函數現在有限制整數字串的長度上限了,限制"
352+
"預設 *parse_int* 使用的 :func:`int` 函式現在有限制整數字串的長度上限了,限制"
353353
"由直譯器的\\ :ref:`整數字串轉換長度限制 <int_max_str_digits>`\\ 機制來達成,"
354354
"這能防止阻斷服務攻擊 (Denial of Service attacks)。"
355355

@@ -360,24 +360,23 @@ msgid ""
360360
"raise an exception if invalid JSON numbers are encountered."
361361
msgstr ""
362362
"如有給定 *parse_constant* 的話,在解碼時若遭遇字串 ``'-Infinity'``、"
363-
"``'Infinity'`` 或 ``'NaN'`` 其中之一則會改用這個參數給定的函數來進行解碼。這"
363+
"``'Infinity'`` 或 ``'NaN'`` 其中之一則會改用這個參數給定的函式來進行解碼。這"
364364
"也可用於使解碼過程中遇到無效的 JSON 數字時引發一個例外。"
365365

366366
#: ../../library/json.rst:267
367367
msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore."
368368
msgstr ""
369-
"遭遇 'null'、 'true' 或 'false' 時不再以 *parse_constant* 給定的函數來處理"
370-
"了。"
369+
"遭遇 'null'、'true' 或 'false' 時不再以 *parse_constant* 給定的函式來處理了。"
371370

372371
#: ../../library/json.rst:270
373372
msgid ""
374373
"To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls`` "
375374
"kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments "
376375
"will be passed to the constructor of the class."
377376
msgstr ""
378-
"若想要使用自定義的 :class:`JSONDecoder` 子類別物件,請以 ``cls`` 關鍵字引數指"
377+
"若想要使用自訂的 :class:`JSONDecoder` 子類別物件,請以 ``cls`` 關鍵字引數指"
379378
"定之,否則將使用預設的 :class:`JSONDecoder`。其他未使用到的關鍵字引數將繼續傳"
380-
"入給 JSONDecoder 的建構函數使用。"
379+
"入給 JSONDecoder 的建構函式使用。"
381380

382381
#: ../../library/json.rst:274 ../../library/json.rst:292
383382
#: ../../library/json.rst:371
@@ -393,8 +392,8 @@ msgid ""
393392
"*fp* can now be a :term:`binary file`. The input encoding should be UTF-8, "
394393
"UTF-16 or UTF-32."
395394
msgstr ""
396-
"現在,*fp* 可以是一個\\ :term:`二進位檔案 <binary file>`\\ ,前提是其編碼格式"
397-
"UTF-8、UTF-16 或 UTF-32。"
395+
"現在,*fp* 可以是一個\\ :term:`二進位檔案 <binary file>`,前提是其編碼格式為 "
396+
"UTF-8、UTF-16 或 UTF-32。"
398397

399398
#: ../../library/json.rst:286
400399
msgid ""
@@ -403,8 +402,8 @@ msgid ""
403402
"`conversion table <json-to-py-table>`."
404403
msgstr ""
405404
"使用\\ :ref:`轉換表 <json-to-py-table>`\\ 將 *s* (一個含有 JSON 文件的 :"
406-
"class:`str`\\\\ :class:`bytes` 或 :class:`bytearray` 的實例(instance))"
407-
"去序列化(deserialize)為一個 Python 物件"
405+
"class:`str`:class:`bytes` 或 :class:`bytearray` 的實例(instance))去序列"
406+
"(deserialize)為一個 Python 物件"
408407

409408
#: ../../library/json.rst:290
410409
msgid "The other arguments have the same meaning as in :func:`load`."
@@ -521,10 +520,10 @@ msgid ""
521520
"class:`dict`. This can be used to provide custom deserializations (e.g. to "
522521
"support `JSON-RPC <https://www.jsonrpc.org>`_ class hinting)."
523522
msgstr ""
524-
"*object_hook* 是一個可選參數,其接受一個函數作為輸入。原始的字串解碼結果(一"
525-
"個 :class:`dict`\\將被傳入這個函數、並使用 *object_hook* 的回傳值來取代原"
526-
"先的 dict 輸出。此功能可用於實作自訂義解碼器(例如 `JSON-RPC <https://www."
527-
"jsonrpc.org>`_ 類別提示)。"
523+
"*object_hook* 是一個可選引數,其接受一個函式作為輸入。原始的字串解碼結果(一"
524+
"個 :class:`dict`\\將被傳入這個函式、並使用 *object_hook* 的回傳值來取代原"
525+
"先的 dict 輸出。此功能可用於實作自訂的去序列化功能(例如 `JSON-RPC <https://"
526+
"www.jsonrpc.org>`_ 類別提示)。"
528527

529528
#: ../../library/json.rst:342
530529
msgid ""
@@ -534,10 +533,10 @@ msgid ""
534533
"can be used to implement custom decoders. If *object_hook* is also defined, "
535534
"the *object_pairs_hook* takes priority."
536535
msgstr ""
537-
"*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對串列"
538-
"(ordered list of pairs)解碼結果將被傳入這個函數、並使用 "
536+
"*object_pairs_hook* 是一個可選引數,其接受一個函式作為輸入。原始的有序對串列"
537+
"(ordered list of pairs)解碼結果將被傳入這個函式、並使用 "
539538
"*object_pairs_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此功能可用於實作"
540-
"自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
539+
"自訂解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
541540

542541
#: ../../library/json.rst:366
543542
msgid ""
@@ -548,19 +547,19 @@ msgid ""
548547
msgstr ""
549548
"如果 *strict* 被設為 false(預設值為 ``True``),那麼字串中將允許控制字元。此"
550549
"語境中的控制字元指的是 ASCII 字元編碼在 0~31 範圍內的字元,包括 ``'\\t'``"
551-
"(tab)、``'\\n'``、``'\\r'`` 和 ``'\\0'``。"
550+
"(tab)、``'\\n'``、``'\\r'`` 和 ``'\\0'``。"
552551

553552
#: ../../library/json.rst:374 ../../library/json.rst:475
554553
msgid "All parameters are now :ref:`keyword-only <keyword-only_parameter>`."
555554
msgstr ""
556-
"所有可選參數現在都是\\ :ref:`僅限關鍵字 <keyword-only_parameter>`\\ 參數了。"
555+
"所有參數現在都是\\ :ref:`僅限關鍵字參數 <keyword-only_parameter>`\\ 。"
557556

558557
#: ../../library/json.rst:379
559558
msgid ""
560559
"Return the Python representation of *s* (a :class:`str` instance containing "
561560
"a JSON document)."
562561
msgstr ""
563-
"返回用 Python 型式表達的 *s* (一個含有 JSON 文件的 :class:`str` 實例)。"
562+
"回傳用 Python 型式表達的 *s* (一個含有 JSON 文件的 :class:`str` 實例)。"
564563

565564
#: ../../library/json.rst:382
566565
msgid ""
@@ -605,7 +604,7 @@ msgstr "number"
605604

606605
#: ../../library/json.rst:421
607606
msgid "Added support for int- and float-derived Enum classes."
608-
msgstr "增加整數(int)和浮點數(float)格式的列舉序數(Enums)的支援性。"
607+
msgstr "增加整數(int)和浮點數(float)格式的列舉序數(Enums)類別的支援性。"
609608

610609
#: ../../library/json.rst:424
611610
msgid ""
@@ -616,16 +615,16 @@ msgid ""
616615
msgstr ""
617616
"若要擴充此功能來識別其他物件,請繼承並實作一個 :meth:`~JSONEncoder.default` "
618617
"方法。此方法應回傳一個可序列化的 ``o`` 物件,否則此方法應呼叫父類別的 "
619-
"JSONEncoder.default 方法(以拋出 :exc:`TypeError` 例外)。"
618+
"JSONEncoder.default 方法(以引發 :exc:`TypeError` 例外)。"
620619

621620
#: ../../library/json.rst:429
622621
msgid ""
623622
"If *skipkeys* is false (the default), a :exc:`TypeError` will be raised when "
624623
"trying to encode keys that are not :class:`str`, :class:`int`, :class:"
625624
"`float` or ``None``. If *skipkeys* is true, such items are simply skipped."
626625
msgstr ""
627-
"若 *skipkeys* 為 false(預設值),則當在編碼不是 :class:`str`:class:"
628-
"`int`:class:`float` 或 ``None`` 的鍵值時,將引發 :exc:`TypeError`。如果 "
626+
"若 *skipkeys* 為 false(預設值),則當在編碼不是 :class:`str`:class:"
627+
"`int`:class:`float` 或 ``None`` 的鍵值時,將引發 :exc:`TypeError`。如果 "
629628
"*skipkeys* 為 true,這些項目將直接被跳過。"
630629

631630
#: ../../library/json.rst:437
@@ -636,7 +635,7 @@ msgid ""
636635
"Otherwise, no such check takes place."
637636
msgstr ""
638637
"如果 *check_circular* 為 true(預設值),則會在編碼期間檢查串列(list)、字典"
639-
"(dict)和自定義編碼物件的循環參照,以防止無限遞迴(一個會導致 :exc:"
638+
"(dict)和自訂編碼物件的循環參照,以防止無限遞迴(一個會導致 :exc:"
640639
"`RecursionError` 例外的問題)。否則不會進行此類檢查。"
641640

642641
#: ../../library/json.rst:442
@@ -695,8 +694,8 @@ msgid ""
695694
"Encode the given object, *o*, and yield each string representation as "
696695
"available. For example::"
697696
msgstr ""
698-
"將物件 *o* 編碼,並將結果統整為一個能依序產生(yield)各結果字串的生成器物件"
699-
"(generator)。如下例: ::"
697+
"將物件 *o* 編碼,並將結果統整為一個能依序產生(yield)各結果字串的物件。如下"
698+
": ::"
700699

701700
#: ../../library/json.rst:518
702701
msgid "Exceptions"
@@ -720,15 +719,15 @@ msgstr "*doc* 剖析失敗處的起始點的索引值。"
720719

721720
#: ../../library/json.rst:538
722721
msgid "The line corresponding to *pos*."
723-
msgstr "*pos* 所在的行數。"
722+
msgstr "*pos* 所在的列(line)數。"
724723

725724
#: ../../library/json.rst:542
726725
msgid "The column corresponding to *pos*."
727-
msgstr "*pos* 所在的列(column)數。"
726+
msgstr "*pos* 所在的行(column)數。"
728727

729728
#: ../../library/json.rst:548
730729
msgid "Standard Compliance and Interoperability"
731-
msgstr "合規性與互通性"
730+
msgstr "合規性與互通性(Interoperability)"
732731

733732
#: ../../library/json.rst:550
734733
msgid ""
@@ -810,10 +809,10 @@ msgid ""
810809
"in their input. This module's deserializer raises a :exc:`ValueError` when "
811810
"an initial BOM is present."
812811
msgstr ""
813-
"RFC 禁止在文件的開頭加上端序記號(BOM),因此本模組的序列化器(serializer)也"
814-
"不會在輸出中加入端序記號。RFC 允許但不強制 JSON 去序列化器(deserializer)忽"
815-
"略文件初始的端序記號,因此本模組的去序列化器將在遭遇位於文件開頭的端序記號時"
816-
"引發 :exc:`ValueError` 例外。"
812+
"RFC 禁止在文件的開頭加上端序記號(Byte Order Mark),因此本模組的序列化器"
813+
"(serializer)也不會在輸出中加入端序記號。RFC 允許但不強制 JSON 去序列化器"
814+
"(deserializer)忽略文件初始的端序記號,因此本模組的去序列化器將在遭遇位於文"
815+
"件開頭的端序記號時引發 :exc:`ValueError` 例外。"
817816

818817
#: ../../library/json.rst:588
819818
msgid ""
@@ -852,7 +851,7 @@ msgstr ""
852851

853852
#: ../../library/json.rst:619
854853
msgid "Repeated Names Within an Object"
855-
msgstr "物件內重複的鍵值名稱"
854+
msgstr "物件內重複的名稱"
856855

857856
#: ../../library/json.rst:621
858857
msgid ""
@@ -989,7 +988,7 @@ msgid ""
989988
"to :data:`sys.stdout`."
990989
msgstr ""
991990
"將 *infile* 的結果寫入到給定的 *outfile*。若未提供則寫入到 :data:`sys."
992-
"stdout`\\ 。"
991+
"stdout`\\。"
993992

994993
#: ../../library/json.rst:733
995994
msgid "Sort the output of dictionaries alphabetically by key."
@@ -1025,5 +1024,5 @@ msgid ""
10251024
"(as of ECMAScript Edition 5.1) does not."
10261025
msgstr ""
10271026
"如 `RFC 7159 更正 <https://www.rfc-editor.org/errata_search.php?rfc=7159>`_ "
1028-
"所述,JSON 允許字串中出現 U+2028(行分隔符)和 U+2029(段落分隔符)字元,而 "
1027+
"所述,JSON 允許字串中出現 U+2028(列分隔符)和 U+2029(段落分隔符)字元,而 "
10291028
"JavaScript(截至 ECMAScript 5.1 版)則不允許。"

0 commit comments

Comments
 (0)