Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09d5136

Browse files
authored
Translate library/typing.po from 'Intro' to 'Type Alias' (#646)
* Nearly Finish in Intro Section* Finish Translate from 'Intro' to 'Type Alias'* Update with Syntax Error* Fix with Reviewer's Comment* Fix with Reviewer's Comment @ rst:162* Fix with Reviewer's Comment @ rst:117* Updated with Reviewer's comment
1 parentd444dc1 commit09d5136

File tree

1 file changed

+77
-41
lines changed

1 file changed

+77
-41
lines changed

‎library/typing.po

Lines changed: 77 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ 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:2018-05-23 16:14+0000\n"
12-
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
11+
"PO-Revision-Date:2023-09-05 14:49+0800\n"
12+
"Last-Translator:RockLeon <therockleona@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
1515
"Language:zh_TW\n"
1616
"MIME-Version:1.0\n"
1717
"Content-Type:text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding:8bit\n"
1919
"Plural-Forms:nplurals=1; plural=0;\n"
20+
"X-Generator:Poedit 3.3.1\n"
2021

2122
#:../../library/typing.rst:3
2223
msgid":mod:`typing` --- Support for type hints"
23-
msgstr""
24+
msgstr":mod:`typing` --- 支援型別提示"
2425

2526
#:../../library/typing.rst:16
2627
msgid"**Source code:** :source:`Lib/typing.py`"
@@ -32,184 +33,217 @@ msgid ""
3233
"They can be used by third party tools such as type checkers, IDEs, linters, "
3334
"etc."
3435
msgstr""
36+
"Python 執行環境不強制要求函式與變數的型別註釋。他們可以被第三方工具使用,如:"
37+
"型別檢查器、IDE、linter 等。"
3538

3639
#:../../library/typing.rst:26
3740
msgid""
3841
"This module provides runtime support for type hints. For the original "
3942
"specification of the typing system, see :pep:`484`. For a simplified "
4043
"introduction to type hints, see :pep:`483`."
4144
msgstr""
45+
"這個模組提供可以支援型別提示的 runtime。關於加註型別系統的原有規格"
46+
",請看 :pep:`484`。關於型別提示的簡易介紹,請看 :pep:`483`。"
4247

4348
#:../../library/typing.rst:31
4449
msgid""
4550
"The function below takes and returns a string and is annotated as follows::"
46-
msgstr""
51+
msgstr"以下函式接受及回傳都是使用字串,且註解方式如下: ::"
4752

4853
#:../../library/typing.rst:36
4954
msgid""
5055
"In the function ``greeting``, the argument ``name`` is expected to be of "
5156
"type :class:`str` and the return type :class:`str`. Subtypes are accepted as "
5257
"arguments."
5358
msgstr""
59+
"在函式 ``greeting`` 當中,引數 ``name`` 的型別應為 :class:`str` 且回傳的型別"
60+
"也是 :class:`str`。該引數也可以接受其子型別。"
5461

5562
#:../../library/typing.rst:40
5663
msgid""
5764
"New features are frequently added to the ``typing`` module. The "
5865
"`typing_extensions <https://pypi.org/project/typing-extensions/>`_ package "
5966
"provides backports of these new features to older versions of Python."
6067
msgstr""
68+
"新功能會頻繁的新增至 ``typing`` 模組中。`typing_extensions <https://pypi.org/"
69+
"project/typing-extensions/>`_ 套件為這些新功能提供了 backport(向後移植的)版"
70+
"本,提供給舊版本的 Python 使用。"
6171

6272
#:../../library/typing.rst:44
6373
msgid""
6474
"For a summary of deprecated features and a deprecation timeline, please see "
6575
"`Deprecation Timeline of Major Features`_."
6676
msgstr""
77+
"棄用功能及其棄用時間線的簡介,請看\\ `Deprecation Timeline of Major "
78+
"Features`_\\。"
6779

6880
#:../../library/typing.rst:50
6981
msgid""
7082
"`\"Typing cheat sheet\" <https://mypy.readthedocs.io/en/stable/"
7183
"cheat_sheet_py3.html>`_"
7284
msgstr""
85+
"`\"型別小抄 (Typing cheat sheet)\" <https://mypy.readthedocs.io/en/stable/"
86+
"cheat_sheet_py3.html>`_"
7387

7488
#:../../library/typing.rst:50
7589
msgid"A quick overview of type hints (hosted at the mypy docs)"
76-
msgstr""
90+
msgstr"型別提示的快速預覽(發布於 mypy 的文件中)"
7791

7892
#:../../library/typing.rst:55
7993
msgid""
8094
"\"Type System Reference\" section of `the mypy docs <https://mypy."
8195
"readthedocs.io/en/stable/index.html>`_"
8296
msgstr""
97+
"`mypy 文件 <https://mypy.readthedocs.io/en/stable/index.html>`_\\\"型別系"
98+
"統參考資料 (Type System Reference)\" 章節"
8399

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

91109
#:../../library/typing.rst:59
92110
msgid""
93111
"`\"Static Typing with Python\" <https://typing.readthedocs.io/en/latest/>`_"
94112
msgstr""
113+
"`\"Python 的靜態型別 (Static Typing)\" <https://typing.readthedocs.io/en/"
114+
"latest/>`_"
95115

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

102124
#:../../library/typing.rst:65
103125
msgid"Relevant PEPs"
104-
msgstr""
126+
msgstr"相關的 PEPs"
105127

106128
#:../../library/typing.rst:67
107129
msgid""
108130
"Since the initial introduction of type hints in :pep:`484` and :pep:`483`, a "
109131
"number of PEPs have modified and enhanced Python's framework for type "
110132
"annotations:"
111133
msgstr""
134+
"自從 :pep:`484` 及 :pep:`483` 對於型別提示的基礎引入,多個 PEPs 針對型別註釋"
135+
"的 Python 框架進行修訂及加強:"
112136

113137
#:../../library/typing.rst:77
114138
msgid":pep:`526`: Syntax for Variable Annotations"
115-
msgstr""
139+
msgstr":pep:`526`:變數註釋的語法"
116140

117141
#:../../library/typing.rst:77
118142
msgid""
119143
"*Introducing* syntax for annotating variables outside of function "
120144
"definitions, and :data:`ClassVar`"
121-
msgstr""
145+
msgstr"*引入*\\ 在定義函式之外的變數註釋語法,以及 :data:`ClassVar`"
122146

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

127153
#:../../library/typing.rst:80
128154
msgid""
129155
"*Introducing* :class:`Protocol` and the :func:"
130156
"`@runtime_checkable<runtime_checkable>` decorator"
131157
msgstr""
158+
"*引入* :class:`Protocol` 以及 :func:`@runtime_checkable<runtime_checkable>` "
159+
"裝飾器 (decorator)"
132160

133161
#:../../library/typing.rst:83
134162
msgid":pep:`585`: Type Hinting Generics In Standard Collections"
135163
msgstr""
164+
":pep:`585`:基礎彙集 (collection) 中的型別提示泛型 (Type Hinting Generics In "
165+
"Standard Collections)"
136166

137167
#:../../library/typing.rst:83
138168
msgid""
139169
"*Introducing* :class:`types.GenericAlias` and the ability to use standard "
140170
"library classes as :ref:`generic types<types-genericalias>`"
141171
msgstr""
172+
"*引入* :class:`types.GenericAlias` 以及使用基礎函式庫類別 :ref:`generic "
173+
"types<types-genericalias>` 的能力"
142174

143175
#:../../library/typing.rst:85
144176
msgid":pep:`586`: Literal Types"
145-
msgstr""
177+
msgstr":pep:`586`:文字型別"
146178

147179
#:../../library/typing.rst:86
148180
msgid"*Introducing* :data:`Literal`"
149-
msgstr""
181+
msgstr"*引入* :data:`Literal`"
150182

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

156188
#:../../library/typing.rst:88
157189
msgid"*Introducing* :class:`TypedDict`"
158-
msgstr""
190+
msgstr"*引入* :class:`TypedDict`"
159191

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

164196
#:../../library/typing.rst:90
165197
msgid"*Introducing* :data:`Final` and the :func:`@final<final>` decorator"
166-
msgstr""
198+
msgstr"*引入* :data:`Final` 以及 :func:`@final<final>` 裝飾器"
167199

168200
#:../../library/typing.rst:91
169201
msgid":pep:`593`: Flexible function and variable annotations"
170-
msgstr""
202+
msgstr":pep:`593`:彈性函式及變數註釋"
171203

172204
#:../../library/typing.rst:92
173205
msgid"*Introducing* :data:`Annotated`"
174-
msgstr""
206+
msgstr"*引入* :data:`Annotated`"
175207

176208
#:../../library/typing.rst:95
177209
msgid":pep:`604`: Allow writing union types as ``X | Y``"
178-
msgstr""
210+
msgstr":pep:`604`:允許寫入聯集型別 (union type) 為 ``X | Y``"
179211

180212
#:../../library/typing.rst:94
181213
msgid""
182214
"*Introducing* :data:`types.UnionType` and the ability to use the binary-or "
183215
"operator ``|`` to signify a :ref:`union of types<types-union>`"
184216
msgstr""
217+
"*引入* :data:`types.UnionType` 以及使用 binary-or 運算子 ``|`` 以表示\\ :ref:"
218+
"`型別聯合 <types-union>`\\ 的能力"
185219

186220
#:../../library/typing.rst:97
187221
msgid":pep:`612`: Parameter Specification Variables"
188-
msgstr""
222+
msgstr":pep:`612`:參數規格變數 (Parameter Specification Variable)"
189223

190224
#:../../library/typing.rst:98
191225
msgid"*Introducing* :class:`ParamSpec` and :data:`Concatenate`"
192-
msgstr""
226+
msgstr"*引入* :class:`ParamSpec` 及 :data:`Concatenate`"
193227

194228
#:../../library/typing.rst:99
195229
msgid":pep:`613`: Explicit Type Aliases"
196-
msgstr""
230+
msgstr":pep:`613`:顯式型別別名 (Explicit Type Alias)"
197231

198232
#:../../library/typing.rst:100
199233
msgid"*Introducing* :data:`TypeAlias`"
200234
msgstr"*引入* :data:`TypeAlias`"
201235

202236
#:../../library/typing.rst:101
203237
msgid":pep:`646`: Variadic Generics"
204-
msgstr""
238+
msgstr":pep:`646`:可變參數泛型 (Variadic Generic)"
205239

206240
#:../../library/typing.rst:102
207241
msgid"*Introducing* :data:`TypeVarTuple`"
208242
msgstr"*引入* :data:`TypeVarTuple`"
209243

210244
#:../../library/typing.rst:103
211245
msgid":pep:`647`: User-Defined Type Guards"
212-
msgstr""
246+
msgstr":pep:`647`:使用者定義的型別防護 (Type Guard)"
213247

214248
#:../../library/typing.rst:104
215249
msgid"*Introducing* :data:`TypeGuard`"
@@ -219,31 +253,31 @@ msgstr "*引入* :data:`TypeGuard`"
219253
msgid""
220254
":pep:`655`: Marking individual TypedDict items as required or potentially "
221255
"missing"
222-
msgstr""
256+
msgstr":pep:`655`:標記個別的 TypedDict 物件為必需的或可能遺失的"
223257

224258
#:../../library/typing.rst:106
225259
msgid"*Introducing* :data:`Required` and :data:`NotRequired`"
226260
msgstr"*引入* :data:`Required` 和 :data:`NotRequired`"
227261

228262
#:../../library/typing.rst:107
229263
msgid":pep:`673`: Self type"
230-
msgstr""
264+
msgstr":pep:`673`:Self 型別"
231265

232266
#:../../library/typing.rst:108
233267
msgid"*Introducing* :data:`Self`"
234268
msgstr"*引入* :data:`Self`"
235269

236270
#:../../library/typing.rst:109
237271
msgid":pep:`675`: Arbitrary Literal String Type"
238-
msgstr""
272+
msgstr":pep:`675`:任意的文本字串型別 (Arbitrary Literal String Type)"
239273

240274
#:../../library/typing.rst:110
241275
msgid"*Introducing* :data:`LiteralString`"
242276
msgstr"*引入* :data:`LiteralString`"
243277

244278
#:../../library/typing.rst:111
245279
msgid":pep:`681`: Data Class Transforms"
246-
msgstr""
280+
msgstr":pep:`681`:資料類別轉換"
247281

248282
#:../../library/typing.rst:112
249283
msgid""
@@ -252,60 +286,70 @@ msgstr "*引入* :func:`@dataclass_transform<dataclass_transform>` 裝飾器"
252286

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

257291
#:../../library/typing.rst:114
258292
msgid""
259293
"*Introducing* a new way of typing ``**kwargs`` with :data:`Unpack` and :data:"
260294
"`TypedDict`"
261295
msgstr""
296+
"*引入* 型別 ``**kwargs`` 的新方式 :data:`Unpack` 以及 :data:`TypedDict`"
262297

263298
#:../../library/typing.rst:116
264299
msgid":pep:`695`: Type Parameter Syntax"
265-
msgstr""
300+
msgstr":pep:`695`:型別參數語法"
266301

267302
#:../../library/typing.rst:117
268303
msgid""
269304
"*Introducing* builtin syntax for creating generic functions, classes, and "
270305
"type aliases."
271-
msgstr""
306+
msgstr"*引入*\\ 建立泛型函式、類別、型別別名的內建語法。"
272307

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

277312
#:../../library/typing.rst:119
278313
msgid"*Introducing* the :func:`@override<override>` decorator"
279314
msgstr"*引入* :func:`@override<override>` 裝飾器"
280315

281316
#:../../library/typing.rst:129
282317
msgid"Type aliases"
283-
msgstr""
318+
msgstr"型別別名"
284319

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

292330
#:../../library/typing.rst:144
293331
msgid""
294332
"Type aliases are useful for simplifying complex type signatures. For "
295333
"example::"
296334
msgstr""
335+
"型別別名對於簡化複雜的型別簽名 (complex type signature) 非常好用。舉例來"
336+
"說: ::"
297337

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

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

310354
#:../../library/typing.rst:177
311355
msgid"NewType"
@@ -407,9 +451,9 @@ msgstr ""
407451

408452
#:../../library/typing.rst:254../../library/typing.rst:2679
409453
msgid"For example:"
410-
msgstr"舉例來說"
454+
msgstr"舉例來說"
411455

412-
#:../../library/typing.rst:272
456+
#:../../library/typing.rst:272../../library/typing.rst:995
413457
msgid""
414458
"The subscription syntax must always be used with exactly two values: the "
415459
"argument list and the return type. The argument list must be a list of "
@@ -992,14 +1036,6 @@ msgid ""
9921036
"of type :class:`int` and returns a :class:`str`."
9931037
msgstr""
9941038

995-
#:../../library/typing.rst:995
996-
msgid""
997-
"The subscription syntax must always be used with exactly two values: the "
998-
"argument list and the return type. The argument list must be a list of "
999-
"types, a :class:`ParamSpec`, :data:`Concatenate`, or an ellipsis. The return "
1000-
"type must be a single type."
1001-
msgstr""
1002-
10031039
#:../../library/typing.rst:1000
10041040
msgid""
10051041
"There is no syntax to indicate optional or keyword arguments; such function "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp