8000 first iteration of json.po done. · python/python-docs-zh-tw@9d0513c · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d0513c

Browse files
committed
first iteration of json.po done.
1 parent b097b0f commit 9d0513c

File tree

1 file changed

+58
-28
lines changed

1 file changed

+58
-28
lines changed

library/json.po

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ msgstr ""
256256
"重複呼叫 :func:`dump` 來串列化多個物件到同一個 *fp* 裡將導致無效的 JSON 檔"
257257
"案。"
258258

259-
# SkyLull: 我想這裡的 "framed protocol" 指的是 https://peps.python.org/pep-3154/#framing
259+
# SkyLull: 我想這裡的 "framed protocol" 指的是
260+
# https://peps.python.org/pep-3154/#framing
260261
#: ../../library/json.rst:212
261262
msgid ""
262263
"Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion "
@@ -474,7 +475,7 @@ msgstr "int"
474475

475476
#: ../../library/json.rst:325
476477
msgid "number (real)"
477-
msgstr ""
478+
msgstr "number (實數)"
478479

479480
#: ../../library/json.rst:325
480481
msgid "float"
@@ -779,17 +780,17 @@ msgid ""
779780
"UTF-32, with UTF-8 being the recommended default for maximum "
780781
"interoperability."
781782
msgstr ""
782-
"RFC 要求 JSON 必須以 UTF-8、UTF-16 或 UTF-32 格式編碼。並推薦以 UTF-8 "
783-
"碼以達成最佳的互通性。"
783+
"RFC 要求 JSON 必須以 UTF-8、UTF-16 或 UTF-32 格式編碼。並推薦以 UTF-8 編碼以"
784+
"達成最佳的互通性。"
784785

785786
#: ../../library/json.rst:573
786787
msgid ""
787788
"As permitted, though not required, by the RFC, this module's serializer sets "
788789
"*ensure_ascii=True* by default, thus escaping the output so that the "
789790
"resulting strings only contain ASCII characters."
790791
msgstr ""
791-
"RFC 准許但並不強制編碼器的 *ensure_ascii=True* 行為是預設值,但本模組依然實作了此"
792-
"一選項作為預設,因此本模組預設會轉義所有非 ASCII 字元。"
792+
"RFC 准許但並不強制編碼器的 *ensure_ascii=True* 行為是預設值,但本模組依然實作"
793+
"了此一選項作為預設,因此本模組預設會轉義所有非 ASCII 字元。"
793794

794795
#: ../../library/json.rst:577
795796
msgid ""
@@ -811,8 +812,8 @@ msgid ""
811812
msgstr ""
812813
"RFC 禁止在文件的開頭加上端序記號(BOM),因此本模組的串列化器(serializer)也"
813814
"不會在輸出中加入端序記號。RFC 允許但不強制 JSON 去串列化器(deserializer)忽"
814-
"略文件初始的端序記號,因此本模組的去串列化器將在遭遇位於文件開頭的端序記號時引發 :exc:"
815-
"`ValueError` 例外。"
815+
"略文件初始的端序記號,因此本模組的去串列化器將在遭遇位於文件開頭的端序記號時"
816+
"引發 :exc:`ValueError` 例外。"
816817

817818
#: ../../library/json.rst:588
818819
msgid ""
@@ -822,9 +823,10 @@ msgid ""
822823
"By default, this module accepts and outputs (when present in the original :"
823824
"class:`str`) code points for such sequences."
824825
msgstr ""
825-
"RFC 並未明確禁止 JSON 文件包含無法對應有效 Unicode 字元的位元組序列(例如未配對的 UTF-16 代理對(surrogate "
826-
"pairs)),但這個特性的確可能會引起相容性問題。預設情況下,當原始輸入的 :class:`str` "
827-
"中存在此類序列時,該模組將接受並輸出這些序列的編碼位置(code points)。"
826+
"RFC 並未明確禁止 JSON 文件包含無法對應有效 Unicode 字元的位元組序列(例如未配"
827+
"對的 UTF-16 代理對(surrogate pairs)),但這個特性的確可能會引起相容性問題。"
828+
"預設情況下,當原始輸入的 :class:`str` 中存在此類序列時,該模組將接受並輸出這"
829+
"些序列的編碼位置(code points)。"
828830

829831
#: ../../library/json.rst:596
830832
msgid "Infinite and NaN Number Values"
@@ -836,17 +838,21 @@ msgid ""
836838
"Despite that, by default, this module accepts and outputs ``Infinity``, ``-"
837839
"Infinity``, and ``NaN`` as if they were valid JSON number literal values::"
838840
msgstr ""
841+
"RFC 不允許表現無限大或非數值(NaN)。但預設情況下,這個模組仍接受並輸出 "
842+
"``Infinity``、``-Infinity`` 和 ``NaN``,如同它們是有效的 JSON 數值字面值: ::"
839843

840844
#: ../../library/json.rst:613
841845
msgid ""
842846
"In the serializer, the *allow_nan* parameter can be used to alter this "
843847
"behavior. In the deserializer, the *parse_constant* parameter can be used "
844848
"to alter this behavior."
845849
msgstr ""
850+
"在串列化器中,*allow_nan* 參數可以改變這個行為。在去串列化器中,"
851+
"*parse_constant* 參數可以改變這個行為。"
846852

847853
#: ../../library/json.rst:619
848854
msgid "Repeated Names Within an Object"
849-
msgstr ""
855+
msgstr "物件內重複的鍵值名稱"
850856

851857
#: ../../library/json.rst:621
852858
msgid ""
@@ -855,14 +861,17 @@ msgid ""
855861
"default, this module does not raise an exception; instead, it ignores all "
856862
"but the last name-value pair for a given name::"
857863
msgstr ""
864+
"RFC 規範僅表明 JSON 物件中的名字應該是唯一的,但沒有強制要求如何處理重複的名"
865+
"字。預設情況下,這個模組不會引發例外;相反的,它會忽略該名字的所有重複鍵值"
866+
"對,只保留最後一個: ::"
858867

859868
#: ../../library/json.rst:630
860869
msgid "The *object_pairs_hook* parameter can be used to alter this behavior."
861-
msgstr "*object_parts_hook* 參數可以被使用來改變此行為。"
870+
msgstr "*object_parts_hook* 參數可以改變這個行為。"
862871

863872
#: ../../library/json.rst:634
864873
msgid "Top-level Non-Object, Non-Array Values"
865-
msgstr ""
874+
msgstr "位於頂層的非物件及非列表值"
866875

867876
#: ../../library/json.rst:636
868877
msgid ""
@@ -873,42 +882,48 @@ msgid ""
873882
"this module does not and has never implemented that restriction in either "
874883
"its serializer or its deserializer."
875884
msgstr ""
885+
"由已廢棄的 :rfc:`4627` 規範的舊版 JSON 要求 JSON 文字的頂層值必須是 JSON 物件"
886+
"或陣列(Python :class:`dict` 或 :class:`list`),而且不能是 JSON 的 null、"
887+
"boolean、數字或字串值。 :rfc:`7159` 移除了這個限制,而此模組在其串列化器或去"
888+
"串列化器中也未曾實施過該限制。"
876889

877890
#: ../../library/json.rst:643
878891
msgid ""
879892
"Regardless, for maximum interoperability, you may wish to voluntarily adhere "
880893
"to the restriction yourself."
881-
msgstr ""
894+
msgstr "如果想要最大限度地保留互通性,你可能還是會想要自行施加這個限制。"
882895

883896
#: ../../library/json.rst:648
884897
msgid "Implementation Limitations"
885-
msgstr ""
898+
msgstr "實作限制"
886899

887900
#: ../../library/json.rst:650
888901
msgid "Some JSON deserializer implementations may set limits on:"
889-
msgstr ""
902+
msgstr "某些 JSON 去串列化器的實作可能會造成下列限制:"
890903

891904
#: ../../library/json.rst:652
892905
msgid "the size of accepted JSON texts"
893-
msgstr ""
906+
msgstr "JSON 文件長度上限"
894907

895908
#: ../../library/json.rst:653
896909
msgid "the maximum level of nesting of JSON objects and arrays"
897-
msgstr ""
910+
msgstr "JSON 物件或陣列的最大巢狀層數(level of nesting)限制"
898911

899912
#: ../../library/json.rst:654
900913
msgid "the range and precision of JSON numbers"
901-
msgstr ""
914+
msgstr "數字的精準度或範圍"
902915

903916
#: ../../library/json.rst:655
904917
msgid "the content and maximum length of JSON strings"
905-
msgstr ""
918+
msgstr "JSON 字串長度上限"
906919

907920
#: ../../library/json.rst:657
908921
msgid ""
909922
"This module does not impose any such limits beyond those of the relevant "
910923
"Python datatypes themselves or the Python interpreter itself."
911924
msgstr ""
925+
"這個模組本身不會設定任何此類限制,除了 Python 資料型態本身或 Python 直譯器本"
926+
"身的限制。"
912927

913928
#: ../../library/json.rst:660
914929
msgid ""
@@ -920,6 +935,10 @@ msgid ""
920935
"magnitude, or when serializing instances of \"exotic\" numerical types such "
921936
"as :class:`decimal.Decimal`."
922937
msgstr ""
938+
"串列化為 JSON 時,要注意可能會使用該 JSON 的應用程式中的相關限制。特別要注意"
939+
"的是,JSON 數字常會被去串列化為 IEEE 754 雙精度浮點數(double),並因而受到其"
940+
"表示範圍和精度限制的影響。這在序列化極大的 Python :class:`int` 數值、或是序列"
941+
"化特殊數字型別(例如 :class:`decimal.Decimal`)實例時尤其重要。"
923942

924943
#: ../../library/json.rst:673
925944
msgid "Command Line Interface"
@@ -934,58 +953,65 @@ msgid ""
934953
"The :mod:`json.tool` module provides a simple command line interface to "
935954
"validate and pretty-print JSON objects."
936955
msgstr ""
956+
":mod:`json.tool` 模組提供了一個簡易的命令列界面以供校驗與美化呈現 JSON 物件。"
937957

938958
#: ../../library/json.rst:685
939959
msgid ""
940960
"If the optional ``infile`` and ``outfile`` arguments are not specified, :"
941961
"data:`sys.stdin` and :data:`sys.stdout` will be used respectively:"
942962
msgstr ""
963+
"如果沒有指定可選參數 ``infile`` 和 ``outfile`` ,則 :data:`sys.stdin` 和 :"
964+
"data:`sys.stdout` 各自為預設值。"
943965

944966
#: ../../library/json.rst:697
945967
msgid ""
946968
"The output is now in the same order as the input. Use the :option:`--sort-"
947969
"keys` option to sort the output of dictionaries alphabetically by key."
948970
msgstr ""
971+
"現在開始輸出和輸入的資料順序會是相同的。傳入 :option:`--sort-keys` 參數以按照"
972+
"鍵值的字母順序對輸出進行排序。"
949973

950974
#: ../../library/json.rst:704
951975
msgid "Command line options"
952976
msgstr "命令列選項"
953977

954978
#: ../../library/json.rst:708
955979
msgid "The JSON file to be validated or pretty-printed:"
956-
msgstr ""
980+
msgstr "被用於校驗或美化呈現的 JSON 文件:"
957981

958982
#: ../../library/json.rst:724
959983
msgid "If *infile* is not specified, read from :data:`sys.stdin`."
960-
msgstr ""
984+
msgstr "如果沒有指定 *infile* 則會從 :data:`sys.stdin` 讀取輸入。"
961985

962986
#: ../../library/json.rst:728
963987
msgid ""
964988
"Write the output of the *infile* to the given *outfile*. Otherwise, write it "
965989
"to :data:`sys.stdout`."
966990
msgstr ""
991+
"將 *infile* 的結果寫入到給定的 *outfile*。若未提供則寫入到:data:`sys."
992+
"stdout`。"
967993

968994
#: ../../library/json.rst:733
969995
msgid "Sort the output of dictionaries alphabetically by key."
970-
msgstr ""
996+
msgstr "按照鍵值的字母順序對輸出字典進行排序。"
971997

972998
#: ../../library/json.rst:739
973999
msgid ""
9741000
"Disable escaping of non-ascii characters, see :func:`json.dumps` for more "
9751001
"information."
976-
msgstr ""
1002+
msgstr "關閉非 ASCII 字元的自動轉義功能。詳情請參照 :func:`json.dumps`。"
9771003

9781004
#: ../../library/json.rst:745
9791005
msgid "Parse every input line as separate JSON object."
980-
msgstr ""
1006+
msgstr "將每一行輸入都單獨輸出為一個 JSON 物件。"
9811007

9821008
#: ../../library/json.rst:751
9831009
msgid "Mutually exclusive options for whitespace control."
984-
msgstr ""
1010+
msgstr "互斥的空白字元控制選項。"
9851011

9861012
#: ../../library/json.rst:757
9871013
msgid "Show the help message."
988-
msgstr ""
1014+
msgstr "顯示說明訊息。"
9891015

9901016
#: ../../library/json.rst:761
9911017
msgid "Footnotes"
@@ -998,3 +1024,7 @@ msgid ""
9981024
"and U+2029 (PARAGRAPH SEPARATOR) characters in strings, whereas JavaScript "
9991025
"(as of ECMAScript Edition 5.1) does not."
10001026
msgstr ""
1027+
"如 `RFC 7159 更正 <https://www.rfc-editor.org/errata_search.php?rfc=7159>`_ "
1028+
"所述,JSON 允許字串中出現 U+2028(行分隔符)和 U+2029(段落分隔符)字元,而 "
1029+
"JavaScript(截至 ECMAScript 5.1 版)則不允許。\n"
1030+
"`"

0 commit comments

Comments
 (0)
0