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

Skip to content

Commit 0284b18

Browse files
committed
[po] auto sync bot
1 parent 4dd286b commit 0284b18

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

glossary.po

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,8 @@ msgid ""
14711471
"object where the *year* is accessible either with an index such as ``t[0]`` "
14721472
"or with a named attribute like ``t.tm_year``)."
14731473
msgstr ""
1474+
"任何类似元组的类,其中的可索引元素也能使用名称属性来访问。(例如,:func:`time.localtime` 会返回一个类似元组的对象,其中的 "
1475+
"*year* 既可以通过索引访问如 ``t[0]`` 也可以通过名称属性访问如 ``t.tm_year``)。"
14741476

14751477
#: ../../glossary.rst:727
14761478
msgid ""
@@ -1481,6 +1483,9 @@ msgid ""
14811483
"extra features such as a self-documenting representation like "
14821484
"``Employee(name='jones', title='programmer')``."
14831485
msgstr ""
1486+
"具名元组可以是一个内置类型例如 :class:`time.struct_time`,也可以通过正规的类定义来创建。一个完备的具名元组还可以通过工厂函数 "
1487+
":func:`collections.namedtuple` 来创建。后面这种方式会自动提供一些额外特性,例如 "
1488+
"``Employee(name='jones', title='programmer')`` 这样的自包含文档表示形式。"
14841489

14851490
#: ../../glossary.rst:733
14861491
msgid "namespace"
@@ -1499,6 +1504,11 @@ msgid ""
14991504
"functions are implemented by the :mod:`random` and :mod:`itertools` modules,"
15001505
" respectively."
15011506
msgstr ""
1507+
"命名空间是存放变量的场所。命名空间有局部、全局和内置的,还有对象中的嵌套命名空间(在方法之内)。命名空间通过防止命名冲突来支持模块化。例如,函数 "
1508+
":func:`builtins.open <.open>` 与 :func:`os.open` "
1509+
"可通过各自的命名空间来区分。命名空间还通过明确哪个模块实现那个函数来帮助提高可读性和可维护性。例如,:func:`random.seed` 或 "
1510+
":func:`itertools.islice` 这种写法明确了这些函数是由 :mod:`random` 与 :mod:`itertools` "
1511+
"模块分别实现的。"
15021512

15031513
#: ../../glossary.rst:745
15041514
msgid "namespace package"
@@ -1511,10 +1521,12 @@ msgid ""
15111521
"specifically are not like a :term:`regular package` because they have no "
15121522
"``__init__.py`` file."
15131523
msgstr ""
1524+
":pep:`420` 所引入的一种仅被用作子包的容器的 :term:`package`,命名空间包可以没有实体表示物,其描述方式与 "
1525+
":term:`regular package` 不同,因为它们没有 ``__init__.py`` 文件。"
15141526

15151527
#: ../../glossary.rst:752
15161528
msgid "See also :term:`module`."
1517-
msgstr ""
1529+
msgstr "另可参见 :term:`module`。"
15181530

15191531
#: ../../glossary.rst:753
15201532
msgid "nested scope"
@@ -1529,6 +1541,8 @@ msgid ""
15291541
"the innermost scope. Likewise, global variables read and write to the "
15301542
"global namespace. The :keyword:`nonlocal` allows writing to outer scopes."
15311543
msgstr ""
1544+
"在一个定义范围内引用变量的能力。例如,在另一函数之内定义的函数可以引用前者的变量。请注意嵌套作用域默认只对引用有效而对赋值无效。局部变量的读写都受限于最内层作用域。类似的,全局变量的读写则作用于全局命名空间。通过"
1545+
" :keyword:`nonlocal` 关键字可允许写入外层作用域。"
15321546

15331547
#: ../../glossary.rst:762
15341548
msgid "new-style class"

tutorial/errors.po

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# ww song <[email protected]>, 2018
88
# Woostundy <[email protected]>, 2018
99
# Larry wang <[email protected]>, 2018
10+
# Junkai Shao <[email protected]>, 2018
1011
#
1112
#, fuzzy
1213
msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516
"Report-Msgid-Bugs-To: \n"
1617
"POT-Creation-Date: 2018-11-04 09:44+0900\n"
1718
"PO-Revision-Date: 2017-02-16 23:40+0000\n"
18-
"Last-Translator: Larry wang <larry.wang.801@gmail.com>, 2018\n"
19+
"Last-Translator: Junkai Shao <skaifun.dev@gmail.com>, 2018\n"
1920
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2021
"MIME-Version: 1.0\n"
2122
"Content-Type: text/plain; charset=UTF-8\n"
@@ -44,7 +45,7 @@ msgstr "语法错误"
4445
msgid ""
4546
"Syntax errors, also known as parsing errors, are perhaps the most common "
4647
"kind of complaint you get while you are still learning Python::"
47-
msgstr "语法错误又称代码解析错误,可能是你在Python初学时最容易遇到的错误。"
48+
msgstr "语法错误又称解析错误,可能是你在学习Python 时最容易遇到的错误::"
4849

4950
#: ../../tutorial/errors.rst:26
5051
msgid ""
@@ -56,7 +57,7 @@ msgid ""
5657
" so you know where to look in case the input came from a script."
5758
msgstr ""
5859
"解析器会输出出现语法错误的那一行,并显示一个“箭头”,指向这行里面检测到第一个错误。 错误是由箭头指示的位置 *上面* "
59-
"的形符引起的(或者至少是在这里被检测出的):在示例中,在 :func:`print` 这个函数中检测到了错误,因为在它前面少了个冒号 (``':'``)"
60+
"的令牌(或者至少是在这里被检测出的)引起的:在示例中,在 :func:`print` 这个函数中检测到了错误,因为在它前面少了个冒号 (``':'``)"
6061
" 。文件名和行号也会被输出,以便输入来自脚本文件时你能知道去哪检查。"
6162

6263
#: ../../tutorial/errors.rst:37
@@ -72,8 +73,8 @@ msgid ""
7273
"not handled by programs, however, and result in error messages as shown "
7374
"here::"
7475
msgstr ""
75-
"即使语句或表达式在语法上是正确的,但在尝试执行时,它仍可能会导致错误。 "
76-
"在执行时检测到的错误被称为*异常*,异常不一定会导致严重后果:您将很快学会如何在Python程序中处理它们。 "
76+
"即使语句或表达式在语法上是正确的,但在尝试执行时,它仍可能会引发错误。 "
77+
"在执行时检测到的错误被称为*异常*,异常不一定会导致严重后果:你将很快学会如何在Python程序中处理它们。 "
7778
"但是,大多数异常并不会被程序处理,此时会显示如下所示的错误信息::"
7879

7980
#: ../../tutorial/errors.rst:58
@@ -87,15 +88,15 @@ msgid ""
8788
" a useful convention). Standard exception names are built-in identifiers "
8889
"(not reserved keywords)."
8990
msgstr ""
90-
"错误信息的最后一行告诉我们程序遇到了什么类型的错误。异常有不同的类型,而其类型名称将会在错误信息中输出出来。上述样例中的异常类型依次是::exc:`ZeroDivisionError`,"
91-
" :exc:`NameError` and "
92-
":exc:`TypeError`。错误信息中的异常类型是执行时抛出的内建异常类型。所有的内建类型都会如此,而虽然这是惯例,但是用户自定义的异常不一定如此。标准的异常类型是内建的标识符而非保留关键字。"
91+
"错误信息的最后一行告诉我们程序遇到了什么类型的错误。异常有不同的类型,而其类型名称将会作为错误信息的一部分中打印出来:上述示例中的异常类型依次是::exc:`ZeroDivisionError`"
92+
" :exc:`NameError` "
93+
":exc:`TypeError`。作为异常类型打印的字符串是发生的内置异常的名称。对于所有内置异常都是如此,但对于用户定义的异常则不一定如此(虽然这是一个有用的规范)。标准的异常类型是内置的标识符(而不是保留关键字)。"
9394

9495
#: ../../tutorial/errors.rst:66
9596
msgid ""
9697
"The rest of the line provides detail based on the type of exception and what"
9798
" caused it."
98-
msgstr "这一行剩下的部分能告诉我们此处抛出异常的具体类型以及哪一部分代码抛出了异常。"
99+
msgstr "这一行的剩下的部分根据异常类型及其原因提供详细信息。"
99100

100101
#: ../../tutorial/errors.rst:69
101102
msgid ""

0 commit comments

Comments
 (0)