55#
66# Translators:
77# tomo, 2021
8+ # Takeshi Nakazato, 2023
89#
910#, fuzzy
1011msgid ""
@@ -13,7 +14,7 @@ msgstr ""
1314"Report-Msgid-Bugs-To : \n "
1415"POT-Creation-Date : 2023-04-28 14:13+0000\n "
1516"PO-Revision-Date : 2021-06-28 00:52+0000\n "
16- "Last-Translator : tomo, 2021 \n "
17+ "Last-Translator : Takeshi Nakazato, 2023 \n "
1718"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
1819"ja/)\n "
1920"MIME-Version : 1.0\n "
@@ -50,6 +51,10 @@ msgid ""
5051"`optparse`. Note also that :mod:`argparse` is based on :mod:`optparse`, and "
5152"therefore very similar in terms of usage."
5253msgstr ""
54+ "同じ機能を実現するモジュールが他に2つあります。 :mod:`getopt` (C 言語の "
55+ "``getopt()`` に相当するもの) と非推奨の :mod:`optparse` です。なお :mod:"
56+ "`argparse` は :mod:`optparse` をもとにしており、従ってその使い方は非常によく"
57+ "似ています。"
5358
5459#: ../../howto/argparse.rst:24
5560msgid "Concepts"
@@ -184,6 +189,9 @@ msgid ""
184189"accept. In this case, I've named it ``echo`` so that it's in line with its "
185190"function."
186191msgstr ""
192+ "プログラムが受け付けるコマンドラインオプションを指定するメソッドである :meth:"
193+ "`~ArgumentParser.add_argument` を追加しました。ここでは、その機能にあわせて引"
194+ "数名を ``echo`` としました。"
187195
188196#: ../../howto/argparse.rst:146
189197msgid "Calling our program now requires us to specify an option."
@@ -194,6 +202,8 @@ msgid ""
194202"The :meth:`~ArgumentParser.parse_args` method actually returns some data "
195203"from the options specified, in this case, ``echo``."
196204msgstr ""
205+ ":meth:`~ArgumentParser.parse_args` メソッドは指定されたオプションを、この場合"
206+ "は ``echo`` として、返します。"
197207
198208#: ../../howto/argparse.rst:151
199209msgid ""
@@ -278,6 +288,11 @@ msgid ""
278288"``None`` as a value, which is the reason it fails the truth test of the :"
279289"keyword:`if` statement."
280290msgstr ""
291+ "オプションの指定が実際に任意であることを示すために、プログラムをオプション指"
292+ "定なしで実行してもエラーにはなっていません。オプション引数が指定されなかった"
293+ "場合、関連する変数、この例では ``args.verbosity`` 、の値にはデフォルトで "
294+ "``None`` がセットされます。これが :keyword:`if` 文による真偽テストに失敗した"
295+ "理由です。"
281296
282297#: ../../howto/argparse.rst:265
283298msgid "The help message is a bit different."
@@ -309,6 +324,12 @@ msgid ""
309324"This means that, if the option is specified, assign the value ``True`` to "
310325"``args.verbose``. Not specifying it implies ``False``."
311326msgstr ""
327+ "オプションは値を必要とするのではなく、単なるフラグになりました。この考え方に"
328+ "沿うようにオプションの名前も変更しています。ここで新しいキーワード "
329+ "``action`` を指定し、値として ``\" store_true\" `` を設定していることに注意して"
330+ "ください。これは、オプションが指定された場合に値として ``True`` を ``args."
331+ "verbose`` に設定するということを意味します。オプションの指定がない場合の値は "
332+ "``False`` となることを意味します。"
312333
313334#: ../../howto/argparse.rst:307
314335msgid ""
@@ -542,6 +563,12 @@ msgid ""
542563"program so that the new functionality makes more sense: we'll introduce the "
543564"``--quiet`` option, which will be the opposite of the ``--verbose`` one::"
544565msgstr ""
566+ "これまでのところ、 :class:`argparse.ArgumentParser` インスタンスの2つのメソッ"
567+ "ドについて学んできました。ここで3つめのメソッドとして :meth:`~ArgumentParser."
568+ "add_mutually_exclusive_group` を導入しましょう。このメソッドは互いに対立する"
569+ "引数の指定を可能にします。また、新しい機能として理解しやすいように、プログラ"
570+ "ムの残りの部分を変更しましょう: 以下では ``--quiet`` オプションを ``--"
571+ "verbose``と反対のオプションとして導入します::"
545572
546573#: ../../howto/argparse.rst:698
547574msgid ""
0 commit comments