Skip to content

Commit a051272

Browse files
josixclaude
andcommitted
Polish dataclasses/faq-library translations after reviewing rendered HTML
Fix problems that only show on the built pages: - ``field``\ 可以 rendered as "field可以"; use a normal space - 全域直譯器鎖(GIL) used half-width parens and left a stray space; use \ (GIL) directly followed by the next word - link text after 的 had an extra leading space; join it with \ - 錯誤代碼 -> 錯誤碼 (zh_CN wording) - smoother wording for the *match_args* and *frozen* parameters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2AUU3pZYEkfs9BY3mm7bn
1 parent 1b4d6bf commit a051272

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎faq/library.po‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ msgid ""
617617
"instruction and therefore all the C implementation code reached from each "
618618
"instruction is therefore atomic from the point of view of a Python program."
619619
msgstr ""
620-
"Python 內部使用\\ :term:`全域直譯器鎖 <global interpreter lock>`\\ (GIL) 來確"
621-
"保同一時間只有一個執行緒在 Python VM 中執行。一般來說,Python 只會在位元組碼"
622-
"指令之間切換執行緒;切換的頻率可以透過 :func:`sys.setswitchinterval` 設定。因"
623-
"此,從 Python 程式的角度來看,每一條位元組碼指令,以及每條指令所執行到的所有 "
624-
"C 實作程式碼,都是不可分割的(atomic)。"
620+
"Python 內部使用\\ :term:`全域直譯器鎖 <global interpreter lock>`\\ (GIL)來"
621+
"確保同一時間只有一個執行緒在 Python VM 中執行。一般來說,Python 只會在位元組"
622+
"碼指令之間切換執行緒;切換的頻率可以透過 :func:`sys.setswitchinterval` 設定。"
623+
"因此,從 Python 程式的角度來看,每一條位元組碼指令,以及每條指令所執行到的所"
624+
"有 C 實作程式碼,都是不可分割的(atomic)。"
625625

626626
#: ../../faq/library.rst:372
627627
msgid ""
@@ -706,9 +706,9 @@ msgid ""
706706
"multi-threaded Python program effectively only uses one CPU, due to the "
707707
"insistence that (almost) all Python code can only run while the GIL is held."
708708
msgstr ""
709-
":term:`全域直譯器鎖 <global interpreter lock>`\\ (GIL) 常被視為在高階多處理器"
710-
"伺服器上部署 Python 的阻礙,因為(幾乎)所有 Python 程式碼都只能在持有 GIL 時"
711-
"執行,導致多執行緒的 Python 程式實際上只會使用一顆 CPU。"
709+
":term:`全域直譯器鎖 <global interpreter lock>`\\ (GIL)常被視為在高階多處理"
710+
"器伺服器上部署 Python 的阻礙,因為(幾乎)所有 Python 程式碼都只能在持有 GIL "
711+
"時執行,導致多執行緒的 Python 程式實際上只會使用一顆 CPU。"
712712

713713
#: ../../faq/library.rst:413
714714
msgid ""
@@ -736,7 +736,7 @@ msgid ""
736736
"compensate for the removal of the GIL. The Python 3.9 fork is the first "
737737
"attempt at removing the GIL with an acceptable performance impact."
738738
msgstr ""
739-
"目前移除 GIL 的工作是以 Sam Gross 的 `移除了 GIL 的 Python 3.9 分支 "
739+
"目前移除 GIL 的工作是以 Sam Gross 的\\ `移除了 GIL 的 Python 3.9 分支 "
740740
"<https://github.com/colesbury/nogil>`_\\ 為基礎。在此之前,早在 Python 1.5 時"
741741
"代,Greg Stein 就曾實作一套完整的修補程式(即「自由執行緒」修補程式),移除 "
742742
"GIL 並改以細粒度鎖定取代。Adam Olsen 也在他的 `python-safethread "
@@ -862,9 +862,9 @@ msgid ""
862862
"preserve most (though not all) of it."
863863
msgstr ""
864864
":mod:`shutil` 模組包含 :func:`~shutil.copyfile` 函式。請注意,它不會複製 "
865-
"Windows NTFS 磁碟區上的 `替代資料串流 "
865+
"Windows NTFS 磁碟區上的\\ `替代資料串流 "
866866
"<https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)>`_,也不會複"
867-
"製 macOS HFS+ 磁碟區上的 `資源分支 "
867+
"製 macOS HFS+ 磁碟區上的\\ `資源分支 "
868868
"<https://en.wikipedia.org/wiki/Resource_fork>`__,不過這兩者現在都很少使用。"
869869
"它也不會複製檔案權限和詮釋資料,但改用 :func:`shutil.copy2` 可以保留其中大部"
870870
"分(但不是全部)。"
@@ -1166,7 +1166,7 @@ msgid ""
11661166
msgstr ""
11671167
"為了避免 TCP 連線阻塞,你可以將 socket 設為非阻塞模式。這樣當你呼叫 "
11681168
":meth:`~socket.socket.connect` 時,要不是立即連線成功(不太可能),就是會得到"
1169-
"一個例外,其中的錯誤代碼存放在 ``.errno``。``errno.EINPROGRESS`` 表示連線正在"
1169+
"一個例外,其中的錯誤碼存放在 ``.errno``。``errno.EINPROGRESS`` 表示連線正在"
11701170
"進行中,但尚未完成。不同的作業系統會回傳不同的值,所以你必須檢查你的系統會回"
11711171
"傳什麼。"
11721172

‎library/dataclasses.po‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ msgid ""
342342
"generate an exception. This emulates read-only frozen instances. See the :"
343343
"ref:`discussion <dataclasses-frozen>` below."
344344
msgstr ""
345-
"*frozen*:如果為真(預設為 ``False``),對欄位賦值將會產生例外。這模擬了唯讀"
346-
"的凍結實例。請參閱下方的\\ :ref:`討論 <dataclasses-frozen>`。"
345+
"*frozen*:如果為真(預設為 ``False``),對欄位賦值會引發例外。這模擬了唯讀的"
346+
"凍結實例。請參閱下方的\\ :ref:`討論 <dataclasses-frozen>`。"
347347

348348
#: ../../library/dataclasses.rst:180
349349
msgid ""
@@ -362,8 +362,8 @@ msgid ""
362362
"__match_args__` is already defined in the class, then :attr:`!"
363363
"__match_args__` will not be generated."
364364
msgstr ""
365-
"*match_args*:如果為真(預設為 ``True``),將會以傳給所產生的 "
366-
":meth:`~object.__init__` 方法中、非僅限關鍵字參數的串列,建立 "
365+
"*match_args*:如果為真(預設為 ``True``),會根據所產生的 "
366+
":meth:`~object.__init__` 方法中非僅限關鍵字參數的串列,建立 "
367367
":attr:`~object.__match_args__` tuple(即使沒有產生 :meth:`!__init__` 也一樣,"
368368
"見上文)。如果為假,或是類別中已經定義了 :attr:`!__match_args__`,則不會產生 "
369369
":attr:`!__match_args__`。"
@@ -436,7 +436,7 @@ msgstr ""
436436
msgid ""
437437
"``field``\\s may optionally specify a default value, using normal Python "
438438
"syntax::"
439-
msgstr "``field``\\ 可以選擇性地使用一般的 Python 語法來指定預設值: ::"
439+
msgstr "``field`` 可以選擇性地使用一般的 Python 語法來指定預設值: ::"
440440

441441
#: ../../library/dataclasses.rst:239
442442
msgid ""

0 commit comments

Comments
 (0)