Skip to content

Translate library/calendar part 2/2 #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 55 additions & 21 deletions library/calendar.po
Original file line number Diff line number Diff line change
Expand Up @@ -288,80 +288,93 @@ 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 類別:"
Copy link
Contributor

Choose a reason for hiding this comment

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

這邊的 CSS classes 翻譯成 CSS 樣式 會不會比較貼近一點?

Suggested change
msgstr ":class:`!HTMLCalendar` 可以覆寫以下屬性來客製日曆所使用的 CSS 類別:"
msgstr ":class:`!HTMLCalendar` 可以覆寫以下屬性來客製日曆所使用的 CSS 樣式:"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

它的屬性都是給 CSS class 名稱而不是給實際的樣式
所以覺得這裡維持用類別就可以了~


#: ../../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` 相"
"同。"
Comment on lines +315 to +316
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"在標題列中一週每一天名稱的 CSS 類別的串列。預設內容和 :attr:`cssclasses` 相"
"同。"
"在標題列中的星期名稱的 CSS 樣式的串列。預設內容和 :attr:`cssclasses` 相"
"同。"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

因為我整份文件的 week 都翻譯成 "週",只有這裡用"星期"會有點不一致

Copy link
Contributor

Choose a reason for hiding this comment

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

OK 這裡是我的疏忽,抱歉!


#: ../../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 ""
"Note that although the naming for the above described class attributes is "
"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 ""
Expand All @@ -370,10 +383,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*。因為目前的語系是屬於整個行程 "
"(process-wide) 的設定,它們不是執行緒安全的。"

#: ../../library/calendar.rst:350
msgid "For simple text calendars this module provides the following functions."
msgstr ""
msgstr "這個模組提供以下函式給單純的文字日曆使用。"

#: ../../library/calendar.rst:354
msgid ""
Expand All @@ -382,71 +398,82 @@ 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 ""
"Returns a matrix representing a month's calendar. Each row represents a "
"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 ""
Expand All @@ -456,34 +483,41 @@ 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 ""
"An array that represents the months of the year in the current locale. This "
"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 ""
"An array that represents the abbreviated months of the year in the current "
"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 ""
Expand Down