Repository navigation
Translate library/calendar.po - #1265
lilwad-0730 wants to merge 2 commits into
Conversation
Translate the 13 remaining untranslated entries, covering the Calendar firstweekday property and accessors, the TextCalendar formatting methods, the IllegalMonthError change note, and the CLI color highlighting note. Closes python#1264 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Suppress self-referential links that the English page does not render (Calendar, TextCalendar, timegm, IllegalMonthError) with the ! prefix, and write range dashes as an en dash, since the zh_TW build does not convert -- the way the English build does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
j21869297-commits
left a comment
There was a problem hiding this comment.
我看了一下 CI 失敗的原因:fail-on-warning 擋下了 6 個 i18n.inconsistent_references warning,剛好就是第二個 commit 在既有譯文中加上 ! 的那 6 處:
calendar.rst:31 original: [':class:`Calendar`', ':const:`MONDAY`', ':const:`SUNDAY`']
calendar.rst:34 original: [':class:`Calendar`'], translated: []
calendar.rst:39 original: [':class:`Calendar`'], translated: []
calendar.rst:157 original: [':class:`TextCalendar`'], translated: []
calendar.rst:447 original: [..., ':func:`timegm`']
calendar.rst:587 original: [':exc:`IllegalMonthError`', ...]
! 會讓該 role 不產生交叉參照,所以譯文的參照數量和英文原文對不上。英文原文(CPython main 的 Doc/library/calendar.rst)這幾處都沒有 !,譯文保持和 msgid 相同的 role 就好,這也跟 #1244 的做法一致。我在下面每一處都附了 suggestion,可以直接套用。
-- 改成 – 的部分沒有觸發 warning,新翻譯的 13 個條目我讀起來也都很順,用詞(週一/週日、子類別、語系)和檔案裡既有的譯文一致。
(這則 review 是在 Claude Code 輔助下整理的,CI log 和 CPython 原文我都有自己核對。)
| "`SUNDAY` is ``6``." | ||
| msgstr "" | ||
| "建立 :class:`Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" | ||
| "建立 :class:`!Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" |
There was a problem hiding this comment.
原文是 :class:Calendar``(沒有 !),對應 CI warning `calendar.rst:31`。
| "建立 :class:`!Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" | |
| "建立 :class:`Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" |
| "formatting itself. This is the job of subclasses." | ||
| msgstr "" | ||
| ":class:`Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" | ||
| ":class:`!Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" |
There was a problem hiding this comment.
對應 CI warning calendar.rst:34。
| ":class:`!Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" | |
| ":class:`Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" |
| #: ../../library/calendar.rst:41 | ||
| msgid ":class:`Calendar` instances have the following methods and attributes:" | ||
| msgstr ":class:`Calendar` 實例有以下方法與屬性:" | ||
| msgstr ":class:`!Calendar` 實例有以下方法與屬性:" |
There was a problem hiding this comment.
對應 CI warning calendar.rst:39。
| msgstr ":class:`!Calendar` 實例有以下方法與屬性:" | |
| msgstr ":class:`Calendar` 實例有以下方法與屬性:" |
| #: ../../library/calendar.rst:159 | ||
| msgid ":class:`TextCalendar` instances have the following methods:" | ||
| msgstr ":class:`TextCalendar` 實例有以下方法:" | ||
| msgstr ":class:`!TextCalendar` 實例有以下方法:" |
There was a problem hiding this comment.
對應 CI warning calendar.rst:157。
| msgstr ":class:`!TextCalendar` 實例有以下方法:" | |
| msgstr ":class:`TextCalendar` 實例有以下方法:" |
| "一個跟日曆無關但方便的函式,它接受一個像 :mod:`time` 模組裡的 :func:`~time." | ||
| "gmtime` 函式回傳的元組,並回傳對應的 Unix 時間戳,假設從 1970 開始及 POSIX 編" | ||
| "碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。" | ||
| "碼。事實上,:func:`time.gmtime` 和 :func:`!timegm` 是彼此相反的。" |
There was a problem hiding this comment.
原文是 :func:timegm``,對應 CI warning calendar.rst:447。
| "碼。事實上,:func:`time.gmtime` 和 :func:`!timegm` 是彼此相反的。" | |
| "碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。" |
| ":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New " | ||
| "code should avoid catching :exc:`IndexError`." | ||
| msgstr "" | ||
| ":exc:`!IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" |
There was a problem hiding this comment.
原文是 :exc:IllegalMonthError``,對應 CI warning calendar.rst:587。
| ":exc:`!IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" | |
| ":exc:`IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" |
Translate the 13 remaining untranslated entries, covering the Calendar firstweekday property and accessors, the TextCalendar formatting methods, the IllegalMonthError change note, and the CLI color highlighting note.
Closes #1264