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

Skip to content

Commit a98623a

Browse files
[po] auto sync
1 parent 650b7c7 commit a98623a

5 files changed

Lines changed: 73 additions & 48 deletions

File tree

c-api/buffer.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# Jiuh-star <[email protected]>, 2021
2020
# Dankinder <[email protected]>, 2021
2121
# helloworldSB <[email protected]>, 2021
22+
# jing li <[email protected]>, 2021
2223
# Freesand Leo <[email protected]>, 2021
2324
#
2425
#, fuzzy
@@ -294,13 +295,18 @@ msgid ""
294295
":c:member:`~Py_buffer.strides` and :c:member:`~Py_buffer.suboffsets` MUST be"
295296
" ``NULL``."
296297
msgstr ""
298+
"内存表示为 n 维数组的维数。 如果是``0``, :c:member:`~Py_buffer.buf` 指向表示标量的单个项目。 "
299+
"在这种情况下,:c:member:`~Py_buffer.shape`、:c:member:`~Py_buffer.strides` 和 "
300+
":c:member:`~Py_buffer.suboffsets` 必须是``NULL`` 。"
297301

298302
#: ../../c-api/buffer.rst:163
299303
msgid ""
300304
"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions "
301305
"to 64. Exporters MUST respect this limit, consumers of multi-dimensional "
302306
"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions."
303307
msgstr ""
308+
"宏 :c:macro:`PyBUF_MAX_NDIM` 将最大维度数限制为 64。 导出程序必须遵守这个限制,多维缓冲区的使用者应该能够处理最多 "
309+
":c:macro:`PyBUF_MAX_NDIM` 维度。"
304310

305311
#: ../../c-api/buffer.rst:169
306312
msgid ""
@@ -309,6 +315,9 @@ msgid ""
309315
"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to "
310316
":c:member:`~Py_buffer.len`."
311317
msgstr ""
318+
"一个长度为 :c:type:`Py_ssize_t` 的数组 :c:member:`~Py_buffer.ndim` 表示作为 n 维数组的内存形状。 "
319+
"请注意,``shape[0] * ... * shape[ndim-1] * itemsize`` 必须等于 "
320+
":c:member:`~Py_buffer.len`。"
312321

313322
#: ../../c-api/buffer.rst:174
314323
msgid ""

howto/logging-cookbook.po

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -401,24 +401,24 @@ msgid ""
401401
":meth:`~LoggerAdapter.process` to do what you need. Here is a simple "
402402
"example::"
403403
msgstr ""
404-
"使用 'extra' 的优点是这些键值对会被传入 :class:`LogRecord` 实例的 __dict__ 中,让你通过 "
405-
":class:`Formatter` 的实例直接使用定制的字符串,实例能找到这个字典类对象的键。 "
406-
"如果你需要一个其他的方法,比如说,想要在消息字符串前后增加上下文信息,你只需要创建一个 :class:`LoggerAdapter` 的子类,并覆盖它的"
407-
" :meth:`~LoggerAdapter.process` 方法来做你想做的事情,以下是一个简单的示例::"
404+
"使用extra”的好处,就是字典类对象中的值会被并入 :class:`LogRecord` 实例的 __dict__ 中,这样就能利用 "
405+
":class:`Formatter` 实例使用自定义字符串了,Formatter "
406+
"知道该如何使用字典类对象的键。若要用到其他方法,比如想在信息字符串中预置或追加上下文信息,只需继承 :class:`LoggerAdapter` 并覆盖"
407+
" :meth:`~LoggerAdapter.process` 方法即可完成处理。下面给出一个简单的示例:"
408408

409409
#: ../../howto/logging-cookbook.rst:615
410410
msgid "which you can use like this::"
411-
msgstr "你可以这样使用::"
411+
msgstr "用法可如下所示:"
412412

413413
#: ../../howto/logging-cookbook.rst:620
414414
msgid ""
415415
"Then any events that you log to the adapter will have the value of "
416416
"``some_conn_id`` prepended to the log messages."
417-
msgstr "然后,你记录在适配器中的任何事件消息前将添加``some_conn_id``的值。"
417+
msgstr "这样,只要是该 Adapter 处理的任何日志事件,消息前都会加上``some_conn_id`` 的值。"
418418

419419
#: ../../howto/logging-cookbook.rst:624
420420
msgid "Using objects other than dicts to pass contextual information"
421-
msgstr "使用除字典之外的其它对象传递上下文信息"
421+
msgstr "利用非字典对象传入上下文信息"
422422

423423
#: ../../howto/logging-cookbook.rst:626
424424
msgid ""
@@ -428,12 +428,12 @@ msgid ""
428428
"if you want to generate values dynamically (whereas the values in a dict "
429429
"would be constant)."
430430
msgstr ""
431-
"你不需要将一个实际的字典传递给 :class:`LoggerAdapter`-你可以传入一个实现了``__getitem__`` "
432-
"和``__iter__``的类的实例,这样它就像是一个字典。这对于你想动态生成值(而字典中的值往往是常量)将很有帮助。"
431+
"传给 :class:`LoggerAdapter` 的不一定要是真正的字典对象,也可以传入一个实现了 ``__getitem__`` "
432+
"和``__iter__`` 方法的类实例,类似要写入日志的字典对象。若要动态生成值(而字典中的值应为常量),这就会很有用。"
433433

434434
#: ../../howto/logging-cookbook.rst:635
435435
msgid "Using Filters to impart contextual information"
436-
msgstr "使用过滤器传递上下文信息"
436+
msgstr "利用 Filter 传递上下文信息"
437437

438438
#: ../../howto/logging-cookbook.rst:637
439439
msgid ""
@@ -443,8 +443,9 @@ msgid ""
443443
"can then be output using a suitable format string, or if needed a custom "
444444
":class:`Formatter`."
445445
msgstr ""
446-
"你也可以使用一个用户定义的类 :class:`Filter` 在日志输出中添加上下文信息。``Filter`` 的实例是被允许修改传入的 "
447-
"``LogRecords``,包括添加其他的属性,然后可以使用合适的格式化字符串输出,或者可以使用一个自定义的类 :class:`Formatter`。"
446+
"还可以利用用户定义类 :class:`Filter` 在日志输出中添加上下文信息。``Filter`` 实例可以修改传入的 "
447+
"``LogRecords``,包括添加额外的属性,然后可以采用合适的格式化字符串对这些属性进行输出,必要时还可采用自定义类 "
448+
":class:`Formatter`。"
448449

449450
#: ../../howto/logging-cookbook.rst:642
450451
msgid ""
@@ -457,18 +458,18 @@ msgid ""
457458
" same format string can be used to get similar output to that shown above. "
458459
"Here's an example script::"
459460
msgstr ""
460-
"例如,在一个web应用程序中,正在处理的请求(或者至少是请求的一部分),可以存储在一个线程本地 (:class:`threading.local`) "
461-
"变量中,然后从``Filter`` 中去访问。请求中的信息,如IP地址和用户名将被存储在``LogRecord``中,使用上例 "
462-
"``LoggerAdapter`` 中的 'ip' 和 'user' "
463-
"属性名。在这种情况下,可以使用相同的格式化字符串来得到上例中类似的输出结果。这是一段示例代码::"
461+
"例如在某 web 应用程序中,正在处理的请求(或至少是当前关注的部分),可存储于线程本地 (:class:`threading.local`) "
462+
"变量中,然后从``Filter`` 中去访问,把请求中的一些信息添加进去,比如在 ``LogRecord`` 中写入远程 IP "
463+
"地址和远程用户名,可利用以上 ``LoggerAdapter`` "
464+
"示例中的“ip”和“user”属性名。这时可采用与上例相同的格式化字符串来得到类似的输出结果。以下是一段示例代码:"
464465

465466
#: ../../howto/logging-cookbook.rst:688
466467
msgid "which, when run, produces something like:"
467468
msgstr "在运行时,产生如下内容:"
468469

469470
#: ../../howto/logging-cookbook.rst:709
470471
msgid "Logging to a single file from multiple processes"
471-
msgstr "从多个进程记录至单个文件"
472+
msgstr "在单个文件中记录多个进程的日志"
472473

473474
#: ../../howto/logging-cookbook.rst:711
474475
msgid ""
@@ -485,12 +486,11 @@ msgid ""
485486
" and includes a working socket receiver which can be used as a starting "
486487
"point for you to adapt in your own applications."
487488
msgstr ""
488-
"尽管 logging 是线程安全的,将单个进程中的多个线程日志记录至单个文件也 *是* 受支持的,但将 *多个进程* 中的日志记录至单个文件则 *不是*"
489-
" 受支持的,因为在 Python 中并没有在多个进程中实现对单个文件访问的序列化的标准方案。 "
490-
"如果你需要将多个进程中的日志记录至单个文件,有一个方案是让所有进程都将日志记录至一个 "
491-
":class:`~handlers.SocketHandler`,然后用一个实现了套接字服务器的单独进程一边从套接字中读取一边将日志记录至文件。 "
492-
"(如果愿意的话,你可以在一个现有进程中专门开一个线程来执行此项功能。) :ref:`这一部分 <network-logging>` "
493-
"文档对此方式有更详细的介绍,并包含一个可用的套接字接收器,你自己的应用可以在此基础上进行适配。"
489+
"尽管日志对象是线程安全的,也确实 *支持* 将一个进程中的多个线程日志记入单个文件,但 *不* 支持将 *多进程* 日志记入单个文件,因为 Python"
490+
" 没有标准方案来实现由多个进程串行访问单个文件。若要将多个进程的日志记入单个文件,一种方案是让所有进程都用一个 "
491+
":class:`~handlers.SocketHandler` "
492+
"处理日志,然后用一个单独的进程实现套接字服务器,一边从套接字读取数据一边向文件中写入日志。(当然可在某个现有进程中指定一个线程来执行此项功能。) "
493+
":ref:`此部分 <network-logging>` 更详细地介绍了这种做法,包含了一个套接字接收器,可以此为起点建立适合自己应用程序的代码。"
494494

495495
#: ../../howto/logging-cookbook.rst:724
496496
msgid ""
@@ -503,11 +503,10 @@ msgid ""
503503
" lock functionality on all platforms (see "
504504
"https://bugs.python.org/issue3770)."
505505
msgstr ""
506-
"你也可以编写你自己的处理程序,让其使用 :mod:`multiprocessing` 模块中的 "
507-
":class:`~multiprocessing.Lock` 类来顺序访问你的多个进程中的文件。 现有的 :class:`FileHandler` "
508-
"及其子类目前并不使用 :mod:`multiprocessing`,尽管它们将来可能会这样做。 "
509-
"请注意在目前,:mod:`multiprocessing` 模块并未在所有平台上都提供可用的锁功能 (参见 "
510-
"https://bugs.python.org/issue3770)。"
506+
"编写自己的 handler 也是可以的,可利用 :mod:`multiprocessing` 模块中的 "
507+
":class:`~multiprocessing.Lock` 类实现多个进程串行访问文件。现有的 :class:`FileHandler` "
508+
"及其子类目前没有用到 :mod:`multiprocessing`,或许将来有可能会吧。请注意,目前 :mod:`multiprocessing` "
509+
"模块并未在所有平台上都提供可用的同步锁功能(参见 https://bugs.python.org/issue3770)。"
511510

512511
#: ../../howto/logging-cookbook.rst:734
513512
msgid ""
@@ -523,16 +522,15 @@ msgid ""
523522
"application, and can be used as the basis for code meeting your own specific"
524523
" requirements::"
525524
msgstr ""
526-
"或者,你也可以使用 ``Queue`` 和 :class:`QueueHandler` 将所有的日志事件发送至你的多进程应用的一个进程中。 "
527-
"以下示例脚本演示了如何执行此操作。 在示例中,一个单独的监听进程负责监听其他进程的日志事件,并根据自己的配置记录。 "
528-
"尽管示例只演示了这种方法(例如你可能希望使用单独的监听线程而非监听进程 —— "
529-
"它们的实现是类似的),但你也可以在应用程序的监听进程和其他进程使用不同的配置,它可以作为满足你特定需求的一个基础::"
525+
"或者,还可以利用 ``Queue`` 和 :class:`QueueHandler` "
526+
"将所有的日志事件发送给自己的多进程应用中的某个进程。以下例程演示了这种做法,这里有一个单独的监听进程负责监听其他进程发来的日志事件,并根据自己的日志配置记入日志。尽管本例程只演示了一种实现方案(比如可能想用单独的监听线程而非进程"
527+
" —— 实现方式其实类似),但确实可以为应用程序的监听进程和其他进程采用不同的配置,作为满足特定需求代码的基础:"
530528

531529
#: ../../howto/logging-cookbook.rst:850
532530
msgid ""
533531
"A variant of the above script keeps the logging in the main process, in a "
534532
"separate thread::"
535-
msgstr "上面脚本的一个变种,仍然在主进程中记录日志,但使用一个单独的线程::"
533+
msgstr "上述代码可做个变化,在主进程中用单独的线程记录日志:"
536534

537535
#: ../../howto/logging-cookbook.rst:945
538536
msgid ""
@@ -543,8 +541,9 @@ msgid ""
543541
"events are generated in the worker processes) to direct the messages to the "
544542
"appropriate destinations."
545543
msgstr ""
546-
"这段变种的代码展示了如何使用特定的日志记录配置 - 例如``foo``记录器使用了特殊的处理程序,将 ``foo`` 子系统中所有的事件记录至一个文件 "
547-
"``mplog-foo.log``。在主进程(即使是在工作进程中产生的日志事件)的日志记录机制中将直接使用恰当的配置。"
544+
"这段改过的代码展示了如何为某日志对象应用指定配置 —— 比如 ``foo`` 日志对象有个特别的 handler,将 ``foo`` "
545+
"子系统的所有事件保存至文件 ``mplog-foo.log`` "
546+
"中。主进程的日志机制将会用到这段代码(即便日志事件是在其他的工作进程中产生的),将信息定向输出到指定的地方。"
548547

549548
#: ../../howto/logging-cookbook.rst:952
550549
msgid "Using concurrent.futures.ProcessPoolExecutor"
@@ -556,22 +555,24 @@ msgid ""
556555
"your worker processes, you need to create the queue slightly differently. "
557556
"Instead of"
558557
msgstr ""
558+
"若要利用 :class:`concurrent.futures.ProcessPoolExecutor` "
559+
"启动工作进程,创建队列的方式应稍有不同。不能是:"
559560

560561
#: ../../howto/logging-cookbook.rst:962
561562
msgid "you should use"
562563
msgstr ""
563564

564565
#: ../../howto/logging-cookbook.rst:968
565566
msgid "and you can then replace the worker creation from this::"
566-
msgstr ""
567+
msgstr "然后就可以将以下工作进程的创建过程:"
567568

568569
#: ../../howto/logging-cookbook.rst:979
569570
msgid "to this (remembering to first import :mod:`concurrent.futures`)::"
570571
msgstr ""
571572

572573
#: ../../howto/logging-cookbook.rst:987
573574
msgid "Using file rotation"
574-
msgstr "轮换日志文件"
575+
msgstr "利用日志文件轮换机制"
575576

576577
#: ../../howto/logging-cookbook.rst:992
577578
msgid ""
@@ -582,9 +583,8 @@ msgid ""
582583
"usage pattern, the logging package provides a "
583584
":class:`~handlers.RotatingFileHandler`::"
584585
msgstr ""
585-
"有时,你希望当日志文件不断记录增长至一定大小时,打开一个新的文件接着记录。 "
586-
"你可能希望只保留一定数量的日志文件,当不断的创建文件到达该数量时,又覆盖掉最开始的文件形成循环。 对于这种使用场景,日志包提供了 "
587-
":class:`~handlers.RotatingFileHandler`::"
586+
"有时需要让日志文件增长到指定大小,然后打开一个新文件并记入日志。或许还需要只保留一定数量的日志文件,当创建了指定数量的文件后,就轮换使用这些文件,以便让文件数量和大小都维持上限。logging"
587+
" 包为这种使用模式提供了 :class:`~handlers.RotatingFileHandler` :"
588588

589589
#: ../../howto/logging-cookbook.rst:1024
590590
msgid ""

library/ossaudiodev.po

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Zombie110year <[email protected]>, 2019
99
# ppcfish <[email protected]>, 2019
1010
# Freesand Leo <[email protected]>, 2020
11+
# jing li <[email protected]>, 2021
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
1819
"PO-Revision-Date: 2017-02-16 23:21+0000\n"
19-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
20+
"Last-Translator: jing li <tes286.lijing@gmail.com>, 2021\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -26,7 +27,7 @@ msgstr ""
2627

2728
#: ../../library/ossaudiodev.rst:2
2829
msgid ":mod:`ossaudiodev` --- Access to OSS-compatible audio devices"
29-
msgstr ""
30+
msgstr ":mod:`ossaudiodev` --- 访问兼容OSS的音频设备"
3031

3132
#: ../../library/ossaudiodev.rst:10
3233
msgid ""
@@ -35,6 +36,8 @@ msgid ""
3536
"Unices, and is the standard audio interface for Linux and recent versions of"
3637
" FreeBSD."
3738
msgstr ""
39+
"该模块允许您访问 OSS(开放式音响系统)音频接口。 OSS 可用于广泛的开源和商业 Unices,并且是 Linux 和最新版本的 FreeBSD "
40+
"的标准音频接口。"
3841

3942
#: ../../library/ossaudiodev.rst:42
4043
msgid ""
@@ -47,16 +50,18 @@ msgid ""
4750
"`Open Sound System Programmer's Guide "
4851
"<http://www.opensound.com/pguide/oss.pdf>`_"
4952
msgstr ""
53+
"`开放之声系统程序员手册\n"
54+
"<http://www.opensound.com/pguide/oss.pdf>`_"
5055

5156
#: ../../library/ossaudiodev.rst:50
5257
msgid "the official documentation for the OSS C API"
53-
msgstr ""
58+
msgstr "OSS C API 的官方文档"
5459

5560
#: ../../library/ossaudiodev.rst:52
5661
msgid ""
5762
"The module defines a large number of constants supplied by the OSS device "
5863
"driver; see ``<sys/soundcard.h>`` on either Linux or FreeBSD for a listing."
59-
msgstr ""
64+
msgstr "该模块定义了大量由OSS设备驱动提供的常量; 请参阅``<sys/soundcard.h>`` Linux 或 FreeBSD 上的列表。"
6065

6166
#: ../../library/ossaudiodev.rst:55
6267
msgid ":mod:`ossaudiodev` defines the following variables and functions:"

library/tkinter.tix.po

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6+
# Translators:
7+
# jing li <[email protected]>, 2021
8+
# Freesand Leo <[email protected]>, 2021
9+
#
610
#, fuzzy
711
msgid ""
812
msgstr ""
913
"Project-Id-Version: Python 3.9\n"
1014
"Report-Msgid-Bugs-To: \n"
1115
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
1216
"PO-Revision-Date: 2017-02-16 23:31+0000\n"
17+
"Last-Translator: Freesand Leo <[email protected]>, 2021\n"
1318
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1419
"MIME-Version: 1.0\n"
1520
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,17 +24,17 @@ msgstr ""
1924

2025
#: ../../library/tkinter.tix.rst:2
2126
msgid ":mod:`tkinter.tix` --- Extension widgets for Tk"
22-
msgstr ""
27+
msgstr ":mod:`tkinter.tix` --- TK扩展包"
2328

2429
#: ../../library/tkinter.tix.rst:9
2530
msgid "**Source code:** :source:`Lib/tkinter/tix.py`"
26-
msgstr ""
31+
msgstr "**源代码:** :source:`Lib/tkinter/tix.py`"
2732

2833
#: ../../library/tkinter.tix.rst:13
2934
msgid ""
3035
"This Tk extension is unmaintained and should not be used in new code. Use "
3136
":mod:`tkinter.ttk` instead."
32-
msgstr ""
37+
msgstr "这个 TK 扩展已无人维护所以请不要在新代码中使用。 请改用 :mod:`tkinter.ttk`。"
3338

3439
#: ../../library/tkinter.tix.rst:19
3540
msgid ""
@@ -169,6 +174,9 @@ msgid ""
169174
"into the entry. The new value will be checked against the user-defined upper"
170175
" and lower limits."
171176
msgstr ""
177+
"The `Control "
178+
"<http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixControl.htm>`_ "
179+
"控件又名 :class:`SpinBox` 控件。 用户可通过点按两个方向键或直接输入内容来调整数值。 更新的数值将被检查是否在用户定义的上下限之内。"
172180

173181
#: ../../library/tkinter.tix.rst:140
174182
msgid ""

whatsnew/changelog.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# Dai Xu <[email protected]>, 2021
2222
# isaced <[email protected]>, 2021
2323
# Freesand Leo <[email protected]>, 2021
24+
# jing li <[email protected]>, 2021
2425
#
2526
#, fuzzy
2627
msgid ""
@@ -29,7 +30,7 @@ msgstr ""
2930
"Report-Msgid-Bugs-To: \n"
3031
"POT-Creation-Date: 2021-07-10 06:51+0000\n"
3132
"PO-Revision-Date: 2017-02-16 23:45+0000\n"
32-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
33+
"Last-Translator: jing li <tes286.lijing@gmail.com>, 2021\n"
3334
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
3435
"MIME-Version: 1.0\n"
3536
"Content-Type: text/plain; charset=UTF-8\n"
@@ -884,6 +885,8 @@ msgid ""
884885
"`bpo-43882 <https://bugs.python.org/issue43882>`__: The presence of newline "
885886
"or tab characters in parts of a URL could allow some forms of attacks."
886887
msgstr ""
888+
"`bpo-43882 <https://bugs.python.org/issue43882>`__: "
889+
"URL部分出现的换行或制表符可能会应许某些形式的攻击。"
887890

888891
#: ../../../build/NEWS:310
889892
msgid ""

0 commit comments

Comments
 (0)