10000 [po] auto sync · python/python-docs-zh-cn@810ae0e · GitHub
[go: up one dir, main page]

Skip to content

Commit 810ae0e

Browse files
[po] auto sync
1 parent 5347bd4 commit 810ae0e

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.10%", "updated_at": "2025-03-23T01:19:55Z"}
1+
{"translation": "81.12%", "updated_at": "2025-03-23T06:55:31Z"}

c-api/typeobj.po

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,8 @@ msgid ""
16641664
":c:member:`~PyTypeObject.tp_base`, plus any extra data needed by each "
16651665
"instance."
16661666
msgstr ""
1667+
":c:member:`!tp_basicsize` 包括类型的 :c:member:`~PyTypeObject.tp_base` "
1668+
"所需数据大小,加上每个实例所需额外数据的大小。"
16671669

16681670
#: ../../c-api/typeobj.rst:633
16691671
msgid ""
@@ -1673,6 +1675,9 @@ msgid ""
16731675
":c:member:`!tp_basicsize` must be greater than or equal to the base's "
16741676
":c:member:`!tp_basicsize`."
16751677
msgstr ""
1678+
"设置 :c:member:`!tp_basicsize` 的正确方式是在被用于声明实例布局的结构体上使用 ``sizeof`` 运算符。 "
1679+
"这个结构体必须包括被用于声明基类型的结构体。 换句话说,:c:member:`!tp_basicsize` 必须大于等于基类型的 "
1680+
":c:member:`!tp_basicsize`。"
16761681

16771682
#: ../../c-api/typeobj.rst:639
16781683
msgid ""
@@ -1682,22 +1687,27 @@ msgid ""
16821687
"defined by the macro :c:macro:`PyObject_HEAD` or "
16831688
":c:macro:`PyObject_VAR_HEAD`, respectively."
16841689
msgstr ""
1690+
"由于任何类型都是 :py:type:`object` 的子类型,这个结构体必须包括 :c:type:`PyObject` 或 "
1691+
":c:type:`PyVarObject` (具体取决于 :c:member:`~PyVarObject.ob_size` 是否应当被包括)。 "
1692+
"它们通常是分别由 :c:macro:`PyObject_HEAD` 或 :c:macro:`PyObject_VAR_HEAD` 宏来定义的。"
16851693

16861694
#: ../../c-api/typeobj.rst:645
16871695
msgid ""
16881696
"The basic size does not include the GC header size, as that header is not "
16891697
"part of :c:macro:`PyObject_HEAD`."
1690-
msgstr ""
1698+
msgstr "基础大小不包括 GC 标头大小,因为该标头不是 :c:macro:`PyObject_HEAD` 的一部分。"
16911699

16921700
#: ../../c-api/typeobj.rst:648
16931701
msgid ""
16941702
"For cases where struct used to declare the base type is unknown, see "
16951703
":c:member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`."
16961704
msgstr ""
1705+
"对于用于声明基类型的结构体位置未知的情况,请参见 :c:member:`PyType_Spec.basicsize` 和 "
1706+
":c:func:`PyType_FromMetaclass`。"
16971707

16981708
#: ../../c-api/typeobj.rst:651
16991709
msgid "Notes about alignment:"
1700-
msgstr ""
1710+
msgstr "有关对齐的说明:"
17011711

17021712
#: ../../c-api/typeobj.rst:653
17031713
msgid ""
@@ -1707,6 +1717,9 @@ msgid ""
17071717
"when using compiler extensions like ``__attribute__((packed))``, it is up to"
17081718
" you."
17091719
msgstr ""
1720+
":c:member:`!tp_basicsize` 必须是 ``_Alignof(PyObject)`` 的位数。 当如建议的那样在包括了 "
1721+
":c:macro:`PyObject_HEAD` 的 ``struct`` 上使用 ``sizeof`` 时,编译器会确保这一点。 当没有使用 C "
1722+
"``struct``,或者当使用像 ``__attribute__((packed))`` 这样的编译器扩展时,这将是你的责任。"
17101723

17111724
#: ../../c-api/typeobj.rst:658
17121725
msgid ""
@@ -1716,13 +1729,18 @@ msgid ""
17161729
"``double``, it is your responsibility that both fields are a multiple of "
17171730
"``_Alignof(double)``."
17181731
msgstr ""
1732+
"如果可变条目需要特定的对齐,则 :c:member:`!tp_basicsize` 和 :c:member:`!tp_itemsize` "
1733+
"必须均为该对齐值的倍数。 举例来说,如果一个类型的可变部分存储了一个 ``double``,你就要负责让这两个字段都是 "
1734+
"``_Alignof(double)`` 的倍数。"
17191735

17201736
#: ../../c-api/typeobj.rst:667
17211737
msgid ""
17221738
"These fields are inherited separately by subtypes. (That is, if the field is"
17231739
" set to zero, :c:func:`PyType_Ready` will copy the value from the base type,"
17241740
" indicating that the instances do not need additional storage.)"
17251741
msgstr ""
1742+
"这些字段是由子类型分别来继承的。 (也就是说,如果字段被设为零,则 :c:func:`PyType_Ready` "
1743+
"将拷贝来自基类型的值,这表示实例不需要额外的存储。)"
17261744

17271745
#: ../../c-api/typeobj.rst:672
17281746
msgid ""
@@ -1731,6 +1749,8 @@ msgid ""
17311749
"different non-zero value in a subtype (though this depends on the "
17321750
"implementation of the base type)."
17331751
msgstr ""
1752+
"如果基类型有一个非零的 :c:member:`~PyTypeObject.tp_itemsize`,那么在子类型中将 "
1753+
":c:member:`~PyTypeObject.tp_itemsize` 设置为不同的非零值通常是不安全的(不过这取决于该基类型的具体实现)。"
17341754

17351755
#: ../../c-api/typeobj.rst:679
17361756
msgid ""

library/argparse.po

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid ""
2020
msgstr ""
2121
"Project-Id-Version: Python 3.13\n"
2222
"Report-Msgid-Bugs-To: \n"
23-
"POT-Creation-Date: 2025-03-14 14:17+0000\n"
23+
"POT-Creation-Date: 2025-03-21 14:18+0000\n"
2424
"PO-Revision-Date: 2021-06-28 00:54+0000\n"
2525
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2025\n"
2626
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -2494,39 +2494,48 @@ msgid ""
24942494
":class:`!Action` instances should be callable, so subclasses must override "
24952495
"the :meth:`!__call__` method, which should accept four parameters:"
24962496
msgstr ""
2497+
":class:`!Action` 的实例应当为可调用对象,因此所有子类都必须重写 :meth:`!__call__` 方法,它应当接受四个形参:"
24972498

24982499
#: ../../library/argparse.rst:1317
24992500
msgid ""
25002501
"*parser* - The :class:`ArgumentParser` object which contains this action."
2501-
msgstr ""
2502+
msgstr "*parser* - 包含此动作的 :class:`ArgumentParser` 对象。"
25022503

25032504
#: ../../library/argparse.rst:1319
25042505
msgid ""
25052506
"*namespace* - The :class:`Namespace` object that will be returned by "
25062507
":meth:`~ArgumentParser.parse_args`. Most actions add an attribute to this "
25072508
"object using :func:`setattr`."
25082509
msgstr ""
2510+
"*namespace* - 将由 :meth:`~ArgumentParser.parse_args` 返回的 :class:`Namespace` "
2511+
"对象。 大多数动作会使用 :func:`setattr` 为此对象添加一个属性。"
25092512

25102513
#: ../../library/argparse.rst:1323
25112514
msgid ""
25122515
"*values* - The associated command-line arguments, with any type conversions "
25132516
"applied. Type conversions are specified with the type_ keyword argument to "
25142517
":meth:`~ArgumentParser.add_argument`."
25152518
msgstr ""
2519+
"*values* - 关联的命令行参数,并提供要应用的类型转换。 类型转换是由传给 "
2520+
":meth:`~ArgumentParser.add_argument` 的 type_ 关键字参数指定的。"
25162521

25172522
#: ../../library/argparse.rst:1327
25182523
msgid ""
25192524
"*option_string* - The option string that was used to invoke this action. The"
25202525
" ``option_string`` argument is optional, and will be absent if the action is"
25212526
" associated with a positional argument."
25222527
msgstr ""
2528+
"*option_string* - 被用于唤起此动作的选项字符串。 ``option_string`` "
2529+
"参数是可选的,并且在动作被关联到位置参数时将被略去。"
25232530

25242531
#: ../../library/argparse.rst:1331
25252532
msgid ""
25262533
"The :meth:`!__call__` method may perform arbitrary actions, but will "
25272534
"typically set attributes on the ``namespace`` based on ``dest`` and "
25282535
"``values``."
25292536
msgstr ""
2537+
":meth:`!__call__` 方法可以执行任意动作,但通常将基于 ``dest`` 和 ``values`` 来设置 ``namespace`` "
2538+
"的属性。"
25302539

25312540
#: ../../library/argparse.rst:1336
25322541
msgid ""
@@ -2535,6 +2544,8 @@ msgid ""
25352544
"usage of the program. If such method is not provided, a sensible default "
25362545
"will be used."
25372546
msgstr ""
2547+
":class:`!Action` 子类可以定义 :meth:`!format_usage` "
2548+
"方法,该方法不接受任何参数并返回一个将被用于打印程序的用法说明的字符串。 如果未提供此方法,则将使用适当的默认值。"
25382549

25392550
#: ../../library/argparse.rst:1342
25402551
msgid "The parse_args() method"
@@ -2864,6 +2875,8 @@ msgid ""
28642875
" passing a list of strings to :meth:`~ArgumentParser.parse_args`. This is "
28652876
"useful for testing at the interactive prompt::"
28662877
msgstr ""
2878+
"有时在 :data:`sys.argv` 以外增加 :class:`ArgumentParser` 解析参数也很有用处。 这可以通过将一个字符串列表传给"
2879+
" :meth:`~ArgumentParser.parse_args` 来实现。 它适用于在交互提示符下进行测试::"
28672880

28682881
#: ../../library/argparse.rst:1512
28692882
msgid ""

0 commit comments

Comments
 (0)
0