Skip to content

Commit 1510400

Browse files
Copilotmattwang44
andcommitted
Fix newly introduced fuzzy entries in library PO files
- enum.po: Fix 6 fuzzy entries (case changes, datetime import update, _generate_next_value_ description, __new__ attr reference) - pkgutil.po: Remove sentences no longer in msgid - plistlib.po: Update datetime import alias in code example - ssl.po: Fix 6 fuzzy entries (case changes, datetime import/usage update, SSL Sockets/Contexts section headers) - stdtypes.po: Fix incorrect msgstr for sequence append method - string.po: Fix 4 fuzzy entries (case changes, datetime import alias) - struct.po: Fix _Float16 type, note references, and IEEE 754 description Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent bf28da1 commit 1510400

File tree

7 files changed

+19
-41
lines changed

7 files changed

+19
-41
lines changed

library/enum.po

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ msgstr ""
129129
"attr:`!Color.BLUE` 的值是 ``3`` 諸如此類)"
130130

131131
#: ../../library/enum.rst:65
132-
#, fuzzy
133132
msgid "Module contents"
134133
msgstr "模組內容"
135134

@@ -357,7 +356,6 @@ msgid "``EnumDict``"
357356
msgstr "``EnumDict``"
358357

359358
#: ../../library/enum.rst:170
360-
#, fuzzy
361359
msgid "Data types"
362360
msgstr "資料型別"
363361

@@ -689,7 +687,6 @@ msgstr ""
689687
"*self.__class__* 上定義的公開方法: ::"
690688

691689
#: ../../library/enum.rst:348
692-
#, fuzzy
693690
msgid ""
694691
">>> from enum import Enum\n"
695692
">>> import datetime as dt\n"
@@ -710,7 +707,7 @@ msgid ""
710707
"'today', 'value']"
711708
msgstr ""
712709
">>> from enum import Enum\n"
713-
">>> from datetime import date\n"
710+
">>> import datetime as dt\n"
714711
">>> class Weekday(Enum):\n"
715712
"... MONDAY = 1\n"
716713
"... TUESDAY = 2\n"
@@ -721,7 +718,7 @@ msgstr ""
721718
"... SUNDAY = 7\n"
722719
"... @classmethod\n"
723720
"... def today(cls):\n"
724-
"... print('today is %s' % cls(date.today().isoweekday()).name)\n"
721+
"... print(f'today is {cls(dt.date.today().isoweekday()).name}')\n"
725722
"...\n"
726723
">>> dir(Weekday.SATURDAY)\n"
727724
"['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', "
@@ -756,11 +753,10 @@ msgid "A list of the previous values."
756753
msgstr "一個之前值的串列。"
757754

758755
#: ../../library/enum.rst:372
759-
#, fuzzy
760756
msgid ""
761757
"A *staticmethod* that is used to determine the next value returned by :class:"
762758
"`auto`."
763-
msgstr "一個 *staticmethod*,用來決定 :class:`auto` 下一個要回傳的值的: ::"
759+
msgstr "一個 *staticmethod*,用來決定 :class:`auto` 下一個要回傳的值。"
764760

765761
#: ../../library/enum.rst:376
766762
msgid ""
@@ -1648,15 +1644,14 @@ msgstr ""
16481644
"目的對映。只有在類別上可用。"
16491645

16501646
#: ../../library/enum.rst:940
1651-
#, fuzzy
16521647
msgid ""
16531648
":meth:`~Enum.__new__`, if specified, must create and return the enum "
16541649
"members; it is also a very good idea to set the member's :attr:`~Enum."
16551650
"_value_` appropriately. Once all the members are created it is no longer "
16561651
"used."
16571652
msgstr ""
16581653
":meth:`~Enum.__new__`,如果有指定,它必須建立並回傳列舉成員;適當地設定成員"
1659-
"的 :attr:`!_value_` 也是一個很好的主意。一旦所有成員都建立之後就不會再被用"
1654+
"的 :attr:`~Enum._value_` 也是一個很好的主意。一旦所有成員都建立之後就不會再被用"
16601655
"到。"
16611656

16621657
#: ../../library/enum.rst:946
@@ -1742,7 +1737,6 @@ msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``"
17421737
msgstr "``_add_alias_``、``_add_value_alias_``、``_repr_*``"
17431738

17441739
#: ../../library/enum.rst:979
1745-
#, fuzzy
17461740
msgid "Utilities and decorators"
17471741
msgstr "通用項目與裝飾器"
17481742

library/pkgutil.po

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ msgid "Get a resource from a package."
236236
msgstr "從套件中取得資源。"
237237

238238
#: ../../library/pkgutil.rst:150
239-
#, fuzzy
240239
msgid ""
241240
"This is a wrapper for the :term:`loader` :meth:`get_data <importlib.abc."
242241
"ResourceLoader.get_data>` API. The *package* argument should be the name of "
@@ -246,8 +245,7 @@ msgid ""
246245
msgstr ""
247246
"這是 :term:`loader` :meth:`get_data <importlib.abc.ResourceLoader.get_data>` "
248247
"API 的包裝器。*package* 引數應該是採用標準模組格式 (``foo.bar``) 的套件名稱。"
249-
"*resource* 引數應為相對檔案名稱的形式,並使用 ``/`` 作為路徑分隔符號。不允許"
250-
"使用父目錄名稱 ``..``,也不允許使用根目錄名稱(以 ``/`` 開頭)。"
248+
"*resource* 引數應為相對檔案名稱的形式,並使用 ``/`` 作為路徑分隔符號。"
251249

252250
#: ../../library/pkgutil.rst:156
253251
msgid ""

library/plistlib.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ msgid "Generating a plist::"
248248
msgstr ""
249249

250250
#: ../../library/plistlib.rst:187
251-
#, fuzzy
252251
msgid ""
253252
"import datetime as dt\n"
254253
"import plistlib\n"
@@ -270,7 +269,7 @@ msgid ""
270269
")\n"
271270
"print(plistlib.dumps(pl).decode())"
272271
msgstr ""
273-
"import datetime\n"
272+
"import datetime as dt\n"
274273
"import plistlib\n"
275274
"\n"
276275
"pl = dict(\n"
@@ -286,7 +285,7 @@ msgstr ""
286285
" ),\n"
287286
" someData = b\"<binary gunk>\",\n"
288287
" someMoreData = b\"<lots of binary gunk>\" * 10,\n"
289-
" aDate = datetime.datetime.now()\n"
288+
" aDate = dt.datetime.now()\n"
290289
")\n"
291290
"print(plistlib.dumps(pl).decode())"
292291

library/ssl.po

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ msgid ""
138138
msgstr "使用已經被棄用的常數或函式將會導致棄用警示。"
139139

140140
#: ../../library/ssl.rst:74
141-
#, fuzzy
142141
msgid "Functions, constants, and exceptions"
143142
msgstr "函式、常數與例外"
144143

@@ -553,7 +552,6 @@ msgid "Certificate handling"
553552
msgstr "認證處理"
554553

555554
#: ../../library/ssl.rst:362
556-
#, fuzzy
557555
msgid ""
558556
"Return the time in seconds since the epoch, given the ``cert_time`` string "
559557
"representing the \"notBefore\" or \"notAfter\" date from a certificate in "
@@ -568,7 +566,6 @@ msgid "Here's an example:"
568566
msgstr "以下是一個範例:"
569567

570568
#: ../../library/ssl.rst:369
571-
#, fuzzy
572569
msgid ""
573570
">>> import ssl\n"
574571
">>> import datetime as dt\n"
@@ -579,12 +576,12 @@ msgid ""
579576
"2018-01-05 09:34:43+00:00"
580577
msgstr ""
581578
">>> import ssl\n"
579+
">>> import datetime as dt\n"
582580
">>> timestamp = ssl.cert_time_to_seconds(\"Jan 5 09:34:43 2018 GMT\")\n"
583581
">>> timestamp\n"
584582
"1515144883\n"
585-
">>> from datetime import datetime\n"
586-
">>> print(datetime.utcfromtimestamp(timestamp))\n"
587-
"2018-01-05 09:34:43"
583+
">>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC))\n"
584+
"2018-01-05 09:34:43+00:00"
588585

589586
#: ../../library/ssl.rst:379
590587
msgid "\"notBefore\" or \"notAfter\" dates must use GMT (:rfc:`5280`)."
@@ -1410,9 +1407,8 @@ msgstr ""
14101407
"class:`TLSVersion` 成員都已被棄用。"
14111408

14121409
#: ../../library/ssl.rst:1054
1413-
#, fuzzy
14141410
msgid "SSL sockets"
1415-
msgstr "SSL Sockets"
1411+
msgstr "SSL sockets"
14161412

14171413
#: ../../library/ssl.rst:1058
14181414
msgid "SSL sockets provide the following methods of :ref:`socket-objects`:"
@@ -1977,9 +1973,8 @@ msgid ""
19771973
msgstr ""
19781974

19791975
#: ../../library/ssl.rst:1415
1980-
#, fuzzy
19811976
msgid "SSL contexts"
1982-
msgstr "SSL Sockets"
1977+
msgstr "SSL contexts"
19831978

19841979
#: ../../library/ssl.rst:1419
19851980
msgid ""
@@ -3571,7 +3566,6 @@ msgid ""
35713566
msgstr ""
35723567

35733568
#: ../../library/ssl.rst:2531
3574-
#, fuzzy
35753569
msgid "Memory BIO support"
35763570
msgstr "記憶體 BIO 支援"
35773571

library/stdtypes.po

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,11 +2098,10 @@ msgid "Mutable sequence types also support the following methods:"
20982098
msgstr "可變序列型別也支援以下方法:"
20992099

21002100
#: ../../library/stdtypes.rst:1289
2101-
#, fuzzy
21022101
msgid ""
21032102
"Append *value* to the end of the sequence. This is equivalent to writing "
21042103
"``seq[len(seq):len(seq)] = [value]``."
2105-
msgstr "移除 *sequence* 中的所有項目,這和 ``del sequence[:]`` 相同。"
2104+
msgstr "將 *value* 附加到序列末尾,這和 ``seq[len(seq):len(seq)] = [value]`` 相同。"
21062105

21072106
#: ../../library/stdtypes.rst:1301
21082107
msgid ""

library/string.po

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ msgstr ""
112112
"(vertical tab) 這些字元。"
113113

114114
#: ../../library/string.rst:86
115-
#, fuzzy
116115
msgid "Custom string formatting"
117116
msgstr "自訂字串格式"
118117

@@ -258,7 +257,6 @@ msgid ""
258257
msgstr ""
259258

260259
#: ../../library/string.rst:196
261-
#, fuzzy
262260
msgid "Format string syntax"
263261
msgstr "格式化文字語法"
264262

@@ -410,7 +408,6 @@ msgid "See the :ref:`formatexamples` section for some examples."
410408
msgstr "範例請見 :ref:`formatexamples`。"
411409

412410
#: ../../library/string.rst:308
413-
#, fuzzy
414411
msgid "Format specification mini-language"
415412
msgstr "格式規格 (Format Specification) 迷你語言"
416413

@@ -1202,15 +1199,14 @@ msgid "Using type-specific formatting::"
12021199
msgstr "作為特定型別格式: ::"
12031200

12041201
#: ../../library/string.rst:762
1205-
#, fuzzy
12061202
msgid ""
12071203
">>> import datetime as dt\n"
12081204
">>> d = dt.datetime(2010, 7, 4, 12, 15, 58)\n"
12091205
">>> '{:%Y-%m-%d %H:%M:%S}'.format(d)\n"
12101206
"'2010-07-04 12:15:58'"
12111207
msgstr ""
1212-
">>> import datetime\n"
1213-
">>> d = datetime.datetime(2010, 7, 4, 12, 15, 58)\n"
1208+
">>> import datetime as dt\n"
1209+
">>> d = dt.datetime(2010, 7, 4, 12, 15, 58)\n"
12141210
">>> '{:%Y-%m-%d %H:%M:%S}'.format(d)\n"
12151211
"'2010-07-04 12:15:58'"
12161212

library/struct.po

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,19 +590,17 @@ msgid "``e``"
590590
msgstr "``e``"
591591

592592
#: ../../library/struct.rst:257
593-
#, fuzzy
594593
msgid ":c:expr:`_Float16`"
595-
msgstr ":c:expr:`float`"
594+
msgstr ":c:expr:`_Float16`"
596595

597596
#: ../../library/struct.rst:257 ../../library/struct.rst:259
598597
#: ../../library/struct.rst:261
599598
msgid "float"
600599
msgstr "float"
601600

602601
#: ../../library/struct.rst:257
603-
#, fuzzy
604602
msgid "\\(4), \\(6)"
605-
msgstr "\\(1), \\(2)"
603+
msgstr "\\(4), \\(6)"
606604

607605
#: ../../library/struct.rst:259
608606
msgid "``f``"
@@ -763,7 +761,6 @@ msgstr ""
763761
"組不將其解釋為原生順序,因此 ``'P'`` 格式不可用。"
764762

765763
#: ../../library/struct.rst:327
766-
#, fuzzy
767764
msgid ""
768765
"The IEEE 754 binary16 \"half precision\" type was introduced in the 2008 "
769766
"revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign "
@@ -779,7 +776,8 @@ msgstr ""
779776
"IEEE 754 binary16「半精度 (half precision)」型別是在 2008 年的 `IEEE 754 標"
780777
"準 <ieee 754 standard_>`_\\ 修訂版中引入的。它有一個符號位元 (sign bit)、5 位"
781778
"元指數和 11 位元精度(明確儲存 10 位元),可以全精度表示大約 ``6.1e-05`` 到 "
782-
"``6.5e+04`` 之間的數字。此型別未被 C 編譯器廣泛支援:在典型機器上,unsigned "
779+
"``6.5e+04`` 之間的數字。此型別未被 C 編譯器廣泛支援:若編譯器支援 C23 標準的"
780+
"附錄 H,則可以作為 :c:expr:`_Float16` 型別使用。在典型機器上,unsigned "
783781
"short 可以用於儲存但不能用於數學運算。請參見 Wikipedia 上的\\ `半精度浮點數格"
784782
"式 <half precision format_>`_\\ 頁面以取得更多資訊。"
785783

0 commit comments

Comments
 (0)