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

Skip to content

Commit cc3b7ba

Browse files
committed
[po] auto sync bot
1 parent e0a0ee2 commit cc3b7ba

3 files changed

Lines changed: 58 additions & 42 deletions

File tree

glossary.po

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ msgid ""
5050
"delimiters (parentheses, square brackets, curly braces or triple quotes), or"
5151
" after specifying a decorator."
5252
msgstr ""
53-
"交互式终端中输入特殊代码行时默认的 Python 提示符,包括:缩进的代码块,成对的分隔符之内 (圆括号, 方括号, "
54-
"花括号或三重引号),或是指定一个装饰器之后。"
53+
"交互式终端中输入特殊代码行时默认的 Python "
54+
"提示符,包括:缩进的代码块,成对的分隔符之内(圆括号、方括号、花括号或三重引号,或是指定一个装饰器之后。"
5555

5656
#: ../../glossary.rst:20
5757
msgid "2to3"
@@ -71,7 +71,7 @@ msgid ""
7171
":ref:`2to3-reference`."
7272
msgstr ""
7373
"2to3 包含在标准库中,模块名为 :mod:`lib2to3`;并提供一个独立入口点 :file:`Tools/scripts/2to3`。参见 "
74-
":ref:`2to3-reference`."
74+
":ref:`2to3-reference`"
7575

7676
#: ../../glossary.rst:29
7777
msgid "abstract base class"
@@ -91,11 +91,11 @@ msgid ""
9191
"You can create your own ABCs with the :mod:`abc` module."
9292
msgstr ""
9393
"抽象基类简称 ABC,是对 :term:`duck-typing` 的补充,它提供了一种定义接口的新方式,相比之下其他技巧例如 "
94-
":func:`hasattr` 显得过于笨拙或有微妙错误 (例如使用 :ref:`魔术方法 <special-lookup>`)。ABC "
94+
":func:`hasattr` 显得过于笨拙或有微妙错误例如使用 :ref:`魔术方法 <special-lookup>`。ABC "
9595
"引入了虚拟子类,这种类并非继承自其他类,但却仍能被 :func:`isinstance` 和 :func:`issubclass` 所认可;详见 "
96-
":mod:`abc` 模块文档。Python 自带许多内置的 ABC 用于实现数据结构 (在 :mod:`collections.abc` 模块中), "
97-
"数字 (在 :mod:`numbers` 模块中), 流 (在 :mod:`io` 模块中), 导入查找器和加载器 (在 "
98-
":mod:`importlib.abc` 模块中)。你可以使用 :mod:`abc` 模块来创建自己的 ABC。"
96+
":mod:`abc` 模块文档。Python 自带许多内置的 ABC 用于实现数据结构在 :mod:`collections.abc` "
97+
"模块中)、数字(在 :mod:`numbers` 模块中)、流(在 :mod:`io` 模块中)、导入查找器和加载器在 "
98+
":mod:`importlib.abc` 模块中。你可以使用 :mod:`abc` 模块来创建自己的 ABC。"
9999

100100
#: ../../glossary.rst:42
101101
msgid "annotation"
@@ -121,8 +121,8 @@ msgid ""
121121
"See :term:`variable annotation`, :term:`function annotation`, :pep:`484` and"
122122
" :pep:`526`, which describe this functionality."
123123
msgstr ""
124-
"参见 :term:`variable annotation`, :term:`function annotation`, :pep:`484` 和 "
125-
":pep:`526`, 对此功能均有介绍。"
124+
"参见 :term:`variable annotation`:term:`function annotation`:pep:`484` 和 "
125+
":pep:`526`对此功能均有介绍。"
126126

127127
#: ../../glossary.rst:56
128128
msgid "argument"
@@ -132,7 +132,7 @@ msgstr "argument -- 参数"
132132
msgid ""
133133
"A value passed to a :term:`function` (or :term:`method`) when calling the "
134134
"function. There are two kinds of argument:"
135-
msgstr "在调用函数时传给 :term:`function` (或 :term:`method`) 的值。参数分为两种:"
135+
msgstr "在调用函数时传给 :term:`function`或 :term:`method`的值。参数分为两种:"
136136

137137
#: ../../glossary.rst:61
138138
msgid ""
@@ -141,7 +141,7 @@ msgid ""
141141
"by ``**``. For example, ``3`` and ``5`` are both keyword arguments in the "
142142
"following calls to :func:`complex`::"
143143
msgstr ""
144-
":dfn:`关键字参数`: 在函数调用中前面带有标识符 (例如 ``name=``) 或者作为包含在前面带有 ``**`` "
144+
":dfn:`关键字参数`: 在函数调用中前面带有标识符例如 ``name=``或者作为包含在前面带有 ``**`` "
145145
"的字典里的值传入。举例来说,``3`` 和 ``5`` 在以下对 :func:`complex` 的调用中均属于关键字参数::"
146146

147147
#: ../../glossary.rst:69
@@ -307,8 +307,8 @@ msgid ""
307307
"Benevolent Dictator For Life, a.k.a. `Guido van Rossum "
308308
"<https://gvanrossum.github.io/>`_, Python's creator."
309309
msgstr ""
310-
"“终身仁慈独裁者”的英文缩写,即 `Guido van Rossum <https://gvanrossum.github.io/>`_, Python"
311-
" 的创造者。"
310+
"“终身仁慈独裁者”的英文缩写,即 `Guido van Rossum <https://gvanrossum.github.io/>`_Python "
311+
"的创造者。"
312312

313313
#: ../../glossary.rst:145
314314
msgid "binary file"
@@ -322,10 +322,10 @@ msgid ""
322322
":data:`sys.stdout.buffer`, and instances of :class:`io.BytesIO` and "
323323
":class:`gzip.GzipFile`."
324324
msgstr ""
325-
":term:`file object` 能够读写 :term:`类字节对象 <bytes-like object>`。二进制文件的例子包括以二进制模式 "
326-
"(``'rb'``, ``'wb'`` or ``'rb+'``)打开的文件, :data:`sys.stdin.buffer`, "
327-
":data:`sys.stdout.buffer` 以及 :class:`io.BytesIO` 和 :class:`gzip.GzipFile` "
328-
"的实例。"
325+
":term:`file object` 能够读写 :term:`类字节对象 <bytes-like "
326+
"object>`。二进制文件的例子包括以二进制模式(``'rb'``, ``'wb'`` or "
327+
"``'rb+'``)打开的文件、:data:`sys.stdin.buffer`、:data:`sys.stdout.buffer` 以及 "
328+
":class:`io.BytesIO` 和 :class:`gzip.GzipFile` 的实例。"
329329

330330
#: ../../glossary.rst:154
331331
msgid ""
@@ -347,7 +347,7 @@ msgid ""
347347
"a binary file, and sending over a socket."
348348
msgstr ""
349349
"支持 :ref:`bufferobjects` 并且能导出 C-:term:`contiguous` 缓冲的对象。这包括所有 "
350-
":class:`bytes`, :class:`bytearray` 和 :class:`array.array` 对象,以及许多普通 "
350+
":class:`bytes`:class:`bytearray` 和 :class:`array.array` 对象,以及许多普通 "
351351
":class:`memoryview` 对象。字节类对象可在多种二进制数据操作中使用;这些操作包括压缩、保存为二进制文件以及通过套接字发送等。"
352352

353353
#: ../../glossary.rst:165
@@ -359,7 +359,7 @@ msgid ""
359359
" immutable objects (\"read-only bytes-like objects\"); examples of these "
360360
"include :class:`bytes` and a :class:`memoryview` of a :class:`bytes` object."
361361
msgstr ""
362-
"某些操作需要可变的二进制数据。这种对象在文档中常被称为 \"可读写字节类对象\"。可变缓冲对象的例子包括 :class:`bytearray` 以及 "
362+
"某些操作需要可变的二进制数据。这种对象在文档中常被称为可读写字节类对象。可变缓冲对象的例子包括 :class:`bytearray` 以及 "
363363
":class:`bytearray` 的 :class:`memoryview`。其他操作要求二进制数据存放于不可变对象 "
364364
"(\"只读字节类对象\");这种对象的例子包括 :class:`bytes` 以及 :class:`bytes` 对象的 "
365365
":class:`memoryview`。"
@@ -380,7 +380,7 @@ msgid ""
380380
" between Python releases."
381381
msgstr ""
382382
"Python 源代码会被编译为字节码,即 CPython 解释器中表示 Python 程序的内部代码。字节码还会缓存在 ``.pyc`` "
383-
"文件中,这样第二次执行同一文件时速度更快 (可以免去将源码重新编译为字节码)。这种 \"中间语言\" 运行在根据字节码执行相应机器码的 "
383+
"文件中,这样第二次执行同一文件时速度更快可以免去将源码重新编译为字节码。这种 \"中间语言\" 运行在根据字节码执行相应机器码的 "
384384
":term:`virtual machine` 之上。请注意不同 Python 虚拟机上的字节码不一定通用,也不一定能在不同 Python 版本上兼容。"
385385

386386
#: ../../glossary.rst:185
@@ -425,7 +425,7 @@ msgid ""
425425
"programmer, e.g., ``float(3)+4.5`` rather than just ``3+4.5``."
426426
msgstr ""
427427
"在包含两个相同类型参数的操作中,一种类型的实例隐式地转换为另一种类型。例如,``int(3.15)`` 是将原浮点数转换为整型数 ``3``,但在 "
428-
"``3+4.5`` 中,参数的类型不一致 (一个是 int, 一个是 float),两者必须转换为相同类型才能相加,否则将引发 "
428+
"``3+4.5`` 中,参数的类型不一致一个是 int, 一个是 float,两者必须转换为相同类型才能相加,否则将引发 "
429429
":exc:`TypeError`。如果没有强制类型转换机制,程序员必须将所有可兼容参数归一化为相同类型,例如要写成 ``float(3)+4.5`` "
430430
"而不是 ``3+4.5``。"
431431

@@ -446,7 +446,7 @@ msgid ""
446446
" not aware of a need for them, it's almost certain you can safely ignore "
447447
"them."
448448
msgstr ""
449-
"对普通实数系统的扩展,其中所有数字都被表示为一个实部和一个虚部的和。虚数是虚数单位 (``-1`` 的平方根) 的实倍数,通常在数学中写为 "
449+
"对普通实数系统的扩展,其中所有数字都被表示为一个实部和一个虚部的和。虚数是虚数单位``-1`` 的平方根的实倍数,通常在数学中写为 "
450450
"``i``,在工程学中写为 ``j``。Python 内置了对复数的支持,采用工程学标记方式;虚部带有一个 ``j`` 后缀,例如 "
451451
"``3+1j``。如果需要 :mod:`math` 模块内对象的对应复数版本,请使用 "
452452
":mod:`cmath`,复数的使用是一个比较高级的数学特性。如果你感觉没有必要,忽略它们也几乎不会有任何问题。"
@@ -507,7 +507,7 @@ msgid ""
507507
" These were introduced by :pep:`492`."
508508
msgstr ""
509509
"返回一个 :term:`coroutine` 对象的函数。协程函数可通过 :keyword:`async def` 语句来定义,并可能包含 "
510-
":keyword:`await`, :keyword:`async for` 和 :keyword:`async with` 关键字。这些特性是由 "
510+
":keyword:`await`:keyword:`async for` 和 :keyword:`async with` 关键字。这些特性是由 "
511511
":pep:`492` 引入的。"
512512

513513
#: ../../glossary.rst:249
@@ -638,8 +638,7 @@ msgid ""
638638
"classes <abstract base class>`.) Instead, it typically employs "
639639
":func:`hasattr` tests or :term:`EAFP` programming."
640640
msgstr ""
641-
"指一种编程风格,它并不依靠查找对象类型来确定其是否具有正确的接口,而是直接调用或使用其方法或属性 "
642-
"(\"看起来像鸭子,叫起来也像鸭子,那么肯定就是鸭子。\") 由于强调接口而非特定类型,设计良好的代码可通过允许多态替代来提升灵活性。鸭子类型避免使用"
641+
"指一种编程风格,它并不依靠查找对象类型来确定其是否具有正确的接口,而是直接调用或使用其方法或属性(“看起来像鸭子,叫起来也像鸭子,那么肯定就是鸭子。”)由于强调接口而非特定类型,设计良好的代码可通过允许多态替代来提升灵活性。鸭子类型避免使用"
643642
" :func:`type` 或 :func:`isinstance` 检测。(但要注意鸭子类型可以使用 :term:`抽象基类 <abstract "
644643
"base class>` 作为补充。) 而往往会采用 :func:`hasattr` 检测或是 :term:`EAFP` 编程。"
645644

@@ -697,8 +696,8 @@ msgid ""
697696
"\"f-strings\" which is short for :ref:`formatted string literals "
698697
"<f-strings>`. See also :pep:`498`."
699698
msgstr ""
700-
"带有 ``'f'`` 或 ``'F'`` 前缀的字符串字面值通常被称为 \"f-字符串\" 即 :ref:`格式化字符串字面值 <f-strings>`"
701-
" 的简写。参见 :pep:`498`。"
699+
"带有 ``'f'`` 或 ``'F'`` 前缀的字符串字面值通常被称为f-字符串即 :ref:`格式化字符串字面值 <f-strings>` "
700+
"的简写。参见 :pep:`498`。"
702701

703702
#: ../../glossary.rst:346
704703
msgid "file object"
@@ -713,9 +712,9 @@ msgid ""
713712
"input/output, in-memory buffers, sockets, pipes, etc.). File objects are "
714713
"also called :dfn:`file-like objects` or :dfn:`streams`."
715714
msgstr ""
716-
"对外提供面向文件 API 以使用下层资源的对象 (带有 :meth:`read()` 或 :meth:`write()` "
717-
"这样的方法)。根据其创建方式的不同,文件对象可以处理对真实磁盘文件,对其他类型存储,或是对通讯设备的访问 "
718-
"(例如标准输入/输出、内存缓冲区、套接字、管道等等)。文件对象也被称为 :dfn:`文件类对象` 或 :dfn:`流`。"
715+
"对外提供面向文件 API 以使用下层资源的对象带有 :meth:`read()` 或 :meth:`write()` "
716+
"这样的方法。根据其创建方式的不同,文件对象可以处理对真实磁盘文件,对其他类型存储,或是对通讯设备的访问(例如标准输入/输出、内存缓冲区、套接字、管道等等)。文件对象也被称为"
717+
" :dfn:`文件类对象` 或 :dfn:`流`。"
719718

720719
#: ../../glossary.rst:356
721720
msgid ""
@@ -944,8 +943,8 @@ msgid ""
944943
"processor machines."
945944
msgstr ""
946945
":term:`CPython` 解释器所采用的一种机制,它确保同一时刻只有一个线程在执行 Python "
947-
":term:`bytecode`。此机制通过设置对象模型 (包括 :class:`dict` 等重要内置类型) 针对并发访问的隐式安全简化了 "
948-
"CPython 实现。给整个解释器加锁使得解释器多线程运行更方便,其代价则是牺牲了在多处理器上的并行性。"
946+
":term:`bytecode`。此机制通过设置对象模型包括 :class:`dict` 等重要内置类型针对并发访问的隐式安全简化了 CPython"
947+
" 实现。给整个解释器加锁使得解释器多线程运行更方便,其代价则是牺牲了在多处理器上的并行性。"
949948

950949
#: ../../glossary.rst:476
951950
msgid ""
@@ -988,12 +987,14 @@ msgid ""
988987
"other objects (it needs an :meth:`__eq__` method). Hashable objects which "
989988
"compare equal must have the same hash value."
990989
msgstr ""
990+
"一个对象的哈希值如果在其生命周期内绝不改变,就被称为 *可哈希*(它需要具有 :meth:`__hash__` "
991+
"方法),并可以同其他对象进行比较(它需要具有 :meth:`__eq__` 方法)。可哈希对象必须具有相同的哈希值比较结果才会相同。"
991992

992993
#: ../../glossary.rst:499
993994
msgid ""
994995
"Hashability makes an object usable as a dictionary key and a set member, "
995996
"because these data structures use the hash value internally."
996-
msgstr ""
997+
msgstr "可哈希性使得对象能够作为字典键或集合成员使用,因为这些数据结构要在内部使用哈希值。"
997998

998999
#: ../../glossary.rst:502
9991000
msgid ""
@@ -1003,6 +1004,9 @@ msgid ""
10031004
"(except with themselves), and their hash value is derived from their "
10041005
":func:`id`."
10051006
msgstr ""
1007+
"所有 Python "
1008+
"中的不可变内置对象都是可哈希的;可变容器(例如列表或字典)都不可哈希。用户定义类的实例对象默认是可哈希的。它们在比较时一定不相同(除非是与自己比较),它们的哈希值的生成基于其"
1009+
" :func:`id`。"
10061010

10071011
#: ../../glossary.rst:507
10081012
msgid "IDLE"
@@ -1013,7 +1017,7 @@ msgid ""
10131017
"An Integrated Development Environment for Python. IDLE is a basic editor "
10141018
"and interpreter environment which ships with the standard distribution of "
10151019
"Python."
1016-
msgstr ""
1020+
msgstr "Python 的 IDE,“集成开发与学习环境”的英文缩写。是 Python 标准发行版附带的基本编程器和解释器环境。"
10171021

10181022
#: ../../glossary.rst:512
10191023
msgid "immutable"
@@ -1027,7 +1031,7 @@ msgid ""
10271031
"in places where a constant hash value is needed, for example as a key in a "
10281032
"dictionary."
10291033
msgstr ""
1030-
"具有固定值的对象。不可变对象包括数字字符串和元组。这样的对象不能被改变。如果必须存储一个不同的值,则必须创建新的对象。它们在需要常量哈希值的地方起着重要作用,例如作为字典中的键。"
1034+
"具有固定值的对象。不可变对象包括数字字符串和元组。这样的对象不能被改变。如果必须存储一个不同的值,则必须创建新的对象。它们在需要常量哈希值的地方起着重要作用,例如作为字典中的键。"
10311035

10321036
#: ../../glossary.rst:519
10331037
msgid "import path"
@@ -1040,6 +1044,8 @@ msgid ""
10401044
" list of locations usually comes from :data:`sys.path`, but for subpackages "
10411045
"it may also come from the parent package's ``__path__`` attribute."
10421046
msgstr ""
1047+
"由多个位置(或 :term:`路径条目 <path entry>`)组成的列表,会被模块的 :term:`path based finder` "
1048+
"用来查找导入目标。在导入时,此位置列表通常来自 :data:`sys.path`,但对次级包来说也可能来自上级包的 ``__path__`` 属性。"
10431049

10441050
#: ../../glossary.rst:526
10451051
msgid "importing"
@@ -1059,7 +1065,7 @@ msgstr "importer -- 导入器"
10591065
msgid ""
10601066
"An object that both finds and loads a module; both a :term:`finder` and "
10611067
":term:`loader` object."
1062-
msgstr ""
1068+
msgstr "查找并加载模块的对象;此对象即属于 :term:`finder` 又属于 :term:`loader`。"
10631069

10641070
#: ../../glossary.rst:534
10651071
msgid "interactive"

library/importlib.po

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6+
# Translators:
7+
# Fred <[email protected]>, 2018
8+
# Fei Yin <[email protected]>, 2018
9+
#
610
#, fuzzy
711
msgid ""
812
msgstr ""
913
"Project-Id-Version: Python 3.7\n"
1014
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-10-27 09:37+0900\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
15+
"POT-Creation-Date: 2018-11-06 09:47+0900\n"
16+
"PO-Revision-Date: 2017-02-16 23:15+0000\n"
1317
"Last-Translator: Fei Yin <[email protected]>, 2018\n"
1418
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1519
"MIME-Version: 1.0\n"
@@ -1918,7 +1922,7 @@ msgstr ""
19181922
#: ../../library/importlib.rst:1655
19191923
msgid ""
19201924
"To import a Python source file directly, use the following recipe (Python "
1921-
"3.4 and newer only)::"
1925+
"3.5 and newer only)::"
19221926
msgstr ""
19231927

19241928
#: ../../library/importlib.rst:1675

tutorial/controlflow.po

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,16 +418,18 @@ msgid ""
418418
"dictionary, or instances of most classes. For example, the following "
419419
"function accumulates the arguments passed to it on subsequent calls::"
420420
msgstr ""
421+
"** 重要提示: ** "
422+
"默认值只会计算一次。这在默认值为可变对象,比如列表,字典或者大多数类的实例时会有所不同。比如,下面的函数会把后续调用中传递给它的参数都存起来::"
421423

422424
#: ../../tutorial/controlflow.rst:417
423425
msgid "This will print ::"
424-
msgstr ""
426+
msgstr "这将打印出 ::"
425427

426428
#: ../../tutorial/controlflow.rst:423
427429
msgid ""
428430
"If you don't want the default to be shared between subsequent calls, you can"
429431
" write the function like this instead::"
430-
msgstr ""
432+
msgstr "如果你不想要在后续调用之间共享默认值,你可以这样写这个函数::"
431433

432434
#: ../../tutorial/controlflow.rst:436
433435
msgid "Keyword Arguments"
@@ -439,17 +441,21 @@ msgid ""
439441
"argument>` of the form ``kwarg=value``. For instance, the following "
440442
"function::"
441443
msgstr ""
444+
"也可以使用形如 ``kwarg=value`` 的 :term:`keyword arguments <keyword argument>` "
445+
"调用函数。例如,下面的函数::"
442446

443447
#: ../../tutorial/controlflow.rst:447
444448
msgid ""
445449
"accepts one required argument (``voltage``) and three optional arguments "
446450
"(``state``, ``action``, and ``type``). This function can be called in any "
447451
"of the following ways::"
448452
msgstr ""
453+
"接受一个必需的参数(``voltage``)和三个可选的参数(``state``, ``action``,和 "
454+
"``type``)。这个函数可以通过下面的任何一种方式调用::"
449455

450456
#: ../../tutorial/controlflow.rst:458
451457
msgid "but all the following calls would be invalid::"
452-
msgstr ""
458+
msgstr "但下面的函数调用都是无效的::"
453459

454460
#: ../../tutorial/controlflow.rst:465
455461
msgid ""

0 commit comments

Comments
 (0)