From 5f04b57043c15fb133e7f0b68b86552ca20dd2b2 Mon Sep 17 00:00:00 2001 From: minghx Date: Thu, 24 Aug 2023 06:18:29 +0000 Subject: [PATCH 1/2] Translate library/calendar part 2/2 --- library/calendar.po | 77 ++++++++++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/library/calendar.po b/library/calendar.po index 55370dc52a..772b019861 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-08-18 15:42+0800\n" +"PO-Revision-Date: 2023-08-23 15:28+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -288,54 +288,62 @@ msgstr "" msgid "" ":class:`!HTMLCalendar` has the following attributes you can override to " "customize the CSS classes used by the calendar:" -msgstr "" +msgstr ":class:`!HTMLCalendar` 可以覆寫以下屬性來客製日曆所使用的 CSS 類別:" #: ../../library/calendar.rst:256 msgid "" "A list of CSS classes used for each weekday. The default class list is::" -msgstr "" +msgstr "一週每一天使用的 CSS 類別的串列。預設的串列內容為: ::" #: ../../library/calendar.rst:260 msgid "more styles can be added for each day::" -msgstr "" +msgstr "可以在每一天增加更多樣式: ::" #: ../../library/calendar.rst:264 msgid "Note that the length of this list must be seven items." -msgstr "" +msgstr "注意這個串列的長度必須是七個項目。" #: ../../library/calendar.rst:269 msgid "The CSS class for a weekday occurring in the previous or coming month." -msgstr "" +msgstr "前一個或下一個月份的一週每一天的 CSS 類別。" #: ../../library/calendar.rst:276 msgid "" "A list of CSS classes used for weekday names in the header row. The default " "is the same as :attr:`cssclasses`." msgstr "" +"在標題列中一週每一天名稱的 CSS 類別的串列。預設內容和 :attr:`cssclasses` 相" +"同。" #: ../../library/calendar.rst:284 msgid "" "The month's head CSS class (used by :meth:`formatmonthname`). The default " "value is ``\"month\"``." msgstr "" +"月份標題的 CSS 類別 (:meth:`formatmonthname` 會用到),預設值是 " +"``\"month\"``。" #: ../../library/calendar.rst:292 msgid "" "The CSS class for the whole month's table (used by :meth:`formatmonth`). The " "default value is ``\"month\"``." msgstr "" +"整個月份表格的 CSS 類別 (:meth:`formatmonth` 會用到),預設值是 " +"``\"month\"``。" #: ../../library/calendar.rst:300 msgid "" "The CSS class for the whole year's table of tables (used by :meth:" "`formatyear`). The default value is ``\"year\"``." msgstr "" +"整年表格的 CSS 類別(:meth:`formatyear` 會用到),預設值是 ``\"year\"``。" #: ../../library/calendar.rst:308 msgid "" "The CSS class for the table head for the whole year (used by :meth:" "`formatyear`). The default value is ``\"year\"``." msgstr "" +"整年表格標題的 CSS 類別(:meth:`formatyear` 會用到),預設值是 ``\"year\"``。" #: ../../library/calendar.rst:314 msgid "" @@ -343,25 +351,29 @@ msgid "" "singular (e.g. ``cssclass_month`` ``cssclass_noday``), one can replace the " "single CSS class with a space separated list of CSS classes, for example::" msgstr "" +"注意雖然上面提到的 CSS 屬性名稱是單數(例如 ``cssclass_month``、" +"``cssclass_noday``),你可以使用多個以空格隔開的 CSS 類別取代單一 CSS 類別," +"例如: ::" #: ../../library/calendar.rst:320 msgid "Here is an example how :class:`!HTMLCalendar` can be customized::" -msgstr "" -"以下是客製化 :class:`!HTMLCalendar` 的範例:\n" -"\n" -"::" +msgstr "以下是客製化 :class:`!HTMLCalendar` 的範例: ::" #: ../../library/calendar.rst:332 msgid "" "This subclass of :class:`TextCalendar` can be passed a locale name in the " "constructor and will return month and weekday names in the specified locale." msgstr "" +":class:`TextCalendar` 的子類別,可以在建構函式傳入語系名稱,它會回傳指定語系" +"的月份及一週每一天的名稱。" #: ../../library/calendar.rst:338 msgid "" "This subclass of :class:`HTMLCalendar` can be passed a locale name in the " "constructor and will return month and weekday names in the specified locale." msgstr "" +":class:`HTMLCalendar` 的子類別,可以在建構函式傳入語系名稱,它會回傳指定語系" +"的月份及一週每一天的名稱。" #: ../../library/calendar.rst:344 msgid "" @@ -370,10 +382,13 @@ msgid "" "*locale*. Because the current locale is a process-wide setting, they are not " "thread-safe." msgstr "" +"這兩個類別的建構函式、:meth:`formatweekday` 及 :meth:`formatmonthname` 方法會" +"把 ``LC_TIME`` 語系暫時改成給定的 *locale*。因為目前的語系是屬於整個行程的設" +"定,它們不是執行緒安全的。" #: ../../library/calendar.rst:350 msgid "For simple text calendars this module provides the following functions." -msgstr "" +msgstr "這個模組提供以下函式給單純的文字日曆使用。" #: ../../library/calendar.rst:354 msgid "" @@ -382,43 +397,48 @@ msgid "" "`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, and :const:`SUNDAY` are " "provided for convenience. For example, to set the first weekday to Sunday::" msgstr "" +"設定一週的第一天(``0`` 是週一、``6`` 是週日)。提供 :const:`MONDAY`、:const:" +"`TUESDAY`、:const:`WEDNESDAY`、:const:`THURSDAY`、:const:`FRIDAY`、:const:" +"`SATURDAY` 及 :const:`SUNDAY` 可以方便設定。例如設定一週的第一天為週日: ::" #: ../../library/calendar.rst:365 msgid "Returns the current setting for the weekday to start each week." -msgstr "" +msgstr "回傳目前設定的一週的第一天。" #: ../../library/calendar.rst:370 msgid "" "Returns :const:`True` if *year* is a leap year, otherwise :const:`False`." -msgstr "" +msgstr "如果 *year* 是閏年回傳 :const:`True`,否則回傳 :const:`False`。" #: ../../library/calendar.rst:375 msgid "" "Returns the number of leap years in the range from *y1* to *y2* (exclusive), " "where *y1* and *y2* are years." -msgstr "" +msgstr "回傳從 *y1* 到 *y2* (不包含)間有幾個閏年,其中 *y1* 和 *y2* 是年份。" #: ../../library/calendar.rst:378 msgid "This function works for ranges spanning a century change." -msgstr "" +msgstr "這個函式也適用在跨越世紀的時間範圍。" #: ../../library/calendar.rst:383 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``--" +"``31``) 是週幾(``0`` 是星期一)。" #: ../../library/calendar.rst:389 msgid "" "Return a header containing abbreviated weekday names. *n* specifies the " "width in characters for one weekday." -msgstr "" +msgstr "回傳包含一週每一天的名稱縮寫的標題。*n* 指定每一天的寬度即字元數。" #: ../../library/calendar.rst:395 msgid "" "Returns weekday of first day of the month and number of days in month, for " "the specified *year* and *month*." -msgstr "" +msgstr "回傳指定 *year* 年 *month* 月該月第一天代表週幾的數字及該月有多少天。" #: ../../library/calendar.rst:401 msgid "" @@ -426,27 +446,33 @@ msgid "" "week; days outside of the month are represented by zeros. Each week begins " "with Monday unless set by :func:`setfirstweekday`." msgstr "" +"回傳代表一個月份日曆的矩陣。每一列為一週;該月以外的日期以 0 表示。除非在 :" +"func:`setfirstweekday` 有設定,每一週以週一開始。" #: ../../library/calendar.rst:408 msgid "Prints a month's calendar as returned by :func:`month`." -msgstr "" +msgstr "印出一個月份的日曆,跟 :func:`month` 回傳的內容一樣。" #: ../../library/calendar.rst:413 msgid "" "Returns a month's calendar in a multi-line string using the :meth:" "`formatmonth` of the :class:`TextCalendar` class." msgstr "" +"以多行字串的形式回傳一個月的日曆,使用 :class:`TextCalendar` 類別的 :meth:" +"`formatmonth`。" #: ../../library/calendar.rst:419 msgid "" "Prints the calendar for an entire year as returned by :func:`calendar`." -msgstr "" +msgstr "印出一整年的日曆,跟 :func:`calendar` 回傳的內容一樣。" #: ../../library/calendar.rst:424 msgid "" "Returns a 3-column calendar for an entire year as a multi-line string using " "the :meth:`formatyear` of the :class:`TextCalendar` class." msgstr "" +"以多行字串回傳三欄形式的一整年日曆,使用 :class:`TextCalendar` 類別的 :meth:" +"`formatyear`。" #: ../../library/calendar.rst:430 msgid "" @@ -456,20 +482,23 @@ msgid "" "encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' " "inverse." msgstr "" +"一個跟日曆無關但方便的函式,它接受一個像 :mod:`time` 模組裡的 :func:`~time." +"gmtime` 函式回傳的元組,並回傳對應的 Unix 時間戳,假設從 1970 開始及 POSIX 編" +"碼。事實上,:func:`time.gmtime` 和 :func:`timegm` 是彼此相反的。" #: ../../library/calendar.rst:437 msgid "The :mod:`calendar` module exports the following data attributes:" -msgstr "" +msgstr ":mod:`calendar` 模組匯出以下資料屬性:" #: ../../library/calendar.rst:441 msgid "An array that represents the days of the week in the current locale." -msgstr "" +msgstr "以目前語系來表示的一週每一天名稱的陣列。" #: ../../library/calendar.rst:446 msgid "" "An array that represents the abbreviated days of the week in the current " "locale." -msgstr "" +msgstr "以目前語系來表示的一週每一天縮寫名稱的陣列。" #: ../../library/calendar.rst:451 msgid "" @@ -477,6 +506,8 @@ msgid "" "follows normal convention of January being month number 1, so it has a " "length of 13 and ``month_name[0]`` is the empty string." msgstr "" +"以目前語系來表示的一年每個月份名稱的陣列。它按照一般慣例以數字 1 代表一月,因" +"此它的長度為 13,而 ``month_name[0]`` 是空字串。" #: ../../library/calendar.rst:458 msgid "" @@ -484,6 +515,8 @@ msgid "" "locale. This follows normal convention of January being month number 1, so " "it has a length of 13 and ``month_abbr[0]`` is the empty string." msgstr "" +"以目前語系來表示的一年每個月份縮寫名稱的陣列。它按照一般慣例以數字 1 代表一" +"月,因此它的長度為 13,而 ``month_abbr[0]`` 是空字串。" #: ../../library/calendar.rst:470 msgid "" From 9e00abf434084b7980c4c91568c6f04ee5bdc95f Mon Sep 17 00:00:00 2001 From: minghx Date: Thu, 31 Aug 2023 02:16:43 +0000 Subject: [PATCH 2/2] Refine translation of library/calendar --- library/calendar.po | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/library/calendar.po b/library/calendar.po index 772b019861..ebb171daf9 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -293,11 +293,11 @@ msgstr ":class:`!HTMLCalendar` 可以覆寫以下屬性來客製日曆所使用 #: ../../library/calendar.rst:256 msgid "" "A list of CSS classes used for each weekday. The default class list is::" -msgstr "一週每一天使用的 CSS 類別的串列。預設的串列內容為: ::" +msgstr "對應一週每一天 CSS 類別的串列。預設的串列內容為: ::" #: ../../library/calendar.rst:260 msgid "more styles can be added for each day::" -msgstr "可以在每一天增加更多樣式: ::" +msgstr "可以針對每一天增加更多樣式: ::" #: ../../library/calendar.rst:264 msgid "Note that the length of this list must be seven items." @@ -305,7 +305,7 @@ msgstr "注意這個串列的長度必須是七個項目。" #: ../../library/calendar.rst:269 msgid "The CSS class for a weekday occurring in the previous or coming month." -msgstr "前一個或下一個月份的一週每一天的 CSS 類別。" +msgstr "跟當月為同一週且屬於前一個或下一個月份的日期使用的 CSS 類別。" #: ../../library/calendar.rst:276 msgid "" @@ -320,7 +320,7 @@ msgid "" "The month's head CSS class (used by :meth:`formatmonthname`). The default " "value is ``\"month\"``." msgstr "" -"月份標題的 CSS 類別 (:meth:`formatmonthname` 會用到),預設值是 " +"月份標題的 CSS 類別(由 :meth:`formatmonthname` 所使用),預設值是 " "``\"month\"``。" #: ../../library/calendar.rst:292 @@ -328,7 +328,7 @@ msgid "" "The CSS class for the whole month's table (used by :meth:`formatmonth`). The " "default value is ``\"month\"``." msgstr "" -"整個月份表格的 CSS 類別 (:meth:`formatmonth` 會用到),預設值是 " +"整個月份表格的 CSS 類別(由 :meth:`formatmonth` 所使用),預設值是 " "``\"month\"``。" #: ../../library/calendar.rst:300 @@ -336,14 +336,15 @@ msgid "" "The CSS class for the whole year's table of tables (used by :meth:" "`formatyear`). The default value is ``\"year\"``." msgstr "" -"整年表格的 CSS 類別(:meth:`formatyear` 會用到),預設值是 ``\"year\"``。" +"整年表格的 CSS 類別(由 :meth:`formatyear` 所使用),預設值是 ``\"year\"``。" #: ../../library/calendar.rst:308 msgid "" "The CSS class for the table head for the whole year (used by :meth:" "`formatyear`). The default value is ``\"year\"``." msgstr "" -"整年表格標題的 CSS 類別(:meth:`formatyear` 會用到),預設值是 ``\"year\"``。" +"整年表格標題的 CSS 類別(由 :meth:`formatyear` 所使用),預設值是 " +"``\"year\"``。" #: ../../library/calendar.rst:314 msgid "" @@ -383,8 +384,8 @@ msgid "" "thread-safe." msgstr "" "這兩個類別的建構函式、:meth:`formatweekday` 及 :meth:`formatmonthname` 方法會" -"把 ``LC_TIME`` 語系暫時改成給定的 *locale*。因為目前的語系是屬於整個行程的設" -"定,它們不是執行緒安全的。" +"把 ``LC_TIME`` 語系暫時改成給定的 *locale*。因為目前的語系是屬於整個行程 " +"(process-wide) 的設定,它們不是執行緒安全的。" #: ../../library/calendar.rst:350 msgid "For simple text calendars this module provides the following functions." @@ -414,7 +415,7 @@ msgstr "如果 *year* 是閏年回傳 :const:`True`,否則回傳 :const:`False msgid "" "Returns the number of leap years in the range from *y1* to *y2* (exclusive), " "where *y1* and *y2* are years." -msgstr "回傳從 *y1* 到 *y2* (不包含)間有幾個閏年,其中 *y1* 和 *y2* 是年份。" +msgstr "回傳從 *y1* 到 *y2*\\ (不包含)間有幾個閏年,其中 *y1* 和 *y2* 是年份。" #: ../../library/calendar.rst:378 msgid "This function works for ranges spanning a century change." @@ -432,7 +433,7 @@ msgstr "" msgid "" "Return a header containing abbreviated weekday names. *n* specifies the " "width in characters for one weekday." -msgstr "回傳包含一週每一天的名稱縮寫的標題。*n* 指定每一天的寬度即字元數。" +msgstr "回傳包含一週每一天的名稱縮寫的標題。*n* 指定每一天的字元寬度。" #: ../../library/calendar.rst:395 msgid "" @@ -446,8 +447,8 @@ msgid "" "week; days outside of the month are represented by zeros. Each week begins " "with Monday unless set by :func:`setfirstweekday`." msgstr "" -"回傳代表一個月份日曆的矩陣。每一列為一週;該月以外的日期以 0 表示。除非在 :" -"func:`setfirstweekday` 有設定,每一週以週一開始。" +"回傳代表一個月份日曆的矩陣。每一列為一週;該月以外的日期以 0 表示。每一週以" +"週一開始,除非有使用 :func:`setfirstweekday` 改變設定。" #: ../../library/calendar.rst:408 msgid "Prints a month's calendar as returned by :func:`month`."