5
5
#
6
6
# Translators:
7
7
# tomo, 2021
8
+ # Takeshi Nakazato, 2023
8
9
#
9
10
#, fuzzy
10
11
msgid ""
@@ -13,7 +14,7 @@ msgstr ""
13
14
"Report-Msgid-Bugs-To : \n "
14
15
"POT-Creation-Date : 2023-04-28 14:13+0000\n "
15
16
"PO-Revision-Date : 2021-06-28 00:52+0000\n "
16
- "Last-Translator : tomo, 2021 \n "
17
+ "Last-Translator : Takeshi Nakazato, 2023 \n "
17
18
"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
18
19
"ja/)\n "
19
20
"MIME-Version : 1.0\n "
@@ -50,6 +51,10 @@ msgid ""
50
51
"`optparse`. Note also that :mod:`argparse` is based on :mod:`optparse`, and "
51
52
"therefore very similar in terms of usage."
52
53
msgstr ""
54
+ "同じ機能を実現するモジュールが他に2つあります。 :mod:`getopt` (C 言語の "
55
+ "``getopt()`` に相当するもの) と非推奨の :mod:`optparse` です。なお :mod:"
56
+ "`argparse` は :mod:`optparse` をもとにしており、従ってその使い方は非常によく"
57
+ "似ています。"
53
58
54
59
#: ../../howto/argparse.rst:24
55
60
msgid "Concepts"
@@ -184,6 +189,9 @@ msgid ""
184
189
"accept. In this case, I've named it ``echo`` so that it's in line with its "
185
190
"function."
186
191
msgstr ""
192
+ "プログラムが受け付けるコマンドラインオプションを指定するメソッドである :meth:"
193
+ "`~ArgumentParser.add_argument` を追加しました。ここでは、その機能にあわせて引"
194
+ "数名を ``echo`` としました。"
187
195
188
196
#: ../../howto/argparse.rst:146
189
197
msgid "Calling our program now requires us to specify an option."
@@ -194,6 +202,8 @@ msgid ""
194
202
"The :meth:`~ArgumentParser.parse_args` method actually returns some data "
195
203
"from the options specified, in this case, ``echo``."
196
204
msgstr ""
205
+ ":meth:`~ArgumentParser.parse_args` メソッドは指定されたオプションを、この場合"
206
+ "は ``echo`` として、返します。"
197
207
198
208
#: ../../howto/argparse.rst:151
199
209
msgid ""
@@ -278,6 +288,11 @@ msgid ""
278
288
"``None`` as a value, which is the reason it fails the truth test of the :"
279
289
"keyword:`if` statement."
280
290
msgstr ""
291
+ "オプションの指定が実際に任意であることを示すために、プログラムをオプション指"
292
+ "定なしで実行してもエラーにはなっていません。オプション引数が指定されなかった"
293
+ "場合、関連する変数、この例では ``args.verbosity`` 、の値にはデフォルトで "
294
+ "``None`` がセットされます。これが :keyword:`if` 文による真偽テストに失敗した"
295
+ "理由です。"
281
296
282
297
#: ../../howto/argparse.rst:265
283
298
msgid "The help message is a bit different."
@@ -309,6 +324,12 @@ msgid ""
309
324
"This means that, if the option is specified, assign the value ``True`` to "
310
325
"``args.verbose``. Not specifying it implies ``False``."
311
326
msgstr ""
327
+ "オプションは値を必要とするのではなく、単なるフラグになりました。この考え方に"
328
+ "沿うようにオプションの名前も変更しています。ここで新しいキーワード "
329
+ "``action`` を指定し、値として ``\" store_true\" `` を設定していることに注意して"
330
+ "ください。これは、オプションが指定された場合に値として ``True`` を ``args."
331
+ "verbose`` に設定するということを意味します。オプションの指定がない場合の値は "
332
+ "``False`` となることを意味します。"
312
333
313
334
#: ../../howto/argparse.rst:307
314
335
msgid ""
@@ -542,6 +563,12 @@ msgid ""
542
563
"program so that the new functionality makes more sense: we'll introduce the "
543
564
"``--quiet`` option, which will be the opposite of the ``--verbose`` one::"
544
565
msgstr ""
566
+ "これまでのところ、 :class:`argparse.ArgumentParser` インスタンスの2つのメソッ"
567
+ "ドについて学んできました。ここで3つめのメソッドとして :meth:`~ArgumentParser."
568
+ "add_mutually_exclusive_group` を導入しましょう。このメソッドは互いに対立する"
569
+ "引数の指定を可能にします。また、新しい機能として理解しやすいように、プログラ"
570
+ "ムの残りの部分を変更しましょう: 以下では ``--quiet`` オプションを ``--"
571
+ "verbose``と反対のオプションとして導入します::"
545
572
546
573
#: ../../howto/argparse.rst:698
547
574
msgid ""
0 commit comments