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

Skip to content

Commit cb872b7

Browse files
[po] auto sync
1 parent 5dfc70e commit cb872b7

2 files changed

Lines changed: 41 additions & 30 deletions

File tree

library/email.generator.po

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ msgstr ""
211211
msgid ""
212212
"Return an independent clone of this :class:`BytesGenerator` instance with "
213213
"the exact same option settings, and *fp* as the new *outfp*."
214-
msgstr ""
215-
"返回此Return an independent clone of this :class:`BytesGenerator` "
216-
"实例的独立克隆,具有完全相同的选项设置,而 *fp* 为新的 *outfp*。"
214+
msgstr "返回此 :class:`BytesGenerator` 实例的独立克隆,具有完全相同的选项设置,而 *fp* 为新的 *outfp*。"
217215

218216
#: ../../library/email.generator.rst:125
219217
msgid ""
@@ -282,25 +280,34 @@ msgid ""
282280
"Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME "
283281
"``unknown-8bit`` character set, thus rendering them RFC-compliant."
284282
msgstr ""
283+
"如果 :mod:`~email.policy` 选项 :attr:`~email.policy.Policy.cte_type` 为 "
284+
"``8bit``,则视同选项被设为 ``7bit`` 来生成消息。 (这是必需的,因为字符串无法表示非 ASCII 字节数据。) 将使用兼容 ASCII"
285+
" 的 :mailheader:`Content-Transfer-Encoding` 按需转换任何具有高比特位组的字节数据。 也就是说,将具有非 "
286+
"ASCII :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-"
287+
"Transfer-Encoding: 8bit`) 的部分转换为兼容 ASCII 的 :mailheader:`Content-Transfer-"
288+
"Encoding`,并使用 MIME ``unknown-8bit`` 字符集来编码标头中不符合 RFC 的非 ASCII 字节数据,以使其符合 "
289+
"RFC。"
285290

286291
#: ../../library/email.generator.rst:209
287292
msgid ""
288293
"Added support for re-encoding ``8bit`` message bodies, and the *linesep* "
289294
"argument."
290-
msgstr ""
295+
msgstr "添加了对重编码 ``8bit`` 消息体的支持,以及 *linesep* 参数。"
291296

292297
#: ../../library/email.generator.rst:216
293298
msgid ""
294299
"Return an independent clone of this :class:`Generator` instance with the "
295300
"exact same options, and *fp* as the new *outfp*."
296-
msgstr ""
301+
msgstr "返回此 :class:`Generator` 实例的独立克隆,具有完全相同的选项设置,而 *fp* 为新的 *outfp*。"
297302

298303
#: ../../library/email.generator.rst:222
299304
msgid ""
300305
"Write *s* to the *write* method of the *outfp* passed to the "
301306
":class:`Generator`'s constructor. This provides just enough file-like API "
302307
"for :class:`Generator` instances to be used in the :func:`print` function."
303308
msgstr ""
309+
"将 *s* 写入到传给 :class:`Generator` 的构造器的 *outfp* 的 *write* 方法。 这足够为 "
310+
":class:`Generator` 实际提供可用于 :func:`print` 函数的文件类 API。"
304311

305312
#: ../../library/email.generator.rst:228
306313
msgid ""
@@ -310,6 +317,10 @@ msgid ""
310317
"of a formatted string representation of a message object. For more detail, "
311318
"see :mod:`email.message`."
312319
msgstr ""
320+
"作为一个便捷工具,:class:`~email.message.EmailMessage` 提供了 "
321+
":meth:`~email.message.EmailMessage.as_string` 和 ``str(aMessage)`` (即 "
322+
":meth:`~email.message.EmailMessage.__str__`) 等方法,它们简单地生成一个消息对象的已格式化字符串表示形式。 "
323+
"更多细节请参阅 :mod:`email.message`。"
313324

314325
#: ../../library/email.generator.rst:235
315326
msgid ""

tutorial/controlflow.po

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# Junkai Shao <[email protected]>, 2018
1111
# zkonge <[email protected]>, 2019
1212
# ppcfish <[email protected]>, 2019
13+
# Freesand Leo <[email protected]>, 2020
1314
# Hissy <[email protected]>, 2020
14-
# Freesand Leo <[email protected]>, 2021
1515
# jaystone776 <[email protected]>, 2021
1616
#
1717
#, fuzzy
@@ -47,7 +47,7 @@ msgstr ":keyword:`!if` 语句"
4747
msgid ""
4848
"Perhaps the most well-known statement type is the :keyword:`if` statement. "
4949
"For example::"
50-
msgstr "最为人所知的就是 :keyword:`if` 语句。例如:"
50+
msgstr "最耳熟能详的就是 :keyword:`if` 语句。例如:"
5151

5252
#: ../../tutorial/controlflow.rst:33
5353
msgid ""
@@ -58,7 +58,7 @@ msgid ""
5858
"``switch`` or ``case`` statements found in other languages."
5959
msgstr ""
6060
"if 语句包含零个或多个 :keyword:`elif` 子句,及可选的 :keyword:`else` 子句。关键字 "
61-
"':keyword:`!elif`' 是 'else if' 的缩写,适合用于避免过多的缩进。可以把 :keyword:`!if` ... "
61+
"':keyword:`!elif`' 是 'else if' 的缩写,适用于避免过多的缩进。可以把 :keyword:`!if` ... "
6262
":keyword:`!elif` ... :keyword:`!elif` ... 序列看作是其他语言中 ``switch`` 或 ``case`` "
6363
"语句的替代品。"
6464

@@ -77,15 +77,15 @@ msgid ""
7777
"pun intended):"
7878
msgstr ""
7979
"Python 的 :keyword:`for` 语句与 C 或 Pascal 中的不同。Python 的 :keyword:`!for` "
80-
"语句不对算术递增的数值进行迭代(如 Pascal),或是给予用户定义迭代步骤和暂停条件的能力(如 "
81-
"C),而是对任意序列进行迭代(例如,列表或字符串),条目的迭代顺序与它们在序列中出现的顺序一致。 例如(此处英文为双关语):"
80+
"语句不迭代算术递增数值(如 Pascal),或是给予用户定义迭代步骤和暂停条件的能力(如 "
81+
"C),而是迭代列表或字符串等任意序列,元素的迭代顺序与在序列中出现的顺序一致。 例如"
8282

8383
#: ../../tutorial/controlflow.rst:69
8484
msgid ""
8585
"Code that modifies a collection while iterating over that same collection "
8686
"can be tricky to get right. Instead, it is usually more straight-forward to"
8787
" loop over a copy of the collection or to create a new collection::"
88-
msgstr "遍历同集合的同时修改该集合的内容,这样代码很难得到正确的结果。要实现这个目的,应该循环遍历该集合的副本或创建新的集合:"
88+
msgstr "遍历某个集合的同时修改该集合的内容,很难获取想要的结果。要在遍历时修改集合的内容,应该遍历该集合的副本或创建新的集合:"
8989

9090
#: ../../tutorial/controlflow.rst:88
9191
msgid "The :func:`range` Function"
@@ -95,7 +95,7 @@ msgstr ":func:`range` 函数"
9595
msgid ""
9696
"If you do need to iterate over a sequence of numbers, the built-in function "
9797
":func:`range` comes in handy. It generates arithmetic progressions::"
98-
msgstr "内置函数 :func:`range` 常用于遍历数字序列该函数可以生成算术级数:"
98+
msgstr "内置函数 :func:`range` 常用于遍历数字序列该函数可以生成算术级数:"
9999

100100
#: ../../tutorial/controlflow.rst:102
101101
msgid ""
@@ -105,7 +105,7 @@ msgid ""
105105
"different increment (even negative; sometimes this is called the 'step')::"
106106
msgstr ""
107107
"生成的序列不包含给定的终止数值;``range(10)`` 生成 10 个值,这是一个长度为 10 的序列,其中的元素索引都是合法的。range "
108-
"也能以另一个数字开头,或以指定的幅度递增(该幅度也可以是负数;称为 '步进':"
108+
"可以不从 0 开始,还可以按指定幅度递增(递增幅度称为 '步进',支持负数):"
109109

110110
#: ../../tutorial/controlflow.rst:116
111111
msgid ""
@@ -130,7 +130,8 @@ msgid ""
130130
"items of the desired sequence when you iterate over it, but it doesn't "
131131
"really make the list, thus saving space."
132132
msgstr ""
133-
":func:`range` 返回对象的操作在很多方面和列表很像,但其实不然。迭代时,该对象基于所需序列返回连续项,并没有生成真正的列表,从而节省了空间。"
133+
":func:`range` "
134+
"返回对象的操作和列表很像,但其实这两种对象不是一回事。迭代时,该对象基于所需序列返回连续项,并没有生成真正的列表,从而节省了空间。"
134135

135136
#: ../../tutorial/controlflow.rst:142
136137
msgid ""
@@ -140,22 +141,21 @@ msgid ""
140141
":keyword:`for` statement is such a construct, while an example of a function"
141142
" that takes an iterable is :func:`sum`::"
142143
msgstr ""
143-
"这样的对象称为 "
144-
":term:`iterable`,即,适合作为这样的目标对象:函数或结构预期从中获取连续的项直到提供的项全部用尽。:keyword:`for` "
145-
"语句就是这样的架构,:func:`sum` 则是一种接受可迭代对象的函数:"
144+
"这样的对象称为可迭代对象 :term:`iterable`,函数或程序结构可从该对象中获取连续项,直到所有元素全部迭代完毕。:keyword:`for`"
145+
" 语句就是这样的架构,:func:`sum` 是一种把可迭代对象作为参数的函数:"
146146

147147
#: ../../tutorial/controlflow.rst:151
148148
msgid ""
149149
"Later we will see more functions that return iterables and take iterables as"
150150
" arguments. Lastly, maybe you are curious about how to get a list from a "
151151
"range. Here is the solution::"
152-
msgstr "后文将介绍更多可以返回可迭代对象、或把可迭代对象当作参数的函数。 最后,介绍一种解决方案,可以用 range 生成列表:"
152+
msgstr "后文将介绍更多返回可迭代对象,或把可迭代对象当作参数的函数。 最后,介绍一种用 range 生成列表解决方案:"
153153

154154
#: ../../tutorial/controlflow.rst:158
155155
msgid ""
156156
"In chapter :ref:`tut-structures`, we will discuss in more detail about "
157157
":func:`list`."
158-
msgstr ":func:`list` 的更多细节详见 :ref:`tut-structures`。"
158+
msgstr ":func:`list` 详见 :ref:`tut-structures`。"
159159

160160
#: ../../tutorial/controlflow.rst:164
161161
msgid ""
@@ -178,8 +178,8 @@ msgid ""
178178
"loop is terminated by a :keyword:`break` statement. This is exemplified by "
179179
"the following loop, which searches for prime numbers::"
180180
msgstr ""
181-
"循环语句支持 :keyword:`!else` 子句;(对于 :keyword:`for` 循环)可迭代对象中的元素全部循环完毕,或(对于 "
182-
":keyword:`while` 循环)循环条件为假时执行该子句,:keyword:`break` 语句终止循环时,不执行该子句。 "
181+
"循环语句支持 :keyword:`!else` 子句;:keyword:`for` 循环中,可迭代对象的元素全部循环完毕时,或 "
182+
":keyword:`while` 循环的条件为假时,执行该子句,:keyword:`break` 语句终止循环时,不执行该子句。 "
183183
"请看下面这个查找素数的循环示例:"
184184

185185
#: ../../tutorial/controlflow.rst:193
@@ -198,9 +198,9 @@ msgid ""
198198
"``break`` occurs. For more on the :keyword:`!try` statement and exceptions, "
199199
"see :ref:`tut-handling`."
200200
msgstr ""
201-
"与 :keyword:`if` 语句相比,循环的 ``else`` 子句与 :keyword:`try` 语句的 ``else`` 子句更像 : "
202-
":keyword:`try` 语句的 ``else`` 子句在未发生异常时执行,循环的 ``else`` 子句则在未发生 ``break`` "
203-
"时执行。:keyword:`!try` 语句和异常的详情,请参阅 :ref:`tut-handling`。"
201+
"与 :keyword:`if` 语句相比,循环的 ``else`` 子句更像 :keyword:`try` 语句的 ``else`` 子句: "
202+
":keyword:`try` 语句的 ``else`` 子句在未触发异常时执行,循环的 ``else`` 子句则在未运行 ``break`` "
203+
"时执行。:keyword:`!try` 语句和异常详见 :ref:`tut-handling`。"
204204

205205
#: ../../tutorial/controlflow.rst:203
206206
msgid ""
@@ -216,7 +216,7 @@ msgstr ":keyword:`!pass` 语句"
216216
msgid ""
217217
"The :keyword:`pass` statement does nothing. It can be used when a statement "
218218
"is required syntactically but the program requires no action. For example::"
219-
msgstr ":keyword:`pass` 语句不执行任何操作。有时,语法上需要一个语句,但程序不实际执行任何动作时,可以使用该语句。例如:"
219+
msgstr ":keyword:`pass` 语句不执行任何操作。语法上需要一个语句,但程序不实际执行任何动作时,可以使用该语句。例如:"
220220

221221
#: ../../tutorial/controlflow.rst:232
222222
msgid "This is commonly used for creating minimal classes::"
@@ -259,7 +259,7 @@ msgid ""
259259
"browse through code; it's good practice to include docstrings in code that "
260260
"you write, so make a habit of it."
261261
msgstr ""
262-
"如果函数内的第一条语句是字符串,则该字符串是文档字符串,也称为 :dfn:`docstring`,详见 :ref:`tut-"
262+
"函数内的第一条语句是字符串时,该字符串就是文档字符串,也称为 :dfn:`docstring`,详见 :ref:`tut-"
263263
"docstrings`。利用文档字符串可以自动生成在线文档或打印版文档,还可以让开发者在浏览代码时直接查阅文档;Python "
264264
"开发者最好养成在代码中加入文档字符串的好习惯。"
265265

@@ -277,7 +277,7 @@ msgid ""
277277
"statement), although they may be referenced."
278278
msgstr ""
279279
"函数的 *执行* "
280-
"引入新的函数局部变量符号表。函数的所有变量赋值都存在局部符号表中;引用变量时,首先在局部符号表里查找,然后是外层函数局部符号表,再是全局符号表,最后是内置名称符号表。因此,尽管可以引用全局变量和外层函数的变量,但最好不要在函数内直接赋值(除非是"
280+
"引入新的函数局部变量符号表。函数的所有变量赋值都存在局部符号表里;引用变量时,首先,在局部符号表里查找变量,然后,是外层函数局部符号表,再是全局符号表,最后是内置名称符号表。因此,尽管可以引用全局变量和外层函数的变量,但最好不要在函数内直接赋值(除非是"
281281
" :keyword:`global` 语句定义的全局变量,或 :keyword:`nonlocal` 语句定义的外层函数的变量)。"
282282

283283
#: ../../tutorial/controlflow.rst:294
@@ -467,9 +467,9 @@ msgid ""
467467
" may receive a value more than once. Here's an example that fails due to "
468468
"this restriction::"
469469
msgstr ""
470-
"在函数调用中,关键字参数必须跟随在位置参数的后面。传递的所有关键字参数必须与函数接受的其中一个参数匹配(比如 ``actor`` 不是函数 "
471-
"``parrot`` 的有效参数),它们的顺序并不重要。这也包括非可选参数,(比如 ``parrot(voltage=1000)`` "
472-
"也是有效的)。不能对同一个参数多次赋值。下面是一个因为此限制而失败的例子::"
470+
"函数调用时,关键字参数必须跟在位置参数后面。所有传递的关键字参数都必须匹配一个函数接受的参数(比如``actor`` 不是函数 ``parrot`` "
471+
"的有效参数),关键字参数的顺序并不重要。这也包括必选参数,(比如``parrot(voltage=1000)`` "
472+
"也有效)。不能对同一个参数多次赋值,下面就是一个因此限制而失败的例子:"
473473

474474
#: ../../tutorial/controlflow.rst:488
475475
msgid ""

0 commit comments

Comments
 (0)