Skip to content

Translate library/calendar.po - #1265

Draft
lilwad-0730 wants to merge 2 commits into
python:3.15from
lilwad-0730:library/calendar
Draft

lilwad-0730 wants to merge 2 commits into
python:3.15from
lilwad-0730:library/calendar

Conversation

@lilwad-0730

Copy link
Copy Markdown
Contributor

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

lilwad-0730 and others added 2 commits November 7, 2026 16:23
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 j21869297-commits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看了一下 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 原文我都有自己核對。)

Comment thread library/calendar.po
"`SUNDAY` is ``6``."
msgstr ""
"建立 :class:`Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:"
"建立 :class:`!Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文是 :class:Calendar``(沒有 !),對應 CI warning `calendar.rst:31`。

Suggested change
"建立 :class:`!Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:"
"建立 :class:`Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:"

Comment thread library/calendar.po
"formatting itself. This is the job of subclasses."
msgstr ""
":class:`Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不"
":class:`!Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

對應 CI warning calendar.rst:34。

Suggested change
":class:`!Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不"
":class:`Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不"

Comment thread library/calendar.po
#: ../../library/calendar.rst:41
msgid ":class:`Calendar` instances have the following methods and attributes:"
msgstr ":class:`Calendar` 實例有以下方法與屬性:"
msgstr ":class:`!Calendar` 實例有以下方法與屬性:"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

對應 CI warning calendar.rst:39。

Suggested change
msgstr ":class:`!Calendar` 實例有以下方法與屬性:"
msgstr ":class:`Calendar` 實例有以下方法與屬性:"

Comment thread library/calendar.po
#: ../../library/calendar.rst:159
msgid ":class:`TextCalendar` instances have the following methods:"
msgstr ":class:`TextCalendar` 實例有以下方法:"
msgstr ":class:`!TextCalendar` 實例有以下方法:"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

對應 CI warning calendar.rst:157。

Suggested change
msgstr ":class:`!TextCalendar` 實例有以下方法:"
msgstr ":class:`TextCalendar` 實例有以下方法:"

Comment thread library/calendar.po
"一個跟日曆無關但方便的函式,它接受一個像 :mod:`time` 模組裡的 :func:`~time."
"gmtime` 函式回傳的元組,並回傳對應的 Unix 時間戳,假設從 1970 開始及 POSIX 編"
"碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。"
"碼。事實上,:func:`time.gmtime` 和 :func:`!timegm` 是彼此相反的。"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文是 :func:timegm``,對應 CI warning calendar.rst:447。

Suggested change
"碼。事實上,:func:`time.gmtime` 和 :func:`!timegm` 是彼此相反的。"
"碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。"

Comment thread library/calendar.po
":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New "
"code should avoid catching :exc:`IndexError`."
msgstr ""
":exc:`!IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文是 :exc:IllegalMonthError``,對應 CI warning calendar.rst:587。

Suggested change
":exc:`!IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避"
":exc:`IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避"

This branch has not been deployed

No deployments
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.

Translate library/calendar.po

2 participants