Skip to content

Commit 6f2b7f5

Browse files
committed
Finish Translate from 'Intro' to 'Type Alias'
1 parent 81defa4 commit 6f2b7f5

File tree

1 file changed

+65
-37
lines changed

1 file changed

+65
-37
lines changed

library/typing.po

+65-37
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2023-06-27 00:19+0000\n"
11-
"PO-Revision-Date: 2023-09-04 10:25+0800\n"
11+
"PO-Revision-Date: 2023-09-04 21:35+0800\n"
1212
"Last-Translator: RockLeon <therockleona@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -94,234 +94,262 @@ msgid ""
9494
"\"Type System Reference\" section of `the mypy docs <https://mypy."
9595
"readthedocs.io/en/stable/index.html>`_"
9696
msgstr ""
97-
"\\ `mypy 文件 <https://mypy.readthedocs.io/en/stable/index.html>`_ \\的 "
98-
"\"Type System Reference\" 章節"
97+
"`mypy 文件 <https://mypy.readthedocs.io/en/stable/index.html>`_ \\\"型別"
98+
"系統參照 (Type System Reference)\" 章節"
9999

100100
#: ../../library/typing.rst:53
101101
msgid ""
102102
"The Python typing system is standardised via PEPs, so this reference should "
103103
"broadly apply to most Python type checkers. (Some parts may still be "
104104
"specific to mypy.)"
105105
msgstr ""
106+
"Python 的型別系統是基於 PEPs 進行標準化,所以這個參照 (reference) 應該在多數 "
107+
"Python 型別檢查器中廣為使用。(某些部分依然是特定給 mypy 使用。)"
106108

107109
#: ../../library/typing.rst:59
108110
msgid ""
109111
"`\"Static Typing with Python\" <https://typing.readthedocs.io/en/latest/>`_"
110112
msgstr ""
113+
"`\"Python 的靜態型別 (Static Typing)\" <https://typing.readthedocs.io/en/"
114+
"latest/>`_"
111115

112116
#: ../../library/typing.rst:58
113117
msgid ""
114118
"Type-checker-agnostic documentation written by the community detailing type "
115119
"system features, useful typing related tools and typing best practices."
116120
msgstr ""
121+
"由社群編寫的跨平台型別檢查器文件 (type-checker-agnostic) 詳細描述型別系統的功"
122+
"能、實用的型別衍伸工具、以及型別的最佳實踐 (best practice)。"
117123

118124
#: ../../library/typing.rst:65
119125
msgid "Relevant PEPs"
120-
msgstr ""
126+
msgstr "相關的 PEPs"
121127

122128
#: ../../library/typing.rst:67
123129
msgid ""
124130
"Since the initial introduction of type hints in :pep:`484` and :pep:`483`, a "
125131
"number of PEPs have modified and enhanced Python's framework for type "
126132
"annotations:"
127133
msgstr ""
134+
"自從 :pep:`484` 及 :pep:`483` 對於型別提示的基礎介紹,多個 PEPs 針對型別註釋"
135+
"的 Python 框架進行修訂及加強:"
128136

129137
#: ../../library/typing.rst:77
130138
msgid ":pep:`526`: Syntax for Variable Annotations"
131-
msgstr ""
139+
msgstr ":pep:`526`: 變數註釋的語法"
132140

133141
#: ../../library/typing.rst:77
134142
msgid ""
135143
"*Introducing* syntax for annotating variables outside of function "
136144
"definitions, and :data:`ClassVar`"
137-
msgstr ""
145+
msgstr "*介紹*在定義函式之外的變數註釋語法,以及 :data:`ClassVar`"
138146

139147
#: ../../library/typing.rst:80
140148
msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)"
141149
msgstr ""
150+
":pep:`544`: 協定:建構式子型別 (Structural Subtyping) (靜態鴨子類型,Static "
151+
"Duck Typing)"
142152

143153
#: ../../library/typing.rst:80
144154
msgid ""
145155
"*Introducing* :class:`Protocol` and the :func:"
146156
"`@runtime_checkable<runtime_checkable>` decorator"
147157
msgstr ""
158+
"*介紹* :class:`Protocol` 以及 func:`@runtime_checkable<runtime_checkable>` 裝"
159+
"飾器 (decorator)"
148160

149161
#: ../../library/typing.rst:83
150162
msgid ":pep:`585`: Type Hinting Generics In Standard Collections"
151163
msgstr ""
164+
":pep:`585`: 基礎集合中的型別提示泛型 (Type Hinting Generics In Standard "
165+
"Collections)"
152166

153167
#: ../../library/typing.rst:83
154168
msgid ""
155169
"*Introducing* :class:`types.GenericAlias` and the ability to use standard "
156170
"library classes as :ref:`generic types<types-genericalias>`"
157171
msgstr ""
172+
"*介紹* :class:`types.GenericAlias` 以及使用基礎函式庫類別 :ref:`generic "
173+
"types<types-genericalias>` 的能力"
158174

159175
#: ../../library/typing.rst:85
160176
msgid ":pep:`586`: Literal Types"
161-
msgstr ""
177+
msgstr ":pep:`586`: 文字型別"
162178

163179
#: ../../library/typing.rst:86
164180
msgid "*Introducing* :data:`Literal`"
165-
msgstr ""
181+
msgstr "*介紹* :data:`Literal`"
166182

167183
#: ../../library/typing.rst:87
168184
msgid ""
169185
":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys"
170-
msgstr ""
186+
msgstr ":pep:`589`: TypedDict:含有一組固定 (fixed) 鍵值的型別提示字典"
171187

172188
#: ../../library/typing.rst:88
173189
msgid "*Introducing* :class:`TypedDict`"
174-
msgstr ""
190+
msgstr "*介紹* :class:`TypedDict`"
175191

176192
#: ../../library/typing.rst:89
177193
msgid ":pep:`591`: Adding a final qualifier to typing"
178-
msgstr ""
194+
msgstr ":pep:`591`: 為型別新增一個最終限定符 (final qualifier)"
179195

180196
#: ../../library/typing.rst:90
181197
msgid "*Introducing* :data:`Final` and the :func:`@final<final>` decorator"
182-
msgstr ""
198+
msgstr "*介紹* :data:`Final` 以及 :func:`@final<final>` 裝飾器"
183199

184200
#: ../../library/typing.rst:91
185201
msgid ":pep:`593`: Flexible function and variable annotations"
186-
msgstr ""
202+
msgstr ":pep:`593`: 彈性函式及變數註釋"
187203

188204
#: ../../library/typing.rst:92
189205
msgid "*Introducing* :data:`Annotated`"
190-
msgstr ""
206+
msgstr "*介紹* :data:`Annotated`"
191207

192208
#: ../../library/typing.rst:95
193209
msgid ":pep:`604`: Allow writing union types as ``X | Y``"
194-
msgstr ""
210+
msgstr ":pep:`604`: 允許寫入聯合型別 (union type) 為 ``X | Y``"
195211

196212
#: ../../library/typing.rst:94
197213
msgid ""
198214
"*Introducing* :data:`types.UnionType` and the ability to use the binary-or "
199215
"operator ``|`` to signify a :ref:`union of types<types-union>`"
200216
msgstr ""
217+
"*介紹* :data:`types.UnionType` 以及使用 binary-or 運算子 ``|`` 以表示 :ref:`"
218+
"型別聯合 <types-union>` 的能力"
201219

202220
#: ../../library/typing.rst:97
203221
msgid ":pep:`612`: Parameter Specification Variables"
204-
msgstr ""
222+
msgstr ":pep:`612`: 參數規格變數 (Parameter Specification Variable)"
205223

206224
#: ../../library/typing.rst:98
207225
msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`"
208-
msgstr ""
226+
msgstr "*介紹* :class:`ParamSpec` 及 :data:`Concatenate`"
209227

210228
#: ../../library/typing.rst:99
211229
msgid ":pep:`613`: Explicit Type Aliases"
212-
msgstr ""
230+
msgstr ":pep:`613`: 顯式型別別名 (Explicit Type Alias)"
213231

214232
#: ../../library/typing.rst:100
215233
msgid "*Introducing* :data:`TypeAlias`"
216-
msgstr "*引入* :data:`TypeAlias`"
234+
msgstr "*介紹* :data:`TypeAlias`"
217235

218236
#: ../../library/typing.rst:101
219237
msgid ":pep:`646`: Variadic Generics"
220-
msgstr ""
238+
msgstr ":pep:`646`: 可變的泛型 (Variadic Generic)"
221239

222240
#: ../../library/typing.rst:102
223241
msgid "*Introducing* :data:`TypeVarTuple`"
224-
msgstr "*引入* :data:`TypeVarTuple`"
242+
msgstr "*介紹* :data:`TypeVarTuple`"
225243

226244
#: ../../library/typing.rst:103
227245
msgid ":pep:`647`: User-Defined Type Guards"
228-
msgstr ""
246+
msgstr ":pep:`647`: 使用者定義的型別護衛 (Type Guard)"
229247

230248
#: ../../library/typing.rst:104
231249
msgid "*Introducing* :data:`TypeGuard`"
232-
msgstr "*引入* :data:`TypeGuard`"
250+
msgstr "*介紹* :data:`TypeGuard`"
233251

234252
#: ../../library/typing.rst:105
235253
msgid ""
236254
":pep:`655`: Marking individual TypedDict items as required or potentially "
237255
"missing"
238-
msgstr ""
256+
msgstr ":pep:`655`: 標記個別的 TypedDict 物件為必需的或可能遺失的"
239257

240258
#: ../../library/typing.rst:106
241259
msgid "*Introducing* :data:`Required` and :data:`NotRequired`"
242-
msgstr "*引入* :data:`Required` 和 :data:`NotRequired`"
260+
msgstr "*介紹* :data:`Required` 和 :data:`NotRequired`"
243261

244262
#: ../../library/typing.rst:107
245263
msgid ":pep:`673`: Self type"
246-
msgstr ""
264+
msgstr ":pep:`673`: Self 型別"
247265

248266
#: ../../library/typing.rst:108
249267
msgid "*Introducing* :data:`Self`"
250-
msgstr "*引入* :data:`Self`"
268+
msgstr "*介紹* :data:`Self`"
251269

252270
#: ../../library/typing.rst:109
253271
msgid ":pep:`675`: Arbitrary Literal String Type"
254-
msgstr ""
272+
msgstr ":pep:`675`: 任意字串型別 (Arbitrary Literal String Type)"
255273

256274
#: ../../library/typing.rst:110
257275
msgid "*Introducing* :data:`LiteralString`"
258-
msgstr "*引入* :data:`LiteralString`"
276+
msgstr "*介紹* :data:`LiteralString`"
259277

260278
#: ../../library/typing.rst:111
261279
msgid ":pep:`681`: Data Class Transforms"
262-
msgstr ""
280+
msgstr ":pep:`681`: 資料類別轉換"
263281

264282
#: ../../library/typing.rst:112
265283
msgid ""
266284
"*Introducing* the :func:`@dataclass_transform<dataclass_transform>` decorator"
267-
msgstr "*引入* :func:`@dataclass_transform<dataclass_transform>` 裝飾器"
285+
msgstr "*介紹* :func:`@dataclass_transform<dataclass_transform>` 裝飾器"
268286

269287
#: ../../library/typing.rst:114
270288
msgid ":pep:`692`: Using ``TypedDict`` for more precise ``**kwargs`` typing"
271-
msgstr ""
289+
msgstr ":pep:`692`: 為更精準的 ``**kwargs`` 型別使用 ``TypedDict``"
272290

273291
#: ../../library/typing.rst:114
274292
msgid ""
275293
"*Introducing* a new way of typing ``**kwargs`` with :data:`Unpack` and :data:"
276294
"`TypedDict`"
277295
msgstr ""
296+
"*介紹* 型別 ``**kwargs`` 的新方式 :data:`Unpack` 以及 :data:`TypedDict`"
278297

279298
#: ../../library/typing.rst:116
280299
msgid ":pep:`695`: Type Parameter Syntax"
281-
msgstr ""
300+
msgstr ":pep:`695`: 型別參數語法"
282301

283302
#: ../../library/typing.rst:117
284303
msgid ""
285304
"*Introducing* builtin syntax for creating generic functions, classes, and "
286305
"type aliases."
287-
msgstr ""
306+
msgstr "*介紹*建立泛型函式、類別、型別別名的內建語法。"
288307

289308
#: ../../library/typing.rst:119
290309
msgid ":pep:`698`: Adding an override decorator to typing"
291-
msgstr ""
310+
msgstr ":pep:`698`: 為型別新增可覆寫的裝飾器"
292311

293312
#: ../../library/typing.rst:119
294313
msgid "*Introducing* the :func:`@override<override>` decorator"
295-
msgstr "*引入* :func:`@override<override>` 裝飾器"
314+
msgstr "*介紹* :func:`@override<override>` 裝飾器"
296315

297316
#: ../../library/typing.rst:129
298317
msgid "Type aliases"
299-
msgstr ""
318+
msgstr "型別別名"
300319

301320
#: ../../library/typing.rst:131
302321
msgid ""
303322
"A type alias is defined using the :keyword:`type` statement, which creates "
304323
"an instance of :class:`TypeAliasType`. In this example, ``Vector`` and "
305324
"``list[float]`` will be treated equivalently by static type checkers::"
306325
msgstr ""
326+
"一個型別別名被定義來使用 keyword:`type` 陳述式,其建立了 :class:"
327+
"`TypeAliasType` 的實例。在這個範例中,``Vector`` 及 ``list[float]`` 會被當作"
328+
"和靜態型別檢查器一樣同等對待: ::"
307329

308330
#: ../../library/typing.rst:144
309331
msgid ""
310332
"Type aliases are useful for simplifying complex type signatures. For "
311333
"example::"
312334
msgstr ""
335+
"類別別名對於簡化複雜的型別簽章 (complex type signature) 非常好用。舉例來"
336+
"說: ::"
313337

314338
#: ../../library/typing.rst:162
315339
msgid ""
316340
"The :keyword:`type` statement is new in Python 3.12. For backwards "
317341
"compatibility, type aliases can also be created through simple assignment::"
318342
msgstr ""
343+
":keyword:`type` 陳述句是 Python 3.12 的新功能。為了向後相容性,型別別名可以透"
344+
"過簡單的賦值來建立: ::"
319345

320346
#: ../../library/typing.rst:167
321347
msgid ""
322348
"Or marked with :data:`TypeAlias` to make it explicit that this is a type "
323349
"alias, not a normal variable assignment::"
324350
msgstr ""
351+
"或是用 :data:`TypeAlias` 標記,讓它明確的表示這是一個型別別名,而非一般的變數"
352+
"賦值: ::"
325353

326354
#: ../../library/typing.rst:177
327355
msgid "NewType"

0 commit comments

Comments
 (0)