@@ -454,10 +454,13 @@ msgid ""
454454"(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is"
455455" the most fundamental."
456456msgstr ""
457+ "本教学章节只介绍了四个最重要的选项属性: :attr:`~Option.action`, :attr:`~Option.type`, "
458+ ":attr:`~Option.dest` (destination) 和 :attr:`~Option.help`。 "
459+ "其中,:attr:`~Option.action` 是最基本的一个。"
457460
458461#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:309
459462msgid "Understanding option actions"
460- msgstr ""
463+ msgstr "理解选项动作 "
461464
462465#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:311
463466msgid ""
@@ -468,23 +471,28 @@ msgid ""
468471"store a value in some variable---for example, take a string from the command"
469472" line and store it in an attribute of ``options``."
470473msgstr ""
474+ "动作是告诉 :mod:`optparse` 当它在命令行中遇到某个选项时要做什么。 有一个固定的动作集被硬编码到 :mod:`optparse` "
475+ "内部;添加新的动作是将在 :ref:`optparse-extending-optparse` 章节中介绍的进阶内容。 大多数动作都是告诉 "
476+ ":mod:`optparse` 将特定的值存储到某个变量中 --- 例如,从命令行接收一个字符串并将其存储到 ``options`` 的某个选项中。"
471477
472478#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:318
473479msgid ""
474480"If you don't specify an option action, :mod:`optparse` defaults to "
475481"``store``."
476- msgstr ""
482+ msgstr "如果你没有指定一个选项动作,:mod:`optparse` 将默认选择 ``store``。 "
477483
478484#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:324
479485msgid "The store action"
480- msgstr ""
486+ msgstr "store 动作 "
481487
482488#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:326
483489msgid ""
484490"The most common option action is ``store``, which tells :mod:`optparse` to "
485491"take the next argument (or the remainder of the current argument), ensure "
486492"that it is of the correct type, and store it to your chosen destination."
487493msgstr ""
494+ "最常用的选项动作是 ``store``,它告诉 :mod:`optparse` "
495+ "接收下一个参数(或当前参数的剩余部分),确认其为正确的类型,并将其保存至你选择的目标。"
488496
489497#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:330
490498msgid "For example::"
0 commit comments