Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a227f1e

Browse files
[po] auto sync
1 parent d219023 commit a227f1e

8 files changed

Lines changed: 84 additions & 50 deletions

File tree

library/asyncio-task.po

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,12 @@ msgid ""
488488
"Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws* iterable "
489489
"concurrently and block until the condition specified by *return_when*."
490490
msgstr ""
491+
"并发地运行 *aws* 可迭代对象中的 :ref:`可等待对象 <asyncio-awaitables>` 并进入阻塞状态直到满足 "
492+
"*return_when* 所指定的条件。"
491493

492494
#: ../../library/asyncio-task.rst:510
493495
msgid "The *aws* iterable must not be empty."
494-
msgstr ""
496+
msgstr "*aws* 可迭代对象必须不为空。"
495497

496498
#: ../../library/asyncio-task.rst:512
497499
msgid "Returns two sets of Tasks/Futures: ``(done, pending)``."
@@ -595,6 +597,8 @@ msgid ""
595597
" be awaited to get the earliest next result from the iterable of the "
596598
"remaining awaitables."
597599
msgstr ""
600+
"并发地运行 *aws* 可迭代对象中的 :ref:`可等待对象 <asyncio-awaitables>`。 返回一个协程的迭代器。 "
601+
"所返回的每个协程可被等待以从剩余的可等待对象的可迭代对象中获得最早的下一个结果。"
598602

599603
#: ../../library/asyncio-task.rst:600
600604
msgid ""
@@ -617,6 +621,8 @@ msgid ""
617621
"allowing context variables from the event loop thread to be accessed in the "
618622
"separate thread."
619623
msgstr ""
624+
"向此函数提供的任何 \\*args 和 \\*\\*kwargs 会被直接传给 *func*。 并且,当前 "
625+
":class:`contextvars.Context` 会被传播,允许在不同的线程中访问来自事件循环的上下文变量。"
620626

621627
#: ../../library/asyncio-task.rst:625
622628
msgid ""

library/gettext.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,8 @@ msgid ""
705705
"wrapping it in ``_('...')`` --- that is, a call to the function :func:`_`. "
706706
"For example::"
707707
msgstr ""
708+
"为了准备代码以达成 I18N,需要巡视文件中的所有字符串。所有要翻译的字符串都应包括在 ``_('...')`` 内,以此打上标记——也就是调用 "
709+
":func:`_` 函数。例如::"
708710

709711
#: ../../library/gettext.rst:524
710712
msgid ""

library/multiprocessing.po

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ msgid ""
132132
"Starting a process using this method is rather slow compared to using *fork*"
133133
" or *forkserver*."
134134
msgstr ""
135+
"父进程会启动一个全新的 python 解释器进程。 子进程将只继承那些运行进程对象的 :meth:`~Process.run` 方法所必需的资源。 "
136+
"特别地,来自父进程的非必需文件描述符和句柄将不会被继承。 使用此方法启动进程相比使用 *fork* 或 *forkserver* 要慢上许多。"
135137

136138
#: ../../library/multiprocessing.rst:106
137139
msgid "Available on Unix and Windows. The default on Windows and macOS."
@@ -3193,6 +3195,9 @@ msgid ""
31933195
"use an address of the form "
31943196
":samp:`r'\\\\\\\\{ServerName}\\\\pipe\\\\{PipeName}'` instead."
31953197
msgstr ""
3198+
"``'AF_PIPE'`` 地址是一个 :samp:`r'\\\\\\\\.\\\\pipe\\\\{PipeName}'` 形式的字符串。 要使用 "
3199+
":func:`Client` 来连接到远程计算机上一个名为 *ServerName* 的命名管道,则应当改用 "
3200+
":samp:`r'\\\\\\\\{ServerName}\\\\pipe\\\\{PipeName}'` 形式的地址。"
31963201

31973202
#: ../../library/multiprocessing.rst:2576
31983203
msgid ""
@@ -3321,6 +3326,8 @@ msgid ""
33213326
"which is a subclass of :class:`Pool` that supports all the same method calls"
33223327
" but uses a pool of worker threads rather than worker processes."
33233328
msgstr ""
3329+
"特别地,:mod:`multiprocessing.dummy` 所提供的 ``Pool`` 函数会返回一个 :class:`ThreadPool` "
3330+
"的实例,该类是 :class:`Pool` 的子类,它支持所有相同的方法调用但会使用一个工作线程池而非工作进程池。"
33243331

33253332
#: ../../library/multiprocessing.rst:2674
33263333
msgid ""

library/string.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ msgid ""
576576
"these conversions only if a digit follows it. In addition, for ``'g'`` and "
577577
"``'G'`` conversions, trailing zeros are not removed from the result."
578578
msgstr ""
579+
"``'#'`` 选项可以让“替代形式”被用于转换。 替代形式会针对不同类型分别定义。 此选项仅对整数、浮点数和复数类型有效。 "
580+
"对于整数类型,当使用二进制、八进制或十六进制输出时,此选项会为输出值分别添加相应的 ``'0b'``, ``'0o'``, or ``'0x'`` "
581+
"前缀。 对于浮点数和复数类型,替代形式会使得转换结果总是包含小数点符号,即使其不带小数部分。 "
582+
"通常只有在带有小数部分的情况下,此类转换的结果中才会出现小数点符号。 此外,对于 ``'g'`` 和 ``'G'`` 转换,末尾的零不会从结果中被移除。"
579583

580584
#: ../../library/string.rst:399
581585
msgid ""
@@ -751,7 +755,7 @@ msgstr ""
751755
msgid ""
752756
"The available presentation types for :class:`float` and "
753757
":class:`~decimal.Decimal` values are:"
754-
msgstr ""
758+
msgstr ":class:`float` 和 :class:`~decimal.Decimal` 值的可用表示类型有:"
755759

756760
#: ../../library/string.rst:485
757761
msgid "``'e'``"

library/typing.po

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# ppcfish <[email protected]>, 2019
1313
# Meng Du <[email protected]>, 2020
1414
# MuSheng Chen <[email protected]>, 2020
15-
# Freesand Leo <[email protected]>, 2020
1615
# Siyuan Xu <[email protected]>, 2020
16+
# Freesand Leo <[email protected]>, 2020
1717
# jaystone776, 2020
1818
#
1919
#, fuzzy
@@ -143,21 +143,21 @@ msgstr "更确切地说,表达式 ``some_value is Derived(some_value)`` 在运
143143
msgid ""
144144
"This also means that it is not possible to create a subtype of ``Derived`` "
145145
"since it is an identity function at runtime, not an actual type::"
146-
msgstr "这也意味着无法创建 ``Derived`` 的子类型,因为它是运行时的标识函数,而不是实际的类型::"
146+
msgstr "并且也无法为 ``Derived`` 创建子类型,因为在运行时,它是标识函数,而不是真正的类型::"
147147

148148
#: ../../library/typing.rst:123
149149
msgid ""
150150
"However, it is possible to create a :func:`NewType` based on a 'derived' "
151151
"``NewType``::"
152-
msgstr "但是,可以基于'derived' ``NewType`` 创建 :func:`NewType` ::"
152+
msgstr "但是,可基于'derived' ``NewType`` 创建 :func:`NewType` ::"
153153

154154
#: ../../library/typing.rst:131
155155
msgid "and typechecking for ``ProUserId`` will work as expected."
156-
msgstr "并且 ``ProUserId`` 的类型检查将按预期工作。"
156+
msgstr "并且 ``ProUserId`` 的类型检查也能正常运行。"
157157

158158
#: ../../library/typing.rst:133
159159
msgid "See :pep:`484` for more details."
160-
msgstr "有关更多详细信息,请参阅 :pep:`484`。"
160+
msgstr "详情请参阅 :pep:`484`。"
161161

162162
#: ../../library/typing.rst:137
163163
msgid ""
@@ -166,8 +166,8 @@ msgid ""
166166
"treat ``Alias`` as being *exactly equivalent* to ``Original`` in all cases. "
167167
"This is useful when you want to simplify complex type signatures."
168168
msgstr ""
169-
"回想一下,使用类型别名声明两种类型彼此 *等效* ``Alias = Original`` 将使静态类型检查对待所有情况下 ``Alias`` "
170-
"*完全等同于* ``Original``。当您想简化复杂类型签名时,这很有用。"
169+
"回想一下,类型别名声明了两种彼此 *等效* 的类型。 ``Alias = Original`` 使得静态类型检查器在所有情况下把 ``Alias`` "
170+
" ``Original`` 视为 *完全等效*。 简化复杂类型签名时,这种方式很有用。"
171171

172172
#: ../../library/typing.rst:142
173173
msgid ""
@@ -178,9 +178,9 @@ msgid ""
178178
"``Derived`` is expected. This is useful when you want to prevent logic "
179179
"errors with minimal runtime cost."
180180
msgstr ""
181-
"相反,``NewType`` 声明一种类型是另一种类型的子类型。``Derived = NewType('Derived', Original)`` "
182-
"将使静态类型检查器将 ``Derived`` 当作 ``Original`` 的 *子类* ,这意味着 ``Original`` 类型的值不能用于 "
183-
"``Derived`` 类型的值需要的地方。当您想以最小的运行时间成本防止逻辑错误时,这非常有用。"
181+
"反之,``NewType`` 声明把一种类型当作另一种类型的*子类型*。``Derived = NewType('Derived', "
182+
"Original)`` 让静态类型检查器把 ``Derived`` 当作 ``Original`` 的*子类* ,即, ``Original`` "
183+
"类型的值不能用于 ``Derived`` 类型的值需要的地方。以最小运行时成本防止逻辑错误时,这种方式非常有用。"
184184

185185
#: ../../library/typing.rst:152
186186
msgid "Callable"
@@ -191,7 +191,7 @@ msgid ""
191191
"Frameworks expecting callback functions of specific signatures might be type"
192192
" hinted using ``Callable[[Arg1Type, Arg2Type], ReturnType]``."
193193
msgstr ""
194-
"期望特定签名的回调函数的框架可以将类型标注为 ``Callable[[Arg1Type, Arg2Type], ReturnType]``。"
194+
"预期特定签名回调函数的框架可以用 ``Callable[[Arg1Type, Arg2Type], ReturnType]`` 进行类型标注。"
195195

196196
#: ../../library/typing.rst:157
197197
msgid "For example::"
@@ -203,24 +203,25 @@ msgid ""
203203
"the call signature by substituting a literal ellipsis for the list of "
204204
"arguments in the type hint: ``Callable[..., ReturnType]``."
205205
msgstr ""
206-
"通过用文字省略号替换类型提示中的参数列表: ``Callable[...,ReturnType]``,可以声明可调用的返回类型,而无需指定调用签名。"
206+
"无需指定调用签名,只需用字面省略号替换类型提示里的参数列表: ``Callable[..., "
207+
"ReturnType]``,就可以声明可调用对象的返回类型。"
207208

208209
#: ../../library/typing.rst:175
209210
msgid "Generics"
210-
msgstr "泛型(Generic)"
211+
msgstr "泛型Generic"
211212

212213
#: ../../library/typing.rst:177
213214
msgid ""
214215
"Since type information about objects kept in containers cannot be statically"
215216
" inferred in a generic way, abstract base classes have been extended to "
216217
"support subscription to denote expected types for container elements."
217-
msgstr "由于无法以通用方式静态推断有关保存在容器中的对象的类型信息,因此抽象基类已扩展为支持订阅以表示容器元素的预期类型。"
218+
msgstr "鉴于,容器中的对象类型信息不能以泛型方式进行静态推断,扩展的抽象基类支持订阅,用于表示容器元素的预期类型。"
218219

219220
#: ../../library/typing.rst:188
220221
msgid ""
221222
"Generics can be parameterized by using a new factory available in typing "
222223
"called :class:`TypeVar`."
223-
msgstr "泛型可以通过使用typing模块中名为 :class:`TypeVar` 的新工厂进行参数化。"
224+
msgstr "泛型可以用 typing 模块的 :class:`TypeVar` 新工厂函数实现参数化。"
224225

225226
#: ../../library/typing.rst:203
226227
msgid "User-defined generic types"
@@ -236,58 +237,58 @@ msgid ""
236237
"single type parameter ``T`` . This also makes ``T`` valid as a type within "
237238
"the class body."
238239
msgstr ""
239-
"``Generic[T]`` 作为基类定义了类 ``LoggedVar`` 采用单个类型参数 ``T``。这也使得 ``T`` "
240-
"作为类体内的一个类型有效。"
240+
"``Generic[T]`` 是定义 ``LoggedVar`` 类的基类,``LoggedVar`` 类采用单类型参数 "
241+
"``T``。因此,在该类体中,``T`` 是有效的类型。"
241242

242243
#: ../../library/typing.rst:235
243244
msgid ""
244245
"The :class:`Generic` base class defines :meth:`__class_getitem__` so that "
245246
"``LoggedVar[t]`` is valid as a type::"
246247
msgstr ""
247-
":class:`Generic` 基类定义了 :meth:`__class_getitem__` ,使得 ``LoggedVar[t]`` "
248-
"作为类型有效:"
248+
":class:`Generic` 基类定义了 :meth:`__class_getitem__` ,因此,``LoggedVar[t]`` "
249+
"也是有效类型:"
249250

250251
#: ../../library/typing.rst:244
251252
msgid ""
252253
"A generic type can have any number of type variables, and type variables may"
253254
" be constrained::"
254-
msgstr "泛型类型可以有任意数量的类型变量,并且类型变量可能会受到限制::"
255+
msgstr "泛型类型变量的数量不限,但类型变量可能会受限::"
255256

256257
#: ../../library/typing.rst:256
257258
msgid ""
258259
"Each type variable argument to :class:`Generic` must be distinct. This is "
259260
"thus invalid::"
260-
msgstr ":class:`Generic` 每个参数的类型变量必须是不同的。这是无效的::"
261+
msgstr ":class:`Generic` 类型变量的每个参数绝不能相同。下列代码是无效的::"
261262

262263
#: ../../library/typing.rst:267
263264
msgid "You can use multiple inheritance with :class:`Generic`::"
264-
msgstr "您可以对 :class:`Generic` 使用多重继承::"
265+
msgstr ":class:`Generic` 可使用多重继承::"
265266

266267
#: ../../library/typing.rst:277
267268
msgid ""
268269
"When inheriting from generic classes, some type variables could be fixed::"
269-
msgstr "从泛型类继承时,某些类型变量可能是固定的::"
270+
msgstr "从泛型类继承时,有些类型变量可能是固定的::"
270271

271272
#: ../../library/typing.rst:287
272273
msgid "In this case ``MyDict`` has a single parameter, ``T``."
273-
msgstr "在这种情况下,``MyDict`` 只有一个参数,``T``。"
274+
msgstr "本例中,``MyDict`` 调用了单参数,``T``。"
274275

275276
#: ../../library/typing.rst:289
276277
msgid ""
277278
"Using a generic class without specifying type parameters assumes :data:`Any`"
278279
" for each position. In the following example, ``MyIterable`` is not generic "
279280
"but implicitly inherits from ``Iterable[Any]``::"
280281
msgstr ""
281-
"在不指定类型参数的情况下使用泛型类别会为每个位置假设 :data:`Any`。在下面的例子中,``MyIterable`` 不是泛型,但是隐式继承自 "
282-
"``Iterable[Any]``::"
282+
"应用泛型类,但未指定类型参数时,每个位置的类型都会被预设为 :data:`Any`。下例中,``MyIterable`` 虽然不是泛型,但却隐式地继承了"
283+
" ``Iterable[Any]``"
283284

284285
#: ../../library/typing.rst:297
285286
msgid "User defined generic type aliases are also supported. Examples::"
286-
msgstr "用户定义的通用类型别名也受支持。例子::"
287+
msgstr "用户定义的泛型类型别名也受支持。如:"
287288

288289
#: ../../library/typing.rst:314
289290
msgid ":class:`Generic` no longer has a custom metaclass."
290-
msgstr ":class:`Generic` 不再拥有一个自定义的元类。"
291+
msgstr ":class:`Generic` 不再支持自定义元类。"
291292

292293
#: ../../library/typing.rst:317
293294
msgid ""
@@ -296,8 +297,8 @@ msgid ""
296297
"parameterizing generics is cached, and most types in the typing module are "
297298
"hashable and comparable for equality."
298299
msgstr ""
299-
"一个用户定义的泛型类能够使用抽象基本类作为基类,而不会发生元类冲突。泛型元类不再被支持。参数化泛型的结果会被缓存,并且在 typing "
300-
"模块中的大部分类型是可哈希且可比较相等性的。"
300+
"抽象基类可以作为用户定义泛型类的基类,且不会产生元类冲突。泛型的元类已被废弃。参数化泛型的结果会被缓存,typing "
301+
"模块里,大多数类型都可哈希、可实现等效对比。"
301302

302303
#: ../../library/typing.rst:324
303304
msgid "The :data:`Any` type"
@@ -309,8 +310,7 @@ msgid ""
309310
"every type as being compatible with :data:`Any` and :data:`Any` as being "
310311
"compatible with every type."
311312
msgstr ""
312-
":data:`Any` 是一种特殊的类型。静态类型检查器将所有类型视为与 :data:`Any` 兼容,反之亦然, :data:`Any` "
313-
"也与所有类型相兼容。"
313+
":data:`Any` 是一种特殊类型。静态类型检查器认为所有类型均与 :data:`Any` 兼容,同样, :data:`Any` 也与所有类型兼容。"
314314

315315
#: ../../library/typing.rst:330
316316
msgid ""
@@ -517,6 +517,8 @@ msgid ""
517517
":class:`builtins.tuple <tuple>` now supports ``[]``. See :pep:`585` and :ref"
518518
":`types-genericalias`."
519519
msgstr ""
520+
":class:`builtins.tuple <tuple>` 现已支持 ``[]``。 请参阅 :pep:`585` and :ref:`types-"
521+
"genericalias`。"
520522

521523
#: ../../library/typing.rst:517
522524
msgid "Union type; ``Union[X, Y]`` means either X or Y."
@@ -615,6 +617,8 @@ msgid ""
615617
":class:`collections.abc.Callable` now supports ``[]``. See :pep:`585` and "
616618
":ref:`types-genericalias`."
617619
msgstr ""
620+
":class:`collections.abc.Callable` 现已支持 ``[]``。 请参阅 :pep:`585` 与 :ref:`types-"
621+
"genericalias`."
618622

619623
#: ../../library/typing.rst:592
620624
msgid ""
@@ -623,8 +627,8 @@ msgid ""
623627
"classes themselves -- specifically, it will accept the *class object* of "
624628
"``C``. For example::"
625629
msgstr ""
626-
"一个注解为 ``C`` 的变量可以接受一个类型为 ``C`` 的值。相对地,一个注解为 ``Type[C]`` 的变量可以接受本身为类的值 —— "
627-
"更精确地说它接受 ``C`` 的 *类对象* ,例如:"
630+
" ``C`` 标注的变量可以接受类型为 ``C`` 的值。反之,用 ``Type[C]`` 标注的变量可以接受类本身的值 — 准确地说,是接受 "
631+
"``C`` 的 *类对象*,例如:"
628632

629633
#: ../../library/typing.rst:601
630634
msgid "Note that ``Type[C]`` is covariant::"
@@ -662,6 +666,8 @@ msgid ""
662666
":class:`builtins.type <type>` now supports ``[]``. See :pep:`585` and :ref"
663667
":`types-genericalias`."
664668
msgstr ""
669+
":class:`builtins.type <type>` 现已支持 ``[]``。 请参阅 :pep:`585` and :ref:`types-"
670+
"genericalias`。"
665671

666672
#: ../../library/typing.rst:638
667673
msgid ""
@@ -723,7 +729,7 @@ msgstr "一个特殊的类型构造来指示类型检查器该名称不能被再
723729
msgid ""
724730
"There is no runtime checking of these properties. See :pep:`591` for more "
725731
"details."
726-
msgstr ""
732+
msgstr "这些属性没有运行时检查。详情请参阅 :pep:`591`。"
727733

728734
#: ../../library/typing.rst:711
729735
msgid ""
@@ -781,17 +787,17 @@ msgstr ""
781787

782788
#: ../../library/typing.rst:751
783789
msgid "The details of the syntax:"
784-
msgstr ""
790+
msgstr "语义详情:"
785791

786792
#: ../../library/typing.rst:753
787793
msgid "The first argument to ``Annotated`` must be a valid type"
788-
msgstr ""
794+
msgstr "``Annotated`` 的第一个参数必须是有效类型。"
789795

790796
#: ../../library/typing.rst:755
791797
msgid ""
792798
"Multiple type annotations are supported (``Annotated`` supports variadic "
793799
"arguments)::"
794-
msgstr ""
800+
msgstr "支持多个类型标注 (``Annotated`` 支持可变参数)::"
795801

796802
#: ../../library/typing.rst:760
797803
msgid ""

reference/compound_stmts.po

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ msgid ""
253253
"tuple containing an item that is the class or a base class of the exception "
254254
"object."
255255
msgstr ""
256+
":keyword:`except` 子句指定一个或多个异常处理程序。 当 :keyword:`try` "
257+
"子句中没有发生异常时,没有任何异常处理程序会被执行。 当 :keyword:`!try` 子句中发生异常时,将启动对异常处理程序的搜索。 "
258+
"此搜索会逐一检查 except 子句直至找到与该异常相匹配的子句。 如果存在无表达式的 except 子句,它必须是最后一个;它将匹配任何异常。 "
259+
"对于带有表达式的 except 子句,该表达式会被求值,如果结果对象与发生的异常“兼容”则该子句将匹配该异常。 "
260+
"如果一个对象是异常对象所属的类或基类,或者是包含兼容该异常的项的元组则两者就是兼容的。"
256261

257262
#: ../../reference/compound_stmts.rst:260
258263
msgid ""
@@ -870,12 +875,14 @@ msgid ""
870875
"directly returns an :term:`asynchronous iterator`, which can call "
871876
"asynchronous code in its ``__anext__`` method."
872877
msgstr ""
878+
":term:`asynchronous iterable` 提供了 ``__aiter__`` 方法,该方法会直接返回 "
879+
":term:`asynchronous iterator`,它可以在其 ``__anext__`` 方法中调用异步代码。"
873880

874881
#: ../../reference/compound_stmts.rst:807
875882
msgid ""
876883
"The ``async for`` statement allows convenient iteration over asynchronous "
877884
"iterables."
878-
msgstr ""
885+
msgstr "``async for`` 语句允许方便地对异步可迭代对象进行迭代。"
879886

880887
#: ../../reference/compound_stmts.rst:817
881888
msgid "Is semantically equivalent to::"

0 commit comments

Comments
 (0)