Skip to content

Commit bf28da1

Browse files
Copilotmattwang44
andcommitted
Fix fuzzy entries in asyncio-task, collections, ctypes, difflib
- asyncio-task: fix title case headings and update datetime code example - collections: update parameter names (x→item, x→value, i→index) and UserDict description reflecting removed initialdata parameter - ctypes: update Python type references to use :py:class: roles, fix C type expressions (long→long long, etc.) - difflib: fix title case headings and update datetime import style Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent 893046a commit bf28da1

File tree

4 files changed

+31
-59
lines changed

4 files changed

+31
-59
lines changed

library/asyncio-task.po

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ msgstr ""
1818
"Plural-Forms: nplurals=1; plural=0;\n"
1919

2020
#: ../../library/asyncio-task.rst:6
21-
#, fuzzy
2221
msgid "Coroutines and tasks"
2322
msgstr "協程與任務"
2423

@@ -713,7 +712,6 @@ msgid ""
713712
msgstr ""
714713

715714
#: ../../library/asyncio-task.rst:500
716-
#, fuzzy
717715
msgid ""
718716
"import asyncio\n"
719717
"import datetime as dt\n"
@@ -730,13 +728,13 @@ msgid ""
730728
"asyncio.run(display_date())"
731729
msgstr ""
732730
"import asyncio\n"
733-
"import datetime\n"
731+
"import datetime as dt\n"
734732
"\n"
735733
"async def display_date():\n"
736734
" loop = asyncio.get_running_loop()\n"
737735
" end_time = loop.time() + 5.0\n"
738736
" while True:\n"
739-
" print(datetime.datetime.now())\n"
737+
" print(dt.datetime.now())\n"
740738
" if (loop.time() + 1.0) >= end_time:\n"
741739
" break\n"
742740
" await asyncio.sleep(1)\n"
@@ -1611,7 +1609,6 @@ msgid "Return ``True`` if *obj* is a coroutine object."
16111609
msgstr ""
16121610

16131611
#: ../../library/asyncio-task.rst:1202
1614-
#, fuzzy
16151612
msgid "Task object"
16161613
msgstr "Task 物件"
16171614

library/collections.po

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -818,14 +818,12 @@ msgid "Deque objects support the following methods:"
818818
msgstr "Deque 物件支援以下方法:"
819819

820820
#: ../../library/collections.rst:488
821-
#, fuzzy
822821
msgid "Add *item* to the right side of the deque."
823-
msgstr "將 *x* 自 deque 的右側加入。"
822+
msgstr "將 *item* 自 deque 的右側加入。"
824823

825824
#: ../../library/collections.rst:493
826-
#, fuzzy
827825
msgid "Add *item* to the left side of the deque."
828-
msgstr "將 *x* 自 deque 的左側加入。"
826+
msgstr "將 *item* 自 deque 的左側加入。"
829827

830828
#: ../../library/collections.rst:498
831829
msgid "Remove all elements from the deque leaving it with length 0."
@@ -836,9 +834,8 @@ msgid "Create a shallow copy of the deque."
836834
msgstr "建立一個 deque 的淺複製 (shallow copy)。"
837835

838836
#: ../../library/collections.rst:510
839-
#, fuzzy
840837
msgid "Count the number of deque elements equal to *value*."
841-
msgstr "計算 deque 內元素為 *x* 的個數。"
838+
msgstr "計算 deque 內元素為 *value* 的個數。"
842839

843840
#: ../../library/collections.rst:517
844841
msgid ""
@@ -856,19 +853,17 @@ msgstr ""
856853
"數是相反的。"
857854

858855
#: ../../library/collections.rst:530
859-
#, fuzzy
860856
msgid ""
861857
"Return the position of *value* in the deque (at or after index *start* and "
862858
"before index *stop*). Returns the first match or raises :exc:`ValueError` "
863859
"if not found."
864860
msgstr ""
865-
"回傳 deque 中 *x* 的位置(或在索引 *start* 之後、索引 *stop* 之前的位置)。"
866-
"傳第一個匹配的位置,如果沒找到就引發 :exc:`ValueError`。"
861+
"回傳 deque 中 *value* 的位置(或在索引 *start* 之後、索引 *stop* 之前的位置)。"
862+
"回傳第一個匹配的位置,如果沒找到就引發 :exc:`ValueError`。"
867863

868864
#: ../../library/collections.rst:539
869-
#, fuzzy
870865
msgid "Insert *value* into the deque at position *index*."
871-
msgstr "在 deque 位置 *i* 中插入 *x*。"
866+
msgstr "在 deque 位置 *index* 中插入 *value*。"
872867

873868
#: ../../library/collections.rst:541
874869
msgid ""
@@ -2057,24 +2052,22 @@ msgstr ""
20572052
"為被包裝的字典可以作為其屬性來存取。"
20582053

20592054
#: ../../library/collections.rst:1332
2060-
#, fuzzy
20612055
msgid ""
20622056
"Class that simulates a dictionary. The instance's contents are kept in a "
20632057
"regular dictionary, which is accessible via the :attr:`data` attribute of :"
20642058
"class:`!UserDict` instances. If arguments are provided, they are used to "
20652059
"initialize :attr:`data`, like a regular dictionary."
20662060
msgstr ""
2067-
"模擬字典的類別。實例的內容被存於一個字典,可透過 :class:`UserDict` 的 :attr:"
2068-
"`data` 屬性來做存取。如果有提供 *initialdata*,:attr:`data` 屬性會被初始化為"
2069-
"其值;要注意指到 *initialdata* 的參照不會被保留,使其可被用於其他目的。"
2061+
"模擬字典的類別。實例的內容被存於一個字典,可透過 :class:`!UserDict`\\ 的 :attr:"
2062+
"`data` 屬性來做存取。如果有提供引數,:attr:`data` 屬性會被初始化,就像一個一"
2063+
"般的字典。"
20702064

20712065
#: ../../library/collections.rst:1337
2072-
#, fuzzy
20732066
msgid ""
20742067
"In addition to supporting the methods and operations of mappings, :class:`!"
20752068
"UserDict` instances provide the following attribute:"
20762069
msgstr ""
2077-
"除了支援作為對映所需的方法與操作,:class:`UserDict` 實例提供了以下屬性:"
2070+
"除了支援作為對映所需的方法與操作,:class:`!UserDict`\\ 實例提供了以下屬性:"
20782071

20792072
#: ../../library/collections.rst:1342
20802073
msgid ""

library/ctypes.po

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,8 @@ msgid ":c:expr:`_Bool`"
433433
msgstr ":c:expr:`_Bool`"
434434

435435
#: ../../library/ctypes.rst:235 ../../library/ctypes.rst:359
436-
#, fuzzy
437436
msgid ":py:class:`bool`"
438-
msgstr ":class:`c_bool`"
437+
msgstr ":py:class:`bool`"
439438

440439
#: ../../library/ctypes.rst:236
441440
msgid "``'?'``"
@@ -488,9 +487,8 @@ msgstr ":class:`c_byte`"
488487
#: ../../library/ctypes.rst:311 ../../library/ctypes.rst:315
489488
#: ../../library/ctypes.rst:319 ../../library/ctypes.rst:323
490489
#: ../../library/ctypes.rst:327
491-
#, fuzzy
492490
msgid ":py:class:`int`"
493-
msgstr ":class:`c_int`"
491+
msgstr ":py:class:`int`"
494492

495493
#: ../../library/ctypes.rst:248
496494
msgid "``'b'``"
@@ -658,9 +656,8 @@ msgid ":class:`c_longlong`"
658656
msgstr ":class:`c_longlong`"
659657

660658
#: ../../library/ctypes.rst:310
661-
#, fuzzy
662659
msgid ":c:expr:`long long`"
663-
msgstr ":c:expr:`long`"
660+
msgstr ":c:expr:`long long`"
664661

665662
#: ../../library/ctypes.rst:312
666663
msgid "``'q'`` \\*"
@@ -671,9 +668,8 @@ msgid ":class:`c_ulonglong`"
671668
msgstr ":class:`c_ulonglong`"
672669

673670
#: ../../library/ctypes.rst:314
674-
#, fuzzy
675671
msgid ":c:expr:`unsigned long long`"
676-
msgstr ":c:expr:`unsigned long`"
672+
msgstr ":c:expr:`unsigned long long`"
677673

678674
#: ../../library/ctypes.rst:316
679675
msgid "``'Q'`` \\*"
@@ -692,9 +688,8 @@ msgid ":class:`c_ssize_t`"
692688
msgstr ":class:`c_ssize_t`"
693689

694690
#: ../../library/ctypes.rst:322
695-
#, fuzzy
696691
msgid ":c:type:`Py_ssize_t`"
697-
msgstr ":c:type:`size_t`"
692+
msgstr ":c:type:`Py_ssize_t`"
698693

699694
#: ../../library/ctypes.rst:325
700695
msgid ":class:`c_time_t`"
@@ -714,9 +709,8 @@ msgstr ":c:expr:`float`"
714709

715710
#: ../../library/ctypes.rst:331 ../../library/ctypes.rst:335
716711
#: ../../library/ctypes.rst:339
717-
#, fuzzy
718712
msgid ":py:class:`float`"
719-
msgstr ":class:`c_float`"
713+
msgstr ":py:class:`float`"
720714

721715
#: ../../library/ctypes.rst:332
722716
msgid "``'f'``"
@@ -755,9 +749,8 @@ msgid ":c:expr:`char *` (NUL terminated)"
755749
msgstr ""
756750

757751
#: ../../library/ctypes.rst:343
758-
#, fuzzy
759752
msgid ":py:class:`bytes` or ``None``"
760-
msgstr "位元組物件或 ``None``"
753+
msgstr ":py:class:`bytes`\\ ``None``"
761754

762755
#: ../../library/ctypes.rst:344
763756
msgid "``'z'``"
@@ -772,9 +765,8 @@ msgid ":c:expr:`wchar_t *` (NUL terminated)"
772765
msgstr ""
773766

774767
#: ../../library/ctypes.rst:347
775-
#, fuzzy
776768
msgid ":py:class:`str` or ``None``"
777-
msgstr "字串或 ``None``"
769+
msgstr ":py:class:`str`\\ ``None``"
778770

779771
#: ../../library/ctypes.rst:348
780772
msgid "``'Z'``"
@@ -789,28 +781,24 @@ msgid ":c:expr:`void *`"
789781
msgstr ":c:expr:`void *`"
790782

791783
#: ../../library/ctypes.rst:351
792-
#, fuzzy
793784
msgid ":py:class:`int` or ``None``"
794-
msgstr "字串或 ``None``"
785+
msgstr ":py:class:`int`\\ ``None``"
795786

796787
#: ../../library/ctypes.rst:352
797788
msgid "``'P'``"
798789
msgstr ""
799790

800791
#: ../../library/ctypes.rst:353
801-
#, fuzzy
802792
msgid ":class:`py_object`"
803-
msgstr ":class:`c_double`"
793+
msgstr ":class:`py_object`"
804794

805795
#: ../../library/ctypes.rst:354
806-
#, fuzzy
807796
msgid ":c:expr:`PyObject *`"
808-
msgstr ":c:expr:`int`"
797+
msgstr ":c:expr:`PyObject *`"
809798

810799
#: ../../library/ctypes.rst:355
811-
#, fuzzy
812800
msgid ":py:class:`object`"
813-
msgstr ":class:`c_int`"
801+
msgstr ":py:class:`object`"
814802

815803
#: ../../library/ctypes.rst:356
816804
msgid "``'O'``"
@@ -821,9 +809,8 @@ msgid ":ref:`VARIANT_BOOL <ctypes-wintypes>`"
821809
msgstr ""
822810

823811
#: ../../library/ctypes.rst:358
824-
#, fuzzy
825812
msgid ":c:expr:`short int`"
826-
msgstr ":c:expr:`short`"
813+
msgstr ":c:expr:`short int`"
827814

828815
#: ../../library/ctypes.rst:360
829816
msgid "``'v'``"
@@ -846,9 +833,8 @@ msgstr ":c:expr:`float complex`"
846833

847834
#: ../../library/ctypes.rst:374 ../../library/ctypes.rst:378
848835
#: ../../library/ctypes.rst:382
849-
#, fuzzy
850836
msgid ":py:class:`complex`"
851-
msgstr ":class:`c_float_complex`"
837+
msgstr ":py:class:`complex`"
852838

853839
#: ../../library/ctypes.rst:375
854840
msgid "``'F'``"

library/difflib.po

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ msgid ""
415415
msgstr ""
416416

417417
#: ../../library/difflib.rst:362
418-
#, fuzzy
419418
msgid "SequenceMatcher objects"
420419
msgstr "SequenceMatcher 物件"
421420

@@ -718,7 +717,6 @@ msgid ""
718717
msgstr ""
719718

720719
#: ../../library/difflib.rst:590
721-
#, fuzzy
722720
msgid "SequenceMatcher examples"
723721
msgstr "SequenceMatcher 範例"
724722

@@ -832,9 +830,8 @@ msgid ""
832830
msgstr ""
833831

834832
#: ../../library/difflib.rst:690
835-
#, fuzzy
836833
msgid "Differ example"
837-
msgstr "ndiff 範例: ::"
834+
msgstr "Differ 範例"
838835

839836
#: ../../library/difflib.rst:692
840837
msgid ""
@@ -877,7 +874,6 @@ msgid ""
877874
msgstr ""
878875

879876
#: ../../library/difflib.rst:761
880-
#, fuzzy
881877
msgid ""
882878
"\"\"\" Command-line interface to difflib.py providing diffs in four "
883879
"formats:\n"
@@ -943,7 +939,7 @@ msgid ""
943939
"if __name__ == '__main__':\n"
944940
" main()\n"
945941
msgstr ""
946-
"\"\"\" Command line interface to difflib.py providing diffs in four "
942+
"\"\"\" Command-line interface to difflib.py providing diffs in four "
947943
"formats:\n"
948944
"\n"
949945
"* ndiff: lists every line and highlights interline changes.\n"
@@ -954,11 +950,11 @@ msgstr ""
954950
"\"\"\"\n"
955951
"\n"
956952
"import sys, os, difflib, argparse\n"
957-
"from datetime import datetime, timezone\n"
953+
"import datetime as dt\n"
958954
"\n"
959955
"def file_mtime(path):\n"
960-
" t = datetime.fromtimestamp(os.stat(path).st_mtime,\n"
961-
" timezone.utc)\n"
956+
" t = dt.datetime.fromtimestamp(os.stat(path).st_mtime,\n"
957+
" dt.timezone.utc)\n"
962958
" return t.astimezone().isoformat()\n"
963959
"\n"
964960
"def main():\n"

0 commit comments

Comments
 (0)