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

Skip to content

Commit 2f003df

Browse files
[po] auto sync
1 parent 841a672 commit 2f003df

12 files changed

Lines changed: 1248 additions & 1298 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.52%", "updated_at": "2024-03-10T15:41:54Z"}
1+
{"translation": "92.46%", "updated_at": "2024-03-15T17:41:51Z"}

faq/design.po

Lines changed: 102 additions & 96 deletions
Large diffs are not rendered by default.

faq/extending.po

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2023, Python Software Foundation
2+
# Copyright (C) 2001-2024, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.11\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 14:43+0000\n"
14+
"POT-Creation-Date: 2024-03-15 16:48+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:10+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -85,18 +85,12 @@ msgid ""
8585
"If you need to interface to some C or C++ library for which no Python "
8686
"extension currently exists, you can try wrapping the library's data types "
8787
"and functions with a tool such as `SWIG <https://www.swig.org>`_. `SIP "
88-
"<https://riverbankcomputing.com/software/sip/intro>`__, `CXX "
88+
"<https://github.com/Python-SIP/sip>`__, `CXX "
8989
"<https://cxx.sourceforge.net/>`_ `Boost "
9090
"<https://www.boost.org/libs/python/doc/index.html>`_, or `Weave "
9191
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
9292
"libraries."
9393
msgstr ""
94-
"如果你需要针对某些当前不存在 C or C++ library for which no Python 扩展的 C 或 C++ 库的接口,可以尝试使用 "
95-
"`SWIG <https://www.swig.org>`_ 等工具来包装这些库的数据类型和函数。 `SIP "
96-
"<https://riverbankcomputing.com/software/sip/intro>`__, `CXX "
97-
"<https://cxx.sourceforge.net/>`_ `Boost "
98-
"<https://www.boost.org/libs/python/doc/index.html>`_ 或者 `Weave "
99-
"<https://github.com/scipy/weave>`_ 也是用于包装 C++ 库的替代方案。"
10094

10195
#: ../../faq/extending.rst:61
10296
msgid "How can I execute arbitrary Python statements from C?"

glossary.po

Lines changed: 123 additions & 125 deletions
Large diffs are not rendered by default.

howto/logging-cookbook.po

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.11\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-02-23 16:44+0000\n"
14+
"POT-Creation-Date: 2024-03-15 16:48+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:11+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -1254,27 +1254,27 @@ msgstr ""
12541254
"你还可以子类化 :class:`QueueListener` 来从其他类型的队列中获取消息,比如从 ZeroMQ 'subscribe' 套接字。 "
12551255
"下面是一个例子::"
12561256

1257-
#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3950
1257+
#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3973
12581258
msgid "Module :mod:`logging`"
12591259
msgstr "模块 :mod:`logging`"
12601260

1261-
#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3950
1261+
#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3973
12621262
msgid "API reference for the logging module."
12631263
msgstr "日志记录模块的 API 参考。"
12641264

1265-
#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3953
1265+
#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3976
12661266
msgid "Module :mod:`logging.config`"
12671267
msgstr ":mod:`logging.config` 模块"
12681268

1269-
#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3953
1269+
#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3976
12701270
msgid "Configuration API for the logging module."
12711271
msgstr "日志记录模块的配置 API 。"
12721272

1273-
#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3956
1273+
#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3979
12741274
msgid "Module :mod:`logging.handlers`"
12751275
msgstr ":mod:`logging.handlers` 模块"
12761276

1277-
#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3956
1277+
#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3979
12781278
msgid "Useful handlers included with the logging module."
12791279
msgstr "日志记录模块附带的有用处理器。"
12801280

@@ -2172,17 +2172,17 @@ msgstr ""
21722172

21732173
#: ../../howto/logging-cookbook.rst:3421
21742174
msgid ""
2175-
"The code should work with recent releases of either ``PySide2`` or "
2176-
"``PyQt5``. You should be able to adapt the approach to earlier versions of "
2177-
"Qt. Please refer to the comments in the code snippet for more detailed "
2178-
"information."
2179-
msgstr "以下代码应能适用于最新版的 ``PySide2`` 或 ``PyQt5``。对于低版本的 Qt 应该也能适用。更多详情,请参阅代码注释。"
2175+
"The code should work with recent releases of either ``PySide6``, ``PyQt6``, "
2176+
"``PySide2`` or ``PyQt5``. You should be able to adapt the approach to "
2177+
"earlier versions of Qt. Please refer to the comments in the code snippet for"
2178+
" more detailed information."
2179+
msgstr ""
21802180

2181-
#: ../../howto/logging-cookbook.rst:3635
2181+
#: ../../howto/logging-cookbook.rst:3658
21822182
msgid "Logging to syslog with RFC5424 support"
21832183
msgstr "将日志记录到带有 RFC5424 支持的 syslog"
21842184

2185-
#: ../../howto/logging-cookbook.rst:3637
2185+
#: ../../howto/logging-cookbook.rst:3660
21862186
msgid ""
21872187
"Although :rfc:`5424` dates from 2009, most syslog servers are configured by "
21882188
"detault to use the older :rfc:`3164`, which hails from 2001. When "
@@ -2196,7 +2196,7 @@ msgstr ""
21962196
"诞生后,它还没有被广泛部署到 syslog 服务器上,因此 :class:`~logging.handlers.SysLogHandler` "
21972197
"的功能也没有被更新。"
21982198

2199-
#: ../../howto/logging-cookbook.rst:3644
2199+
#: ../../howto/logging-cookbook.rst:3667
22002200
msgid ""
22012201
"RFC 5424 contains some useful features such as support for structured data, "
22022202
"and if you need to be able to log to a syslog server with support for it, "
@@ -2205,7 +2205,7 @@ msgstr ""
22052205
"RFC 5424 包括一些有用的特性例如对结构化数据的支持等,如果你想要能够将日志记录到带有该协议支持的 syslog "
22062206
"服务器上,你可以使用一个看起来像是这样的子类化处理句柄来实现::"
22072207

2208-
#: ../../howto/logging-cookbook.rst:3710
2208+
#: ../../howto/logging-cookbook.rst:3733
22092209
msgid ""
22102210
"You'll need to be familiar with RFC 5424 to fully understand the above code,"
22112211
" and it may be that you have slightly different needs (e.g. for how you pass"
@@ -2216,11 +2216,11 @@ msgstr ""
22162216
"你需要熟悉 RFC 5424 才能完全理解上面的代码,你还可能会有稍加变化的的需求(例如你要如何将结构化数据记入日志)。 "
22172217
"不管怎样,上面的代码应当根据你的特定需求来灵活调整。 通过上面的处理句柄,你可以使用类似这样的代码来传入结构化数据::"
22182218

2219-
#: ../../howto/logging-cookbook.rst:3724
2219+
#: ../../howto/logging-cookbook.rst:3747
22202220
msgid "How to treat a logger like an output stream"
22212221
msgstr "如何将日志记录器作为输出流"
22222222

2223-
#: ../../howto/logging-cookbook.rst:3726
2223+
#: ../../howto/logging-cookbook.rst:3749
22242224
msgid ""
22252225
"Sometimes, you need to interface to a third-party API which expects a file-"
22262226
"like object to write to, but you want to direct the API's output to a "
@@ -2230,18 +2230,18 @@ msgstr ""
22302230
"有时,你需要通过接口访问某个预期要写入到文件型对象第三方 API,但你希望将 API 的输出重定向到一个日志记录器。 你可以使用一个以文件类 API "
22312231
"来包装日志记录器的类。 下面是一个演示这样的类的简短脚本:"
22322232

2233-
#: ../../howto/logging-cookbook.rst:3766
2233+
#: ../../howto/logging-cookbook.rst:3789
22342234
msgid "When this script is run, it prints"
22352235
msgstr "当此脚本运行时,它将打印"
22362236

2237-
#: ../../howto/logging-cookbook.rst:3773
2237+
#: ../../howto/logging-cookbook.rst:3796
22382238
msgid ""
22392239
"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and "
22402240
"``sys.stderr`` by doing something like this:"
22412241
msgstr ""
22422242
"你还可以使用 ``LoggerWriter`` 通过下面这样的做法来重定向 ``sys.stdout`` 和 ``sys.stderr``:"
22432243

2244-
#: ../../howto/logging-cookbook.rst:3783
2244+
#: ../../howto/logging-cookbook.rst:3806
22452245
msgid ""
22462246
"You should do this *after* configuring logging for your needs. In the above "
22472247
"example, the :func:`~logging.basicConfig` call does this (using the "
@@ -2251,15 +2251,15 @@ msgstr ""
22512251
"你应当在根据需要配置日志记录 *之后* 再这样做。 在上面的例子中,:func:`~logging.basicConfig` 调用执行了此操作(在 "
22522252
"``sys.stderr`` 被一个 ``LoggerWriter`` 实例覆盖 *之前* 使用它的值)。 然后,你将得到这样的结果:"
22532253

2254-
#: ../../howto/logging-cookbook.rst:3796
2254+
#: ../../howto/logging-cookbook.rst:3819
22552255
msgid ""
22562256
"Of course, the examples above show output according to the format used by "
22572257
":func:`~logging.basicConfig`, but you can use a different formatter when you"
22582258
" configure logging."
22592259
msgstr ""
22602260
"当然,上面的例子是按照 :func:`~logging.basicConfig` 所使用的格式来显示输出的,但你也可以在配置日志记录时使用其他的格式。"
22612261

2262-
#: ../../howto/logging-cookbook.rst:3800
2262+
#: ../../howto/logging-cookbook.rst:3823
22632263
msgid ""
22642264
"Note that with the above scheme, you are somewhat at the mercy of buffering "
22652265
"and the sequence of write calls which you are intercepting. For example, "
@@ -2268,11 +2268,11 @@ msgstr ""
22682268
"请注意当使用上面的预置方案时,你将在一定程度上受到你所拦截的写入调用的缓冲和顺序的控制。 例如,在使用上述 ``LoggerWriter`` "
22692269
"的定义的情况下,如果你使用代码段"
22702270

2271-
#: ../../howto/logging-cookbook.rst:3809
2271+
#: ../../howto/logging-cookbook.rst:3832
22722272
msgid "then running the script results in"
22732273
msgstr "则运行该脚本的结果为"
22742274

2275-
#: ../../howto/logging-cookbook.rst:3827
2275+
#: ../../howto/logging-cookbook.rst:3850
22762276
msgid ""
22772277
"As you can see, this output isn't ideal. That's because the underlying code "
22782278
"which writes to ``sys.stderr`` makes mutiple writes, each of which results "
@@ -2285,17 +2285,17 @@ msgstr ""
22852285
"的代码会执行多次写入,每次写入将产生一条单独的日志记录行(例如,上面的最后三行)。 要避免这个问题,你需要使用缓冲并且只在看到换行符时才输出日志记录行。"
22862286
" 让我们使用一个更好些的 ``LoggerWriter`` 实现:"
22872287

2288-
#: ../../howto/logging-cookbook.rst:3852
2288+
#: ../../howto/logging-cookbook.rst:3875
22892289
msgid ""
22902290
"This just buffers up stuff until a newline is seen, and then logs complete "
22912291
"lines. With this approach, you get better output:"
22922292
msgstr "这段代码对内容进行了缓冲直至遇到换行符,然后将完整的行写入日志记录。 通过这种方式,你将得到更好的输出:"
22932293

2294-
#: ../../howto/logging-cookbook.rst:3868
2294+
#: ../../howto/logging-cookbook.rst:3891
22952295
msgid "Patterns to avoid"
22962296
msgstr "理应避免的用法"
22972297

2298-
#: ../../howto/logging-cookbook.rst:3870
2298+
#: ../../howto/logging-cookbook.rst:3893
22992299
msgid ""
23002300
"Although the preceding sections have described ways of doing things you "
23012301
"might need to do or deal with, it is worth mentioning some usage patterns "
@@ -2304,11 +2304,11 @@ msgid ""
23042304
msgstr ""
23052305
"前几节虽介绍了几种方案,描述了可能需要处理的操作,但值得一提的是,有些用法是 *没有好处* 的,大多数情况下应该避免使用。下面几节的顺序不分先后。"
23062306

2307-
#: ../../howto/logging-cookbook.rst:3876
2307+
#: ../../howto/logging-cookbook.rst:3899
23082308
msgid "Opening the same log file multiple times"
23092309
msgstr "多次打开同一个日志文件"
23102310

2311-
#: ../../howto/logging-cookbook.rst:3878
2311+
#: ../../howto/logging-cookbook.rst:3901
23122312
msgid ""
23132313
"On Windows, you will generally not be able to open the same file multiple "
23142314
"times as this will lead to a \"file is in use by another process\" error. "
@@ -2318,33 +2318,33 @@ msgstr ""
23182318
"因会导致 \"文件被其他进程占用 \"错误,所以在 Windows 中一般无法多次打开同一个文件。但在 POSIX "
23192319
"平台中,多次打开同一个文件不会报任何错误。这种操作可能是意外发生的,比如:"
23202320

2321-
#: ../../howto/logging-cookbook.rst:3883
2321+
#: ../../howto/logging-cookbook.rst:3906
23222322
msgid ""
23232323
"Adding a file handler more than once which references the same file (e.g. by"
23242324
" a copy/paste/forget-to-change error)."
23252325
msgstr "多次添加指向同一文件的 handler(比如通过复制/粘贴,或忘记修改)。"
23262326

2327-
#: ../../howto/logging-cookbook.rst:3886
2327+
#: ../../howto/logging-cookbook.rst:3909
23282328
msgid ""
23292329
"Opening two files that look different, as they have different names, but are"
23302330
" the same because one is a symbolic link to the other."
23312331
msgstr "打开两个貌似不同(文件名不一样)的文件,但一个是另一个的符号链接,所以其实是同一个文件。"
23322332

2333-
#: ../../howto/logging-cookbook.rst:3889
2333+
#: ../../howto/logging-cookbook.rst:3912
23342334
msgid ""
23352335
"Forking a process, following which both parent and child have a reference to"
23362336
" the same file. This might be through use of the :mod:`multiprocessing` "
23372337
"module, for example."
23382338
msgstr ""
23392339
"进程 fork,然后父进程和子进程都有对同一文件的引用。 例如,这可能是通过使用 :mod:`multiprocessing` 模块实现的。"
23402340

2341-
#: ../../howto/logging-cookbook.rst:3893
2341+
#: ../../howto/logging-cookbook.rst:3916
23422342
msgid ""
23432343
"Opening a file multiple times might *appear* to work most of the time, but "
23442344
"can lead to a number of problems in practice:"
23452345
msgstr "在大多数情况下,多次打开同一个文件 *貌似* 一切正常,但实际会导致很多问题。"
23462346

2347-
#: ../../howto/logging-cookbook.rst:3896
2347+
#: ../../howto/logging-cookbook.rst:3919
23482348
msgid ""
23492349
"Logging output can be garbled because multiple threads or processes try to "
23502350
"write to the same file. Although logging guards against concurrent use of "
@@ -2355,7 +2355,7 @@ msgstr ""
23552355
"由于多个线程或进程会尝试写入同一个文件,日志输出可能会出现乱码。尽管日志对象可以防止多个线程同时使用同一个 handler "
23562356
"实例,但如果两个不同的线程使用不同的 handler 实例同时写入文件,而这两个 handler 又恰好指向同一个文件,那么就失去了这种防护。"
23572357

2358-
#: ../../howto/logging-cookbook.rst:3902
2358+
#: ../../howto/logging-cookbook.rst:3925
23592359
msgid ""
23602360
"An attempt to delete a file (e.g. during file rotation) silently fails, "
23612361
"because there is another reference pointing to it. This can lead to "
@@ -2368,17 +2368,17 @@ msgstr ""
23682368
"日志条目会出现在意想不到的地方,或者完全丢失。 "
23692369
"或者会有应当移除的文件仍然保持存在,文件还会在已经设置了基于文件大小的轮换的情况下仍然增长到预料之外的大小。"
23702370

2371-
#: ../../howto/logging-cookbook.rst:3909
2371+
#: ../../howto/logging-cookbook.rst:3932
23722372
msgid ""
23732373
"Use the techniques outlined in :ref:`multiple-processes` to circumvent such "
23742374
"issues."
23752375
msgstr "请用 :ref:`multiple-processes` 中介绍的技术来避免上述问题。"
23762376

2377-
#: ../../howto/logging-cookbook.rst:3913
2377+
#: ../../howto/logging-cookbook.rst:3936
23782378
msgid "Using loggers as attributes in a class or passing them as parameters"
23792379
msgstr "将日志对象用作属性或传递参数"
23802380

2381-
#: ../../howto/logging-cookbook.rst:3915
2381+
#: ../../howto/logging-cookbook.rst:3938
23822382
msgid ""
23832383
"While there might be unusual cases where you'll need to do this, in general "
23842384
"there is no point because loggers are singletons. Code can always access a "
@@ -2392,13 +2392,13 @@ msgstr ""
23922392
"用名称访问一个已有的日志对象实例,因此将实例作为参数来传递,或作为属性留存,都是毫无意义的。请注意,在其他语言中,如 Java 和 "
23932393
"C#,日志对象通常是静态类属性。但在 Python 中是没有意义的,因为软件拆分的单位是模块(而不是类)。"
23942394

2395-
#: ../../howto/logging-cookbook.rst:3924
2395+
#: ../../howto/logging-cookbook.rst:3947
23962396
msgid ""
23972397
"Adding handlers other than :class:`~logging.NullHandler` to a logger in a "
23982398
"library"
23992399
msgstr "为库中的日志记录器添加 :class:`~logging.NullHandler` 以外的处理句柄"
24002400

2401-
#: ../../howto/logging-cookbook.rst:3926
2401+
#: ../../howto/logging-cookbook.rst:3949
24022402
msgid ""
24032403
"Configuring logging by adding handlers, formatters and filters is the "
24042404
"responsibility of the application developer, not the library developer. If "
@@ -2409,11 +2409,11 @@ msgstr ""
24092409
"来配置日志,这是应用程序开发人员的责任,而不是库开发人员该做的。如果正在维护一个库,请确保不要向任何日志对象添加 "
24102410
":class:`~logging.NullHandler` 实例以外的 handler。"
24112411

2412-
#: ../../howto/logging-cookbook.rst:3932
2412+
#: ../../howto/logging-cookbook.rst:3955
24132413
msgid "Creating a lot of loggers"
24142414
msgstr "创建大量的日志对象"
24152415

2416-
#: ../../howto/logging-cookbook.rst:3934
2416+
#: ../../howto/logging-cookbook.rst:3957
24172417
msgid ""
24182418
"Loggers are singletons that are never freed during a script execution, and "
24192419
"so creating lots of loggers will use up memory which can't then be freed. "
@@ -2427,14 +2427,14 @@ msgstr ""
24272427
" :ref:`已有机制 <context-info>` "
24282428
"将上下文信息传给自定义日志对象,并将创建的日志对象限制在应用程序内的指定区域(通常是模块,但偶尔会再精细些)使用。"
24292429

2430-
#: ../../howto/logging-cookbook.rst:3945
2430+
#: ../../howto/logging-cookbook.rst:3968
24312431
msgid "Other resources"
24322432
msgstr "其他资源"
24332433

2434-
#: ../../howto/logging-cookbook.rst:3958
2434+
#: ../../howto/logging-cookbook.rst:3981
24352435
msgid ":ref:`Basic Tutorial <logging-basic-tutorial>`"
24362436
msgstr ":ref:`基础教程 <logging-basic-tutorial>`"
24372437

2438-
#: ../../howto/logging-cookbook.rst:3960
2438+
#: ../../howto/logging-cookbook.rst:3983
24392439
msgid ":ref:`Advanced Tutorial <logging-advanced-tutorial>`"
24402440
msgstr ":ref:`进阶教程 <logging-advanced-tutorial>`"

0 commit comments

Comments
 (0)