Skip to content

fix: refine howto/logging.po wording - #1251

Merged
josix merged 2 commits into
python:3.15from
josix:claude/logging-review-followup
Oct 26, 2026
Merged

josix merged 2 commits into
python:3.15from
josix:claude/logging-review-followup

Conversation

@josix

@josix josix commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

背景

我分 12 輪審查了 #1195 目前的譯文,每輪看一個面向:術語、標點、reST、簡中用語、逐句比對原文、跨檔一致性等。每一輪都用 retrieval 查詢專案裡的既有譯法,再決定要不要改。大部分項目判斷不用改;以下 7 個條目、9 處用詞需要修改。

修改內容

位置 原文 修改 依據
L61 標題 When to use logging 「什麼時候使用 logging」→「何時使用日誌記錄」 和其他標題(「基礎日誌記錄教學」「日誌記錄流程」)一致;howto/sockets.po 的標題也用「何時…」
L78 see the table below 「請參見」→「請參閱」 本檔的交叉參照有 8 處用「請參閱」
L625 Python discussion forum 「Python 討論論壇」→「Python 討論區」 「討論論壇」語意重複;bugs.po 把 Discourse forum 譯為「討論區」
L689 Logging is performed by calling methods on… 句首「記錄是透過…」→「日誌記錄是透過…」 單獨寫「記錄」主詞不明
L757 the console (sys.stderr) 控制台(``sys.stderr``)→控制台 (``sys.stderr``) README 規定括號內只有英文就用半形括號;library/code.po 也這樣寫
L849 See the last two paragraphs in this section. 「請參考此節」→「請參閱本節」 同 L78
L1289 takes a default parameter … This may or may not be what you want 「接受一個預設參數」→「有一個參數」;「這可能不是你想要的」→「這不一定符合你的需求」 原寫法容易被讀成「參數名叫預設」,而且後面已經寫了「其預設值為 True」;原文 "may or may not" 是中性語氣

L689、L1289 有連帶重新斷行,但內容只改了上面列出的部分。

檢查過、決定不改的項目

  • logging 元件術語(記錄器/處理器/格式化器/過濾器):library/logging.po 只翻了 32%,本身就混用「格式器」「篩選器」,不足以當基準。全專案以「過濾器」為多數,「格式化器」和 argparse.po 一致。
  • L46「運行時」:專案多用「執行時」(95 處比 19 處),但這是 review 中逐字建議並已採用的寫法,faq/library.po 也這樣用,所以保留。
  • runtime、socket 保留英文:和 warnings.po、socket.po 一致。
  • 術語對照 glossary.po:命名空間、關鍵字引數、屬性、引入路徑、類檔案物件、簽名都一致。

驗證

  • sphinx-lint howto/logging.po:沒有問題
  • msgfmt -c:通過(192 條已翻譯,58 條未翻譯,和修改前相同)
  • make build howto/logging.po:沒有出現和本檔有關的警告;我也掃描了產出的 HTML,沒有露出未解析的 reST 標記
  • 只改 msgstr,沒有任何一行 msgid 被動到
  • 沒有跑 make wrap,因為本機的 gettext 版本會把整份檔案的 msgid 都重新斷行,所以改成手動斷行;修改的行都在 80 欄以內,和 PR 現有的斷行一致

🤖 Generated with Claude Code

https://claude.ai/code/session_014pJTfUKUkCc4HFprcvhxRe

josix and others added 2 commits October 26, 2026 21:53
- Align the "When to use logging" heading with other headings (何時使用日誌記錄)
- Unify cross-references to 請參閱 within the file
- Use 討論區 for the Python discussion forum, matching bugs.po
- Clarify the subject of the Logger paragraph (日誌記錄是透過…)
- Use half-width parentheses around ``sys.stderr`` per README
- Reword the fileConfig ``disable_existing_loggers`` note to match the source's neutral tone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014pJTfUKUkCc4HFprcvhxRe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014pJTfUKUkCc4HFprcvhxRe
@josix

josix commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author
diff-1 diff-2 diff-3 diff-4 diff-5 diff-6 diff-7

@josix
josix marked this pull request as ready for review October 26, 2026 14:17
@josix
josix merged commit c14b87d into python:3.15 Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants