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

Skip to content

Commit 858a975

Browse files
committed
[po] auto sync bot
1 parent 0010f57 commit 858a975

4 files changed

Lines changed: 45 additions & 18 deletions

File tree

extending/extending.po

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ msgstr "回到例子"
376376
msgid ""
377377
"Going back to our example function, you should now be able to understand "
378378
"this statement::"
379-
msgstr ""
379+
msgstr "回到前面的例子,你应该明白下面的代码:"
380380

381381
#: ../../extending/extending.rst:271
382382
msgid ""
@@ -388,12 +388,17 @@ msgid ""
388388
"which it points (so in Standard C, the variable :c:data:`command` should "
389389
"properly be declared as ``const char *command``)."
390390
msgstr ""
391+
"就是为了报告解释器一个异常而返回 *NULL* "
392+
"(表示函数返回错误)。如果执行正常则变量会拷贝到本地,后面的变量都应该以指针的方式提供,以方便设置变量。本例中的command会被声明为( "
393+
"\"const char* command\" 。)"
391394

392395
#: ../../extending/extending.rst:279
393396
msgid ""
394397
"The next statement is a call to the Unix function :c:func:`system`, passing "
395398
"it the string we just got from :c:func:`PyArg_ParseTuple`::"
396399
msgstr ""
400+
"下一个语句使用UNIX系统函数 :c:func:`system` ,传递给他的参数是刚才从 :c:func:`PyArg_ParseTuple` "
401+
"取出的:"
397402

398403
#: ../../extending/extending.rst:284
399404
msgid ""
@@ -406,7 +411,7 @@ msgstr ""
406411
msgid ""
407412
"In this case, it will return an integer object. (Yes, even integers are "
408413
"objects on the heap in Python!)"
409-
msgstr ""
414+
msgstr "在这种情况下,会返回一个整数对象,(这个对象会在Python堆里面管理)。"
410415

411416
#: ../../extending/extending.rst:292
412417
msgid ""
@@ -415,23 +420,28 @@ msgid ""
415420
"``None``. You need this idiom to do so (which is implemented by the "
416421
":c:macro:`Py_RETURN_NONE` macro)::"
417422
msgstr ""
423+
"如果你的C函数没有有用的返回值(返回 :c:type:`void` 的函数),则必须返回 ``None`` 。(你可以用 "
424+
":c:macro:`Py_RETUN_NONE` 宏来完成):"
418425

419426
#: ../../extending/extending.rst:300
420427
msgid ""
421428
":c:data:`Py_None` is the C name for the special Python object ``None``. It "
422429
"is a genuine Python object rather than a *NULL* pointer, which means "
423430
"\"error\" in most contexts, as we have seen."
424431
msgstr ""
432+
":c:data:`Py_None` 是一个C名字指定Python对象 ``None`` 。这是一个真正的PY对象,而不是 *NULL* 指针。"
425433

426434
#: ../../extending/extending.rst:308
427435
msgid "The Module's Method Table and Initialization Function"
428-
msgstr ""
436+
msgstr "模块方法表和初始化函数"
429437

430438
#: ../../extending/extending.rst:310
431439
msgid ""
432440
"I promised to show how :c:func:`spam_system` is called from Python programs."
433441
" First, we need to list its name and address in a \"method table\"::"
434442
msgstr ""
443+
"为了展示 :c:func:`spam_system` 如何被Python程序调用。把函数声明为可以被Python调用,需要先定义一个方法表 "
444+
"\"method table\" 。"
435445

436446
#: ../../extending/extending.rst:321
437447
msgid ""
@@ -441,6 +451,9 @@ msgid ""
441451
"value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` "
442452
"is used."
443453
msgstr ""
454+
"注意第三个参数 ( ``METH_VARARGS`` ) ,这个标志指定会使用C的调用惯例。可选值有 ``METH_VARARGS`` 、 "
455+
"``METH_VARARGS | METH_KEYWORDS`` 。值 ``0`` 代表使用 :c:func:`PyArg_ParseTuple` "
456+
"的陈旧变量。"
444457

445458
#: ../../extending/extending.rst:326
446459
msgid ""
@@ -449,6 +462,8 @@ msgid ""
449462
":c:func:`PyArg_ParseTuple`; more information on this function is provided "
450463
"below."
451464
msgstr ""
465+
"如果单独使用 ``METH_VARARGS`` ,函数会等待Python传来tuple格式的参数,并最终使用 "
466+
":c:func:`PyArg_ParseTuple` 进行解析。"
452467

453468
#: ../../extending/extending.rst:330
454469
msgid ""
@@ -458,6 +473,8 @@ msgid ""
458473
" keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments "
459474
"to such a function."
460475
msgstr ""
476+
":const:`METH_KEYWORDS` 值表示接受关键字参数。这种情况下C函数需要接受第三个 ``PyObject *`` "
477+
"对象,表示字典参数,使用 :c:func:`PyArg_ParseTupleAndKeywords` 来解析出参数。"
461478

462479
#: ../../extending/extending.rst:336
463480
msgid ""

library/os.po

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# isombyt <[email protected]>, 2019
1414
# Trim21 <[email protected]>, 2019
1515
# sgqy <[email protected]>, 2019
16-
# 林行众 <[email protected]>, 2019
1716
# Freesand Leo <[email protected]>, 2019
17+
# 林行众 <[email protected]>, 2019
1818
#
1919
#, fuzzy
2020
msgid ""
@@ -23,7 +23,7 @@ msgstr ""
2323
"Report-Msgid-Bugs-To: \n"
2424
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
2525
"PO-Revision-Date: 2017-02-16 23:20+0000\n"
26-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
26+
"Last-Translator: 林行众 <linxzh1989@gmail.com>, 2019\n"
2727
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2828
"MIME-Version: 1.0\n"
2929
"Content-Type: text/plain; charset=UTF-8\n"
@@ -763,7 +763,7 @@ msgid ""
763763
":func:`popen` or :func:`fork` and :func:`execv`."
764764
msgstr ""
765765
"取消设置(删除)名为 *key* 的环境变量。变量名的改变会影响由 "
766-
":func:`os.system`,,:func:`popen`,:func:`fork` 和 :func:`execv` 触发的子进程。"
766+
":func:`os.system`,:func:`popen`,:func:`fork` 和 :func:`execv` 触发的子进程。"
767767

768768
#: ../../library/os.rst:640
769769
msgid ""
@@ -837,34 +837,39 @@ msgid ""
837837
"\"file object\" returned by the built-in function :func:`open` or by "
838838
":func:`popen` or :func:`fdopen`, use its :meth:`~io.IOBase.close` method."
839839
msgstr ""
840+
"该功能适用于低级 I/O 操作,必须用于 :func:`os.open` 或 :func:`pipe` 返回的文件描述符。关闭由内建函数 "
841+
":func:`open` , :func:`popen` 或 :func:`fdopen` 返回的 \"文件对象\",则使用其相应的 "
842+
":meth:`~io.IOBase.close` 方法。"
840843

841844
#: ../../library/os.rst:699
842845
msgid ""
843846
"Close all file descriptors from *fd_low* (inclusive) to *fd_high* "
844847
"(exclusive), ignoring errors. Equivalent to (but much faster than)::"
845-
msgstr ""
848+
msgstr "关闭从 *fd_low* (包括)到 *fd_high* (排除)间的文件描述符,并忽略错误。类似(但快于)::"
846849

847850
#: ../../library/os.rst:711
848851
msgid ""
849852
"Return a string describing the encoding of the device associated with *fd* "
850853
"if it is connected to a terminal; else return :const:`None`."
851-
msgstr ""
854+
msgstr "如果连接到终端,则返回一个与 *fd* 关联的设备描述字符,否则返回 :const:`None`。"
852855

853856
#: ../../library/os.rst:717
854857
msgid ""
855858
"Return a duplicate of file descriptor *fd*. The new file descriptor is :ref"
856859
":`non-inheritable <fd_inheritance>`."
857-
msgstr ""
860+
msgstr "返回一个文件描述符 *fd* 的副本。该文件描述符的副本是 :ref:`不可继承的<fd_inheritance>`。"
858861

859862
#: ../../library/os.rst:720
860863
msgid ""
861864
"On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: "
862865
"stderr), the new file descriptor is :ref:`inheritable <fd_inheritance>`."
863866
msgstr ""
867+
"在 Windows 中,当复制一个标准流(0: stdin, 1: stdout, 2: stderr)时,新的文件描述符是 "
868+
":ref:`可继承的<fd_inheritance>`。 "
864869

865870
#: ../../library/os.rst:724 ../../library/os.rst:914
866871
msgid "The new file descriptor is now non-inheritable."
867-
msgstr ""
872+
msgstr "新的文件描述符现在是不可继承的。"
868873

869874
#: ../../library/os.rst:730
870875
msgid ""
@@ -876,7 +881,7 @@ msgstr ""
876881

877882
#: ../../library/os.rst:735
878883
msgid "Add the optional *inheritable* parameter."
879-
msgstr ""
884+
msgstr "添加可选参数 *inheritable*。"
880885

881886
#: ../../library/os.rst:738
882887
msgid "Return *fd2* on success. Previously, ``None`` was always returned."
@@ -888,6 +893,8 @@ msgid ""
888893
"docs for :func:`chmod` for possible values of *mode*. As of Python 3.3, "
889894
"this is equivalent to ``os.chmod(fd, mode)``."
890895
msgstr ""
896+
"将 *fd* 指定文件的权限状态修改为 *mode*。可以参考 :func:`chmod` 中列出 *mode* 的可用值。从Python "
897+
"3.3开始,这相当于 ``os.chmod(fd, mode)``。"
891898

892899
#: ../../library/os.rst:753
893900
msgid ""
@@ -896,16 +903,18 @@ msgid ""
896903
":func:`chown`. As of Python 3.3, this is equivalent to ``os.chown(fd, uid, "
897904
"gid)``."
898905
msgstr ""
906+
"分别将 *fd* 指定文件的所有者和组 ID 修改为 *uid* 和 *gid* 的值。若不想变更其中的某个 ID,可将相应值设为 -1。参考 "
907+
":func:`chown`。从 Python 3.3 开始,这相当于 ``os.chown(fd, uid, gid)``。"
899908

900909
#: ../../library/os.rst:763
901910
msgid ""
902911
"Force write of file with filedescriptor *fd* to disk. Does not force update "
903912
"of metadata."
904-
msgstr ""
913+
msgstr "强制将文件描述符 *fd* 指定文件写入磁盘。不强制更新元数据。"
905914

906915
#: ../../library/os.rst:769
907916
msgid "This function is not available on MacOS."
908-
msgstr ""
917+
msgstr "该功能在 MacOS 中不可用。"
909918

910919
#: ../../library/os.rst:774
911920
msgid ""

library/pathlib.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ msgstr ""
255255
msgid ""
256256
"Calling :class:`bytes` is only recommended under Unix. Under Windows, the "
257257
"unicode form is the canonical representation of filesystem paths."
258-
msgstr ""
258+
msgstr "只推荐在 Unix 下调用 :class:`bytes`。在 Windows, unicode 形式是文件系统路径的规范表示法。"
259259

260260
#: ../../library/pathlib.rst:251
261261
msgid "Accessing individual parts"
262-
msgstr ""
262+
msgstr "访问个别部分"
263263

264264
#: ../../library/pathlib.rst:253
265265
msgid ""
266266
"To access the individual \"parts\" (components) of a path, use the following"
267267
" property:"
268-
msgstr ""
268+
msgstr "为了访问路径独立的部分 (组件),使用以下特征属性:"
269269

270270
#: ../../library/pathlib.rst:258
271271
msgid "A tuple giving access to the path's various components::"

library/select.po

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Translators:
77
# 操旭 <[email protected]>, 2017
88
# Freesand Leo <[email protected]>, 2018
9+
# 林行众 <[email protected]>, 2019
910
#
1011
#, fuzzy
1112
msgid ""
@@ -14,7 +15,7 @@ msgstr ""
1415
"Report-Msgid-Bugs-To: \n"
1516
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1617
"PO-Revision-Date: 2017-02-16 23:25+0000\n"
17-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2018\n"
18+
"Last-Translator: 林行众 <linxzh1989@gmail.com>, 2019\n"
1819
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1920
"MIME-Version: 1.0\n"
2021
"Content-Type: text/plain; charset=UTF-8\n"
@@ -79,7 +80,7 @@ msgstr ""
7980

8081
#: ../../library/select.rst:53 ../../library/select.rst:107
8182
msgid "The new file descriptor is now non-inheritable."
82-
msgstr ""
83+
msgstr "新的文件描述符现在是不可继承的。"
8384

8485
#: ../../library/select.rst:58
8586
msgid ""

0 commit comments

Comments
 (0)