From 909eb1236b7cdea2478dcf01de9476eadcd563e4 Mon Sep 17 00:00:00 2001 From: andywang Date: Sat, 7 Nov 2026 16:23:48 +0800 Subject: [PATCH 1/2] Translate library/calendar.po 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 Co-Authored-By: Claude Opus 5.5 --- library/calendar.po | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/library/calendar.po b/library/calendar.po index de285f97cd3..e6df2ba8f21 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -81,30 +81,32 @@ msgstr ":class:`Calendar` 實例有以下方法與屬性:" #: ../../library/calendar.rst:45 msgid "The first weekday as an integer (0--6)." -msgstr "" +msgstr "以整數 (0--6) 表示的一週的第一天。" #: ../../library/calendar.rst:47 msgid "" "This property can also be set and read using :meth:`~Calendar." "setfirstweekday` and :meth:`~Calendar.getfirstweekday` respectively." msgstr "" +"也可以分別使用 :meth:`~Calendar.setfirstweekday` 和 " +":meth:`~Calendar.getfirstweekday` 來設定和讀取這個屬性。" #: ../../library/calendar.rst:53 msgid "Return an :class:`int` for the current first weekday (0--6)." -msgstr "" +msgstr "回傳目前設定的一週的第一天,為一個 :class:`int` (0--6)。" #: ../../library/calendar.rst:55 msgid "Identical to reading the :attr:`~Calendar.firstweekday` property." -msgstr "" +msgstr "等同於讀取 :attr:`~Calendar.firstweekday` 屬性。" #: ../../library/calendar.rst:59 msgid "" "Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)." -msgstr "" +msgstr "將一週的第一天設定為 *firstweekday*,以 :class:`int` (0--6) 傳入。" #: ../../library/calendar.rst:61 msgid "Identical to setting the :attr:`~Calendar.firstweekday` property." -msgstr "" +msgstr "等同於設定 :attr:`~Calendar.firstweekday` 屬性。" #: ../../library/calendar.rst:65 msgid "" @@ -236,6 +238,8 @@ msgid "" "If *theday* is ``0``, return a string of spaces of the specified width, " "representing an empty day. The *weekday* parameter is unused." msgstr "" +"回傳以給定的 *width* 格式化、代表單一日期的字串。如果 *theday* 為 ``0``,則回" +"傳指定寬度的空白字串,代表沒有日期。*weekday* 參數不會被使用。" #: ../../library/calendar.rst:171 msgid "" @@ -244,6 +248,9 @@ msgid "" "first weekday as specified in the constructor or set by the :meth:" "`setfirstweekday` method." msgstr "" +"以不含換行字元的字串回傳一週。如果給定 *w*,它會指定置中的日期欄的寬度。這會" +"依據在建構函式中指定或者透過 :meth:`setfirstweekday` 方法設定的一週的第一天來" +"輸出。" #: ../../library/calendar.rst:179 msgid "" @@ -251,6 +258,8 @@ msgid "" "specified *width*. The *weekday* parameter is an integer representing the " "day of the week, where ``0`` is Monday and ``6`` is Sunday." msgstr "" +"回傳以指定的 *width* 格式化、代表單一週幾名稱的字串。*weekday* 參數是代表週幾" +"的整數,其中 ``0`` 是週一、``6`` 是週日。" #: ../../library/calendar.rst:186 msgid "" @@ -258,6 +267,8 @@ msgid "" "the given *width* for each column. The names depend on the locale settings " "and are padded to the specified width." msgstr "" +"回傳包含週幾名稱標題列的字串,每一欄都以給定的 *width* 格式化。名稱取決於語系" +"設定,並會填補至指定的寬度。" #: ../../library/calendar.rst:193 msgid "" @@ -278,6 +289,9 @@ msgid "" "*theyear* and *themonth* parameters specify the year and month for the name " "to be formatted respectively." msgstr "" +"回傳在指定的 *width* 內置中、代表月份名稱的字串。如果 *withyear* 為 " +"``True``,輸出會包含年份。*theyear* 和 *themonth* 參數分別指定要格式化之名稱" +"的年份和月份。" #: ../../library/calendar.rst:210 msgid "Print a month's calendar as returned by :meth:`formatmonth`." @@ -673,6 +687,8 @@ msgid "" ":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New " "code should avoid catching :exc:`IndexError`." msgstr "" +":exc:`IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" +"免捕捉 :exc:`IndexError`。" #: ../../library/calendar.rst:557 msgid "The invalid month number." @@ -886,6 +902,8 @@ msgid "" "By default, today's date is highlighted in color and can be :ref:`controlled " "using environment variables `." msgstr "" +"預設情況下,今天的日期會以顏色標示,並且可以\\ :ref:`使用環境變數控制 " +"`。" #: ../../library/calendar.rst:724 msgid "*HTML-mode options:*" From 5dfcd1d6170e0859963e67d2134c9183dd33d100 Mon Sep 17 00:00:00 2001 From: andywang Date: Sat, 7 Nov 2026 17:04:49 +0800 Subject: [PATCH 2/2] fix(library/calendar): match English rendering of links and dashes 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 --- library/calendar.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/library/calendar.po b/library/calendar.po index e6df2ba8f21..f912f46fe51 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -63,7 +63,7 @@ msgid "" "the first day of the week. :const:`MONDAY` is ``0`` (the default), :const:" "`SUNDAY` is ``6``." msgstr "" -"建立 :class:`Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" +"建立 :class:`!Calendar` 物件。*firstweekday* 是一個指定一週第一天的整數,:" "const:`MONDAY` 是 ``0``\\ (預設值),:const:`SUNDAY` 是 ``6``。" #: ../../library/calendar.rst:36 @@ -72,16 +72,16 @@ msgid "" "preparing the calendar data for formatting. This class doesn't do any " "formatting itself. This is the job of subclasses." msgstr "" -":class:`Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" +":class:`!Calendar` 物件提供一些方法來為日曆資料的格式化做準備。這個類別本身不" "做任何格式化,這是子類別的工作。" #: ../../library/calendar.rst:41 msgid ":class:`Calendar` instances have the following methods and attributes:" -msgstr ":class:`Calendar` 實例有以下方法與屬性:" +msgstr ":class:`!Calendar` 實例有以下方法與屬性:" #: ../../library/calendar.rst:45 msgid "The first weekday as an integer (0--6)." -msgstr "以整數 (0--6) 表示的一週的第一天。" +msgstr "以整數 (0–6) 表示的一週的第一天。" #: ../../library/calendar.rst:47 msgid "" @@ -93,7 +93,7 @@ msgstr "" #: ../../library/calendar.rst:53 msgid "Return an :class:`int` for the current first weekday (0--6)." -msgstr "回傳目前設定的一週的第一天,為一個 :class:`int` (0--6)。" +msgstr "回傳目前設定的一週的第一天,為一個 :class:`int` (0–6)。" #: ../../library/calendar.rst:55 msgid "Identical to reading the :attr:`~Calendar.firstweekday` property." @@ -102,7 +102,7 @@ msgstr "等同於讀取 :attr:`~Calendar.firstweekday` 屬性。" #: ../../library/calendar.rst:59 msgid "" "Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)." -msgstr "將一週的第一天設定為 *firstweekday*,以 :class:`int` (0--6) 傳入。" +msgstr "將一週的第一天設定為 *firstweekday*,以 :class:`int` (0–6) 傳入。" #: ../../library/calendar.rst:61 msgid "Identical to setting the :attr:`~Calendar.firstweekday` property." @@ -124,7 +124,7 @@ msgid "" "month and all days before the start of the month or after the end of the " "month that are required to get a complete week." msgstr "" -"回傳一個在 *year* 年 *month* (1--12) 月的疊代器。這個疊代器會回傳該月的所有日" +"回傳一個在 *year* 年 *month* (1–12) 月的疊代器。這個疊代器會回傳該月的所有日" "期(:class:`datetime.date` 物件)以及在該月之前及之後用來組成完整一週的日期。" #: ../../library/calendar.rst:80 @@ -230,7 +230,7 @@ msgstr "這個類別用來產生純文字的日曆。" #: ../../library/calendar.rst:159 msgid ":class:`TextCalendar` instances have the following methods:" -msgstr ":class:`TextCalendar` 實例有以下方法:" +msgstr ":class:`!TextCalendar` 實例有以下方法:" #: ../../library/calendar.rst:164 msgid "" @@ -544,7 +544,7 @@ msgid "" "Returns the day of the week (``0`` is Monday) for *year* (``1970``--...), " "*month* (``1``--``12``), *day* (``1``--``31``)." msgstr "" -"回傳 *year* 年 (``1970``--...) *month* 月 (``1``--``12``) *day* 日 (``1``--" +"回傳 *year* 年 (``1970``–...) *month* 月 (``1``–``12``) *day* 日 (``1``–" "``31``) 是週幾(``0`` 是星期一)。" #: ../../library/calendar.rst:402 @@ -603,7 +603,7 @@ msgid "" msgstr "" "一個跟日曆無關但方便的函式,它接受一個像 :mod:`time` 模組裡的 :func:`~time." "gmtime` 函式回傳的元組,並回傳對應的 Unix 時間戳,假設從 1970 開始及 POSIX 編" -"碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。" +"碼。事實上,:func:`time.gmtime` 和 :func:`!timegm` 是彼此相反的。" #: ../../library/calendar.rst:450 msgid "The :mod:`!calendar` module exports the following data attributes:" @@ -687,7 +687,7 @@ msgid "" ":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New " "code should avoid catching :exc:`IndexError`." msgstr "" -":exc:`IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" +":exc:`!IllegalMonthError` 現在也是 :exc:`ValueError` 的子類別。新的程式碼應避" "免捕捉 :exc:`IndexError`。" #: ../../library/calendar.rst:557