Skip to content

Commit 4f632e1

Browse files
sync with cpython 22d53a91
1 parent 949030f commit 4f632e1

4 files changed

Lines changed: 281 additions & 228 deletions

File tree

library/calendar.po

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-04-21 00:28+0000\n"
9+
"POT-Creation-Date: 2026-04-28 00:31+0000\n"
1010
"PO-Revision-Date: 2018-05-23 14:40+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -661,56 +661,63 @@ msgid "The :mod:`!calendar` module defines the following exceptions:"
661661
msgstr ":mod:`!calendar` 模組定義了以下例外:"
662662

663663
#: ../../library/calendar.rst:547
664+
#, fuzzy
664665
msgid ""
665-
"A subclass of :exc:`ValueError`, raised when the given month number is "
666-
"outside of the range 1-12 (inclusive)."
666+
"A subclass of :exc:`ValueError` and :exc:`IndexError`, raised when the given "
667+
"month number is outside of the range 1-12 (inclusive)."
667668
msgstr ""
668669
":exc:`ValueError` 的子類別,當給定的月份數字超出 1-12 範圍(含)時引發。"
669670

670-
#: ../../library/calendar.rst:552
671+
#: ../../library/calendar.rst:550
672+
msgid ""
673+
":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New "
674+
"code should avoid catching :exc:`IndexError`."
675+
msgstr ""
676+
677+
#: ../../library/calendar.rst:557
671678
msgid "The invalid month number."
672679
msgstr "無效的月份號。"
673680

674-
#: ../../library/calendar.rst:557
681+
#: ../../library/calendar.rst:562
675682
msgid ""
676683
"A subclass of :exc:`ValueError`, raised when the given weekday number is "
677684
"outside of the range 0-6 (inclusive)."
678685
msgstr ""
679686
":exc:`ValueError` 的子類別,當給定的週幾的數字超出 0-6(含)範圍時引發。"
680687

681-
#: ../../library/calendar.rst:562
688+
#: ../../library/calendar.rst:567
682689
msgid "The invalid weekday number."
683690
msgstr "無效的週幾編號。"
684691

685-
#: ../../library/calendar.rst:567
692+
#: ../../library/calendar.rst:572
686693
msgid "Module :mod:`datetime`"
687694
msgstr ":mod:`datetime` 模組"
688695

689-
#: ../../library/calendar.rst:568
696+
#: ../../library/calendar.rst:573
690697
msgid ""
691698
"Object-oriented interface to dates and times with similar functionality to "
692699
"the :mod:`time` module."
693700
msgstr "日期與時間的物件導向介面,和 :mod:`time` 模組有相似的功能。"
694701

695-
#: ../../library/calendar.rst:571
702+
#: ../../library/calendar.rst:576
696703
msgid "Module :mod:`time`"
697704
msgstr ":mod:`time` 模組"
698705

699-
#: ../../library/calendar.rst:572
706+
#: ../../library/calendar.rst:577
700707
msgid "Low-level time related functions."
701708
msgstr "底層的時間相關函式。"
702709

703-
#: ../../library/calendar.rst:578
710+
#: ../../library/calendar.rst:583
704711
msgid "Command-line usage"
705712
msgstr "命令列用法"
706713

707-
#: ../../library/calendar.rst:582
714+
#: ../../library/calendar.rst:587
708715
msgid ""
709716
"The :mod:`!calendar` module can be executed as a script from the command "
710717
"line to interactively print a calendar."
711718
msgstr ":mod:`!calendar` 模組可以作為腳本從命令列執行,並以互動方式列印日曆。"
712719

713-
#: ../../library/calendar.rst:585
720+
#: ../../library/calendar.rst:590
714721
msgid ""
715722
"python -m calendar [-h] [-L LOCALE] [-e ENCODING] [-t {text,html}]\n"
716723
" [-w WIDTH] [-l LINES] [-s SPACING] [-m MONTHS] [-c CSS]\n"
@@ -720,11 +727,11 @@ msgstr ""
720727
" [-w WIDTH] [-l LINES] [-s SPACING] [-m MONTHS] [-c CSS]\n"
721728
" [-f FIRST_WEEKDAY] [year] [month]"
722729

723-
#: ../../library/calendar.rst:592
730+
#: ../../library/calendar.rst:597
724731
msgid "For example, to print a calendar for the year 2000:"
725732
msgstr "例如,要列印 2000 年的日曆:"
726733

727-
#: ../../library/calendar.rst:594
734+
#: ../../library/calendar.rst:599
728735
msgid ""
729736
"$ python -m calendar 2000\n"
730737
" 2000\n"
@@ -802,40 +809,40 @@ msgstr ""
802809
"23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31\n"
803810
"30 31"
804811

805-
#: ../../library/calendar.rst:635
812+
#: ../../library/calendar.rst:640
806813
msgid "The following options are accepted:"
807814
msgstr "接受以下選項:"
808815

809-
#: ../../library/calendar.rst:642
816+
#: ../../library/calendar.rst:647
810817
msgid "Show the help message and exit."
811818
msgstr "顯示幫助訊息並退出。"
812819

813-
#: ../../library/calendar.rst:647
820+
#: ../../library/calendar.rst:652
814821
msgid "The locale to use for month and weekday names. Defaults to English."
815822
msgstr "用於月份和週幾名稱的語系。預設為英語。"
816823

817-
#: ../../library/calendar.rst:653
824+
#: ../../library/calendar.rst:658
818825
msgid ""
819826
"The encoding to use for output. :option:`--encoding` is required if :option:"
820827
"`--locale` is set."
821828
msgstr ""
822829
"用於輸出的編碼。如有設定 :option:`--locale` 則必須給定 :option:`--encoding`。"
823830

824-
#: ../../library/calendar.rst:659
831+
#: ../../library/calendar.rst:664
825832
msgid "Print the calendar to the terminal as text, or as an HTML document."
826833
msgstr "將日曆以文字或 HTML 文件的形式印出到終端機。"
827834

828-
#: ../../library/calendar.rst:665
835+
#: ../../library/calendar.rst:670
829836
msgid ""
830837
"The weekday to start each week. Must be a number between 0 (Monday) and 6 "
831838
"(Sunday). Defaults to 0."
832839
msgstr "一週起始的日子。必須是 0(週一)到 6(週日)之間的數字。預設為 0。"
833840

834-
#: ../../library/calendar.rst:673
841+
#: ../../library/calendar.rst:678
835842
msgid "The year to print the calendar for. Defaults to the current year."
836843
msgstr "印出日曆的年份。預設為目前年份。"
837844

838-
#: ../../library/calendar.rst:679
845+
#: ../../library/calendar.rst:684
839846
msgid ""
840847
"The month of the specified :option:`year` to print the calendar for. Must be "
841848
"a number between 1 and 12, and may only be used in text mode. Defaults to "
@@ -844,47 +851,47 @@ msgstr ""
844851
"要列印日曆的指定 :option:`year` 的月份。必須是 1 到 12 之間的數字,並且只能在"
845852
"文字模式下使用。預設列印全年日曆。"
846853

847-
#: ../../library/calendar.rst:685
854+
#: ../../library/calendar.rst:690
848855
msgid "*Text-mode options:*"
849856
msgstr "*文字模式選項:*"
850857

851-
#: ../../library/calendar.rst:689
858+
#: ../../library/calendar.rst:694
852859
msgid ""
853860
"The width of the date column in terminal columns. The date is printed "
854861
"centred in the column. Any value lower than 2 is ignored. Defaults to 2."
855862
msgstr ""
856863
"終端機行中日期行的寬度。日期印出在行的中央。任何小於 2 的值都會被忽略。預設"
857864
"為 2。"
858865

859-
#: ../../library/calendar.rst:697
866+
#: ../../library/calendar.rst:702
860867
msgid ""
861868
"The number of lines for each week in terminal rows. The date is printed top-"
862869
"aligned. Any value lower than 1 is ignored. Defaults to 1."
863870
msgstr ""
864871
"終端機列中每週的列數。日期印出時頂部會對齊。任何小於 1 的值都會被忽略。預設"
865872
"為 1。"
866873

867-
#: ../../library/calendar.rst:705
874+
#: ../../library/calendar.rst:710
868875
msgid ""
869876
"The space between months in columns. Any value lower than 2 is ignored. "
870877
"Defaults to 6."
871878
msgstr "行中月份之間的間距。任何小於 2 的值都會被忽略。預設為 6。"
872879

873-
#: ../../library/calendar.rst:712
880+
#: ../../library/calendar.rst:717
874881
msgid "The number of months printed per row. Defaults to 3."
875882
msgstr "每列印出的月份數量。預設為 3。"
876883

877-
#: ../../library/calendar.rst:715
884+
#: ../../library/calendar.rst:720
878885
msgid ""
879886
"By default, today's date is highlighted in color and can be :ref:`controlled "
880887
"using environment variables <using-on-controlling-color>`."
881888
msgstr ""
882889

883-
#: ../../library/calendar.rst:719
890+
#: ../../library/calendar.rst:724
884891
msgid "*HTML-mode options:*"
885892
msgstr "*HTML 模式選項:*"
886893

887-
#: ../../library/calendar.rst:723
894+
#: ../../library/calendar.rst:728
888895
msgid ""
889896
"The path of a CSS stylesheet to use for the calendar. This must either be "
890897
"relative to the generated HTML, or an absolute HTTP or ``file:///`` URL."

library/html.parser.po

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-11-01 00:16+0000\n"
10+
"POT-Creation-Date: 2026-04-28 00:31+0000\n"
1111
"PO-Revision-Date: 2023-05-04 22:54+0800\n"
1212
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -46,17 +46,17 @@ msgid ""
4646
"(except the ones in elements like ``script`` and ``style``) are "
4747
"automatically converted to the corresponding Unicode characters."
4848
msgstr ""
49-
"如果 *convert_charrefs* 為 true (預設值),所有字元參照 (reference)"
50-
"(元素中的參照除外,像是 ``script`` 和 ``style`` )將自動轉換為相應的 Unicode 字元。"
49+
"如果 *convert_charrefs* 為 true (預設值),所有字元參照 (reference)(元素中"
50+
"的參照除外,像是 ``script`` 和 ``style`` )將自動轉換為相應的 Unicode 字元。"
5151

5252
#: ../../library/html.parser.rst:26
5353
msgid ""
5454
"If *scripting* is false (the default), the content of the ``noscript`` "
5555
"element is parsed normally; if it's true, it's returned as is without being "
5656
"parsed."
5757
msgstr ""
58-
"如果 *scripting* 為 false(預設值),``noscript`` 元素的內容會被正常"
59-
"剖析;如果為 true,則會原樣回傳而不進行剖析。"
58+
"如果 *scripting* 為 false(預設值),``noscript`` 元素的內容會被正常剖析;如"
59+
"果為 true,則會原樣回傳而不進行剖析。"
6060

6161
#: ../../library/html.parser.rst:30
6262
msgid ""
@@ -235,12 +235,14 @@ msgid ""
235235
msgstr "呼叫此方法來處理元素的開始標籤(例如 ``<div id=\"main\">``)。"
236236

237237
#: ../../library/html.parser.rst:140
238+
#, fuzzy
238239
msgid ""
239240
"The *tag* argument is the name of the tag converted to lower case. The "
240241
"*attrs* argument is a list of ``(name, value)`` pairs containing the "
241242
"attributes found inside the tag's ``<>`` brackets. The *name* will be "
242243
"translated to lower case, and quotes in the *value* have been removed, and "
243-
"character and entity references have been replaced."
244+
"character and entity references have been replaced. For empty attributes, "
245+
"*value* is ``None``."
244246
msgstr ""
245247
"*tag* 引數是轉換為小寫的標籤名稱。 *attrs* 引數是一個 ``(name, value)`` 對的"
246248
"列表,包含在標籤的 ``<>`` 括號內找到的屬性。 *name* 將被轉成小寫,*value* 中"
@@ -288,7 +290,8 @@ msgid ""
288290
"This method is called to process arbitrary data (e.g. text nodes and the "
289291
"content of elements like ``script`` and ``style``)."
290292
msgstr ""
291-
"呼叫此方法來處理任意資料(例如文本節點與像是 ``script`` 和 ``style`` 元素的內容)。"
293+
"呼叫此方法來處理任意資料(例如文本節點與像是 ``script`` 和 ``style`` 元素的內"
294+
"容)。"
292295

293296
#: ../../library/html.parser.rst:176
294297
msgid ""
@@ -310,8 +313,8 @@ msgid ""
310313
msgstr ""
311314
"呼叫此方法來處理 :samp:`&#{NNN};` 和 :samp:`&#x{NNN};` 形式的十進位和十六進位"
312315
"數字字元參照。例如,``&gt;`` 的十進位等效為 ``&#62;``,而十六進位為 ``&#x3E;"
313-
"``;在這種情況下,該方法將收到 ``'62'`` 或 ``'x3E'``。此方法只有在 *convert_charrefs* 為 "
314-
"false 時才會被呼叫。"
316+
"``;在這種情況下,該方法將收到 ``'62'`` 或 ``'x3E'``。此方法只有在 "
317+
"*convert_charrefs* 為 false 時才會被呼叫。"
315318

316319
#: ../../library/html.parser.rst:193
317320
msgid ""
@@ -516,7 +519,8 @@ msgstr ""
516519
msgid ""
517520
"The content of elements like ``script`` and ``style`` is returned as is, "
518521
"without further parsing:"
519-
msgstr "像是 ``script`` 和 ``style`` 這類元素的內容將按原樣回傳,無需進一步的剖析:"
522+
msgstr ""
523+
"像是 ``script`` 和 ``style`` 這類元素的內容將按原樣回傳,無需進一步的剖析:"
520524

521525
#: ../../library/html.parser.rst:305
522526
msgid ""
@@ -549,10 +553,28 @@ msgstr ""
549553
"End tag : script"
550554

551555
#: ../../library/html.parser.rst:320
556+
msgid ""
557+
"Attribute names are converted to lowercase, quotes from attribute values "
558+
"removed, and ``None`` is returned as *value* for empty attributes (such as "
559+
"``checked``):"
560+
msgstr ""
561+
562+
#: ../../library/html.parser.rst:323
563+
msgid ""
564+
">>> parser.feed(\"<input TYPE='checkbox' checked required='' "
565+
"disabled=disabled>\")\n"
566+
"Start tag: input\n"
567+
" attr: ('type', 'checkbox')\n"
568+
" attr: ('checked', None)\n"
569+
" attr: ('required', '')\n"
570+
" attr: ('disabled', 'disabled')"
571+
msgstr ""
572+
573+
#: ../../library/html.parser.rst:332
552574
msgid "Parsing comments:"
553575
msgstr "剖析註解:"
554576

555-
#: ../../library/html.parser.rst:322
577+
#: ../../library/html.parser.rst:334
556578
msgid ""
557579
">>> parser.feed('<!--a comment-->'\n"
558580
"... '<!--[if IE 9]>IE-specific content<![endif]-->')\n"
@@ -564,15 +586,15 @@ msgstr ""
564586
"Comment : a comment\n"
565587
"Comment : [if IE 9]>IE-specific content<![endif]"
566588

567-
#: ../../library/html.parser.rst:329
589+
#: ../../library/html.parser.rst:341
568590
msgid ""
569591
"Parsing named and numeric character references and converting them to the "
570592
"correct char (note: these 3 references are all equivalent to ``'>'``):"
571593
msgstr ""
572594
"剖析附名 (named) 且為數值的 (numeric) 字元參照,並將它們轉換為正確的字元(注"
573595
"意:這 3 個參照都等同於 ``'>'``):"
574596

575-
#: ../../library/html.parser.rst:332
597+
#: ../../library/html.parser.rst:344
576598
msgid ""
577599
">>> parser = MyHTMLParser()\n"
578600
">>> parser.feed('&gt;&#62;&#x3E;')\n"
@@ -594,16 +616,17 @@ msgstr ""
594616
"Num ent : >\n"
595617
"Num ent : >"
596618

597-
#: ../../library/html.parser.rst:344
619+
#: ../../library/html.parser.rst:356
598620
msgid ""
599621
"Feeding incomplete chunks to :meth:`~HTMLParser.feed` works, but :meth:"
600622
"`~HTMLParser.handle_data` might be called more than once if "
601623
"*convert_charrefs* is false:"
602624
msgstr ""
603-
"將不完整的區塊提供給 :meth:`~HTMLParser.feed` 是可行的,但是如果 *convert_charrefs* 為 false,"
604-
":meth:`~HTMLParser.handle_data` 可能會被呼叫多次:"
625+
"將不完整的區塊提供給 :meth:`~HTMLParser.feed` 是可行的,但是如果 "
626+
"*convert_charrefs* 為 false,:meth:`~HTMLParser.handle_data` 可能會被呼叫多"
627+
"次:"
605628

606-
#: ../../library/html.parser.rst:348
629+
#: ../../library/html.parser.rst:360
607630
msgid ""
608631
">>> for chunk in ['<sp', 'an>buff', 'ered', ' text</s', 'pan>']:\n"
609632
"... parser.feed(chunk)\n"
@@ -623,11 +646,11 @@ msgstr ""
623646
"Data : text\n"
624647
"End tag : span"
625648

626-
#: ../../library/html.parser.rst:359
649+
#: ../../library/html.parser.rst:371
627650
msgid "Parsing invalid HTML (e.g. unquoted attributes) also works:"
628651
msgstr "也能夠剖析無效的 HTML(例如未加引號的屬性):"
629652

630-
#: ../../library/html.parser.rst:361
653+
#: ../../library/html.parser.rst:373
631654
msgid ""
632655
">>> parser.feed('<p><a class=link href=#main>tag soup</p ></a>')\n"
633656
"Start tag: p\n"

0 commit comments

Comments
 (0)