Skip to content

Commit 6190847

Browse files
josixclaude
andcommitted
Fix zh_CN wording and markup in existing faq/library.po entries
Found by the rendered-HTML review of faq/library: - 運行 -> 執行, 聲明 -> 宣告, 設置 -> 設為, 實現 -> 實作, 鏈接 -> 連結, 獲得 -> 取得 - 生成 -> 產生 for random numbers, matching library/random.po (隨機數產生器) - restore the Web Programming wiki link, which used quotes instead of `text <url>`_ and did not render as a link - join the :ref: chapter titles to the surrounding Chinese with \ and 「」; drop a stray space and fix the typo 就可以能 - review-rendered-html: bump a query string when re-screenshotting so the browser does not show a cached page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2AUU3pZYEkfs9BY3mm7bn
1 parent 12ba1f9 commit 6190847

2 files changed

Lines changed: 27 additions & 24 deletions

File tree

‎.claude/skills/review-rendered-html/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ python3 -m http.server 8765 --bind 127.0.0.1 --directory ../cpython/Doc/build/ht
6464
Then use the Playwright MCP tools:
6565

6666
1. `browser_resize` to 1280x1600
67-
2. `browser_navigate` to `http://127.0.0.1:8765/<page>.html#<anchor>`
67+
2. `browser_navigate` to `http://127.0.0.1:8765/<page>.html?v=<n>#<anchor>`;
68+
bump `v` after each rebuild, or the browser shows the cached old page
6869
3. `browser_take_screenshot` with `filename: ".playwright-mcp/<name>.png"`
6970
(the MCP only writes inside the repo; `.playwright-mcp/` is gitignored)
7071
4. Read the PNG and check: links and `:term:` text sit flush with the Chinese

‎faq/library.po‎

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ msgid ""
4242
"relevant standard library module. (Eventually you'll learn what's in the "
4343
"standard library and will be able to skip this step.)"
4444
msgstr ""
45-
"查看\\ :ref:`函式庫參照 <library-index>`\\ 以了解是否有相關的標準函式庫模組。 "
46-
"(當你熟悉標準函式庫中的內容後就可以能跳過這一步。)"
45+
"查看\\ :ref:`函式庫參照 <library-index>`\\ 以了解是否有相關的標準函式庫模組。"
46+
"(當你熟悉標準函式庫中的內容後,就可以跳過這一步。)"
4747

4848
#: ../../faq/library.rst:21
4949
msgid ""
@@ -89,7 +89,7 @@ msgstr "用 C 編寫並動態載入的模組(.dll、.pyd、.so、.sl 等);
8989
msgid ""
9090
"modules written in C and linked with the interpreter; to get a list of "
9191
"these, type::"
92-
msgstr "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入: ::"
92+
msgstr "用 C 編寫並與直譯器連結的模組;要取得這些模組的清單,請輸入: ::"
9393

9494
#: ../../faq/library.rst:42
9595
msgid ""
@@ -239,15 +239,17 @@ msgstr "為什麼我的訊號處理程式不起作用?"
239239
msgid ""
240240
"The most common problem is that the signal handler is declared with the "
241241
"wrong argument list. It is called as ::"
242-
msgstr "最常見的問題是訊號處理程式是用錯誤的引數串列聲明的。它以以下形式來呼叫: ::"
242+
msgstr ""
243+
"最常見的問題是訊號處理程式宣告時使用了錯誤的引數清單。它會以如下形式被呼叫: "
244+
"::"
243245

244246
#: ../../faq/library.rst:123
245247
msgid "handler(signum, frame)"
246248
msgstr "handler(signum, frame)"
247249

248250
#: ../../faq/library.rst:125
249251
msgid "so it should be declared with two parameters::"
250-
msgstr "所以它應該用兩個參數聲明: ::"
252+
msgstr "所以它應該宣告成接受兩個參數: ::"
251253

252254
#: ../../faq/library.rst:127
253255
msgid ""
@@ -400,7 +402,7 @@ msgstr ""
400402

401403
#: ../../faq/library.rst:245
402404
msgid "None of my threads seem to run: why?"
403-
msgstr "我的執行緒似乎都沒有運行:為什麼?"
405+
msgstr "我的執行緒似乎都沒有執行:為什麼?"
404406

405407
#: ../../faq/library.rst:247
406408
msgid ""
@@ -455,7 +457,7 @@ msgstr ""
455457

456458
#: ../../faq/library.rst:269
457459
msgid "A simple fix is to add a tiny sleep to the start of the run function::"
458-
msgstr "一個簡單的修復方式是在運行函式的開頭新增一個小 sleep: ::"
460+
msgstr "一個簡單的修復方式是在執行函式的開頭加入一個短暫的 sleep: ::"
459461

460462
#: ../../faq/library.rst:271
461463
msgid ""
@@ -565,7 +567,7 @@ msgstr ""
565567

566568
#: ../../faq/library.rst:340
567569
msgid "When run, this will produce the following output:"
568-
msgstr "運行時,這將產生以下輸出:"
570+
msgstr "執行時,這將產生以下輸出:"
569571

570572
#: ../../faq/library.rst:342
571573
msgid ""
@@ -783,11 +785,11 @@ msgid ""
783785
"since these must be written with multiple interpreters in mind in order to "
784786
"be usable, so many older extension modules will not be usable."
785787
msgstr ""
786-
"減少 GIL 影響的另一種方法是將 GIL 設置為直譯器各自狀態的鎖 (per-interpreter-"
787-
"state lock),而不是真正的全域鎖。這在 :ref:`Python 3.12 中首次實現 "
788-
"<whatsnew312-pep684>`,並且可於 C API 中使用。預計 Python 3.13 將會提供其 "
789-
"Python 介面。目前主要的限制可能是第三方擴充模組,因為實作時必須考慮到多個直譯"
790-
"器才能使用,因此許多舊的擴充模組將無法使用。"
788+
"減少 GIL 影響的另一種方法,是將 GIL 設為直譯器各自狀態的鎖 "
789+
"(per-interpreter-state lock),而不是真正的全域鎖。這在 :ref:`Python 3.12 中首"
790+
"次實作 <whatsnew312-pep684>`,並且可於 C API 中使用。預計 Python 3.13 將會提"
791+
"供其 Python 介面。目前主要的限制可能是第三方擴充模組,因為實作時必須考慮到多"
792+
"個直譯器才能使用,因此許多舊的擴充模組將無法使用。"
791793

792794
#: ../../faq/library.rst:462
793795
msgid "Input and Output"
@@ -1042,16 +1044,16 @@ msgid ""
10421044
"Reference Manual. Python has many modules that will help you build server-"
10431045
"side and client-side web systems."
10441046
msgstr ""
1045-
"請參閱函式庫參考手冊中標題為 :ref:`internet` 和 :ref:`netdata` 的章節。"
1046-
"Python 有許多模組可以幫助你建構伺服器端和用戶端的 Web 系統。"
1047+
"請參閱函式庫參考手冊中標題為「\\ :ref:`internet`\\ 」和「\\ :ref:`netdata`\\ "
1048+
"」的章節。Python 有許多模組可以幫助你建構伺服器端和用戶端的 Web 系統。"
10471049

10481050
#: ../../faq/library.rst:596
10491051
msgid ""
10501052
"A summary of available frameworks is maintained by Paul Boddie at https://"
10511053
"wiki.python.org/moin/WebProgramming\\ ."
10521054
msgstr ""
1053-
"Paul Boddie 有在 https://wiki.python.org/moin/"
1054-
"WebProgramming\\ 維護可用框架的摘要。"
1055+
"Paul Boddie 在 https://wiki.python.org/moin/WebProgramming 維護了一份可用框架"
1056+
"的摘要。"
10551057

10561058
#: ../../faq/library.rst:601
10571059
msgid "What module should I use to help with generating HTML?"
@@ -1062,8 +1064,8 @@ msgid ""
10621064
"You can find a collection of useful links on the `Web Programming wiki page "
10631065
"<https://wiki.python.org/moin/WebProgramming>`_."
10641066
msgstr ""
1065-
"你可以在 \"網頁程式維基頁面 <https://wiki.python.org/moin/"
1066-
"WebProgramming>\" 上找到一組有用的鏈接。"
1067+
"你可以在\\ `網頁程式維基頁面 <https://wiki.python.org/moin/WebProgramming>`_"
1068+
"\\ 上找到一系列實用的連結。"
10671069

10681070
#: ../../faq/library.rst:610
10691071
msgid "How do I send mail from a Python script?"
@@ -1247,13 +1249,13 @@ msgstr "數學和數值"
12471249

12481250
#: ../../faq/library.rst:713
12491251
msgid "How do I generate random numbers in Python?"
1250-
msgstr "如何在 Python 中生成隨機數?"
1252+
msgstr "如何在 Python 中產生隨機數?"
12511253

12521254
#: ../../faq/library.rst:715
12531255
msgid ""
12541256
"The standard module :mod:`random` implements a random number generator. "
12551257
"Usage is simple::"
1256-
msgstr "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單: ::"
1258+
msgstr "標準模組 :mod:`random` 實作了一個隨機數產生器。用法很簡單: ::"
12571259

12581260
#: ../../faq/library.rst:718
12591261
msgid ""
@@ -1270,7 +1272,7 @@ msgstr "這將回傳 [0, 1) 範圍內的隨機浮點數。"
12701272
#: ../../faq/library.rst:723
12711273
msgid ""
12721274
"There are also many other specialized generators in this module, such as:"
1273-
msgstr "該模組中還有許多其他專用生成器,例如:"
1275+
msgstr "該模組中還有許多其他專用的產生器,例如:"
12741276

12751277
#: ../../faq/library.rst:725
12761278
msgid "``randrange(a, b)`` chooses an integer in the range [a, b)."
@@ -1302,4 +1304,4 @@ msgid ""
13021304
"There's also a ``Random`` class you can instantiate to create independent "
13031305
"multiple random number generators."
13041306
msgstr ""
1305-
"還有一個 ``Random`` 類別,你可以將它實例化以建立多個獨立的隨機數生成器。"
1307+
"還有一個 ``Random`` 類別,你可以將它實例化以建立多個獨立的隨機數產生器。"

0 commit comments

Comments
 (0)