forked from sbt/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput-task.ja.po
More file actions
551 lines (468 loc) · 22.7 KB
/
Copy pathinput-task.ja.po
File metadata and controls
551 lines (468 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
msgid ""
msgstr ""
"Project-Id-Version: The Book of sbt\n"
"POT-Creation-Date: 2026-08-07T14:58:02-04:00\n"
"PO-Revision-Date: 2025-10-03 01:34-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.7\n"
#: src/reference/reference/input-task.md:1
msgid "Input task"
msgstr "インプットタスク"
#: src/reference/reference/input-task.md:7
msgid ""
"sbt provides a capability to define custom tasks that can parse user inputs "
"and offer tab completion. The details of the parser will be covered in [tab-"
"completion parser](tab-completion-parser.md) later."
msgstr ""
"sbt はユーザー入力をパースし、タブ補完を提供するカスタムタスクを定義する機能"
"を提供する。パーサーの詳細は後で[タブ補完パーサー](tab-completion-parser.md) "
"で説明する。"
#: src/reference/reference/input-task.md:11
msgid ""
"This page describes how to hook those parser combinators into the input task "
"system."
msgstr ""
"このページでは、パーサーコンビネータをインプットタスク・システムに組み込む方"
"法を説明する。"
#: src/reference/reference/input-task.md:14
msgid "Input keys"
msgstr "Input キー"
#: src/reference/reference/input-task.md:17
msgid ""
"A key for an input task is of type `InputKey` and represents the input task "
"like a `SettingKey` represents a setting or a `TaskKey` represents a task. "
"Define a new input task key using the `inputKey.apply` factory method:"
msgstr ""
"インプットタスクのキーは `InputKey` 型であり、`SettingKey` がセッティングを、"
"`TaskKey` がタスクを表すのと同様にインプットタスクを表す。`inputKey.apply` "
"ファクトリメソッドで新しいインプットタスクのキーを定義する:"
#: src/reference/reference/input-task.md:23
msgid "// goes in project/Build.scala or in build.sbt"
msgstr ""
#: src/reference/reference/input-task.md:24
msgid "\"A demo input task.\""
msgstr ""
#: src/reference/reference/input-task.md:27
msgid ""
"The definition of an input task is similar to that of a normal task, but it "
"can also use the result of a [Parser](tab-completion-parser.md) applied to "
"user input. Just as the special `value` method gets the value of a setting "
"or task, the special `parsed` method gets the result of a `Parser`."
msgstr ""
"インプットタスクの定義は通常のタスクと同様だが、ユーザー入力を捕獲した "
"[Parser](tab-completion-parser.md) の結果も使用できる。セッティングやタスクの"
"値を取得する特殊な `value` メソッドと同様に、`Parser` の結果は特殊な "
"`parsed` メソッドで取得する。"
#: src/reference/reference/input-task.md:33
msgid "Basic input task definition"
msgstr "基本的なインプットタスクの定義"
#: src/reference/reference/input-task.md:36
msgid ""
"The simplest input task accepts a space-delimited sequence of arguments. It "
"does not provide useful tab completion and parsing is basic. The built-in "
"parser for space-delimited arguments is constructed via the `spaceDelimited` "
"method, which accepts as its only argument the label to present to the user "
"during tab completion."
msgstr ""
"最もシンプルなインプットタスクはスペース区切りの引数シーケンスを受け付ける。"
"パースは簡素で、有用なタブ補完は提供されない。スペース区切り引数用の組み込み"
"パーサーは `spaceDelimited` メソッドで構築され、唯一の引数としてタブ補完時に"
"ユーザーに表示するラベルを受け取る。"
#: src/reference/reference/input-task.md:42
msgid ""
"For example, the following task prints the current Scala version and then "
"echoes the arguments passed to it on their own line."
msgstr ""
"例えば、以下のタスクは現在の Scala バージョンを表示し、渡された引数を各行にエ"
"コーする。"
#: src/reference/reference/input-task.md:49
msgid "// get the result of parsing"
msgstr ""
#: src/reference/reference/input-task.md:50
msgid "\"<arg>\""
msgstr ""
#: src/reference/reference/input-task.md:51
msgid "// Here, we also use the value of the `scalaVersion` setting"
msgstr ""
#: src/reference/reference/input-task.md:52
msgid "\"The current Scala version is \""
msgstr ""
#: src/reference/reference/input-task.md:53
msgid "\"The arguments to demo were:\""
msgstr ""
#: src/reference/reference/input-task.md:58
msgid "Input task using Parsers"
msgstr "Parser を使ったインプットタスク"
#: src/reference/reference/input-task.md:61
msgid ""
"The Parser provided by the `spaceDelimited` method does not provide any "
"flexibility in defining the input syntax. Using a custom parser is just a "
"matter of defining your own `Parser` as described on the [Parsing Input](tab-"
"completion-parser.md) page."
msgstr ""
"`spaceDelimited` メソッドが提供する Parser は入力構文の定義に柔軟性がない。カ"
"スタムパーサーを使うには、[タブ補完パーサー](tab-completion-parser.md)で説明"
"する通り独自の `Parser` を定義すればよい。"
#: src/reference/reference/input-task.md:66
msgid "Constructing the Parser"
msgstr "Parser の構築"
#: src/reference/reference/input-task.md:68
msgid ""
"The first step is to construct the actual `Parser` by defining a value of "
"one of the following types:"
msgstr ""
"最初のステップは、以下のいずれかの型の値を定義して実際の `Parser` を構築する"
"ことである:"
#: src/reference/reference/input-task.md:71
msgid "`Parser[I]`: a basic parser that does not use any settings"
msgstr "`Parser[I]`: セッティングを使用しない基本パーサー"
#: src/reference/reference/input-task.md:72
msgid ""
"`Initialize[Parser[I]]`: a parser whose definition depends on one or more "
"settings"
msgstr ""
"`Initialize[Parser[I]]`: 定義が 1 つ以上のセッティングに依存するパーサー"
#: src/reference/reference/input-task.md:74
msgid ""
"`Initialize[State => Parser[I]]`: a parser that is defined using both "
"settings and the current [state](Build-State.html)"
msgstr ""
"`Initialize[State => Parser[I]]`: セッティングと現在の [state](Build-"
"State.html) の両方を使って定義されるパーサー"
#: src/reference/reference/input-task.md:77
msgid ""
"We already saw an example of the first case with `spaceDelimited`, which "
"doesn't use any settings in its definition. As an example of the third case, "
"the following defines a contrived `Parser` that uses the project's Scala and "
"sbt version settings as well as the state. To use these settings, we need to "
"wrap the Parser construction in `Def.setting` and get the setting values "
"with the special `value` method:"
msgstr ""
"`spaceDelimited` による最初のケースの例は既に見た。定義でセッティングを使用し"
"ていない。3 つ目のケースの例として、以下はプロジェクトの Scala と sbt のバー"
"ジョンセッティングおよび state を使う作為的な `Parser` を定義する。これらの"
"セッティングを使うには、Parser の構築を `Def.setting` でラップし、特殊な "
"`value` メソッドでセッティング値を取得する必要がある:"
#: src/reference/reference/input-task.md:91
msgid "\"scala\""
msgstr ""
#: src/reference/reference/input-task.md:92
msgid "\"sbt\""
msgstr ""
#: src/reference/reference/input-task.md:93
msgid "\"commands\""
msgstr ""
#: src/reference/reference/input-task.md:98
#, fuzzy
msgid ""
"This Parser definition will produce a value of type `(String,String)`. The "
"input syntax defined isn't very flexible; it is just a demonstration. It "
"will produce one of the following values for a successful parse (assuming "
"the current Scala version is 3.8.4, the current sbt version is 2.0.6, and "
"there are 3 commands left to run):"
msgstr ""
"この Parser 定義は `(String,String)` 型の値を生成する。定義した入力構文は柔軟"
"ではない。デモンストレーションである。パースが成功すると以下のいずれかの値を"
"生成する(現在の Scala バージョンが 3.8.1、sbt バージョンが 2.0.0-RC9、実行待"
"ちコマンドが 3 つの場合):"
#: src/reference/reference/input-task.md:105
msgid "(scala,3.8.4)"
msgstr ""
#: src/reference/reference/input-task.md:106
msgid "(sbt,2.0.6)"
msgstr ""
#: src/reference/reference/input-task.md:107
msgid "(commands,3)"
msgstr ""
#: src/reference/reference/input-task.md:109
msgid ""
"Again, we were able to access the current Scala and sbt version for the "
"project because they are settings. Tasks cannot be used to define the parser."
msgstr ""
"プロジェクトの現在の Scala と sbt のバージョンにアクセスできたのは、それらが"
"セッティングだからである。タスクはパーサーの定義に使用できない。"
#: src/reference/reference/input-task.md:113
msgid "Constructing the Task"
msgstr "タスクの構築"
#: src/reference/reference/input-task.md:115
msgid ""
"Next, we construct the actual task to execute from the result of the "
"`Parser`. For this, we define a task as usual, but we can access the result "
"of parsing via the special `parsed` method on `Parser`."
msgstr ""
"次に、`Parser` の結果から実行する実際のタスクを構築する。通常通りタスクを定義"
"するが、`Parser` の特殊な `parsed` メソッドでパース結果にアクセスできる。"
#: src/reference/reference/input-task.md:119
msgid ""
"The following contrived example uses the previous example's output (of type "
"`(String,String)`) and the result of the `package` task to print some "
"information to the screen."
msgstr ""
"以下の作為的な例は、前の例の出力(型 `(String,String)`)と `package` タスクの"
"結果を使って、画面に情報を表示する。"
#: src/reference/reference/input-task.md:126
msgid "\"Type: \""
msgstr ""
#: src/reference/reference/input-task.md:127
msgid "\"Value: \""
msgstr ""
#: src/reference/reference/input-task.md:128
msgid "\"Packaged: \""
msgstr ""
#: src/reference/reference/input-task.md:132
msgid "The InputTask type"
msgstr "InputTask 型"
#: src/reference/reference/input-task.md:135
msgid ""
"It helps to look at the `InputTask` type to understand more advanced usage "
"of input tasks. The core input task type is:"
msgstr ""
"インプットタスクのより高度な使い方を理解するには `InputTask` 型を見るとよい。"
"コアとなるインプットタスク 型は以下の通りである:"
#: src/reference/reference/input-task.md:142
msgid ""
"Normally, an input task is assigned to a setting and you work with "
"`Initialize[InputTask[A1]]`."
msgstr ""
"通常、インプットタスクはセッティングに割り当てられ、"
"`Initialize[InputTask[A1]]` を扱う。"
#: src/reference/reference/input-task.md:145
msgid "Breaking this down,"
msgstr "分解すると、"
#: src/reference/reference/input-task.md:147
msgid "You can use other settings (via Initialize) to construct an input task."
msgstr ""
"他のセッティング(Initialize 経由)を使ってインプットタスクを構築できる。"
#: src/reference/reference/input-task.md:149
msgid "You can use the current State to construct the parser."
msgstr "現在の State を使ってパーサーを構築できる。"
#: src/reference/reference/input-task.md:150
msgid "The parser accepts user input and provides tab completion."
msgstr "パーサーはユーザー入力を受け付け、タブ補完を提供する。"
#: src/reference/reference/input-task.md:151
msgid "The parser produces the task to run."
msgstr "パーサーは実行するタスクを生成する。"
#: src/reference/reference/input-task.md:153
msgid ""
"So, you can use settings or `State` to construct the parser that defines an "
"input task's command line syntax. This was described in the previous "
"section. You can then use settings, `State`, or user input to construct the "
"task to run. This is implicit in the input task syntax."
msgstr ""
"つまり、セッティングまたは `State` を使って インプットタスク のコマンドライン"
"構文を定義するパーサーを構築できる。これは前セクションで説明した。次に、セッ"
"ティング、`State`、またはユーザー入力を使って実行するタスクを構築できる。これ"
"は インプットタスク 構文に暗黙的に含まれる。"
#: src/reference/reference/input-task.md:158
msgid "Using other input tasks"
msgstr "他のインプットタスクの再利用"
#: src/reference/reference/input-task.md:161
msgid ""
"The types involved in an input task are composable, so it is possible to "
"reuse input tasks. The `.parsed` and `.evaluated` methods are defined on "
"InputTasks to make this more convenient in common situations:"
msgstr ""
"インプットタスクに関わる型は合成可能であるため、インプットタスクを再利用でき"
"る。InputTask には `.parsed` と `.evaluated` メソッドが定義され、一般的な状況"
"で便利になる:"
#: src/reference/reference/input-task.md:165
msgid ""
"Call `.parsed` on an `InputTask[A1]` or `Initialize[InputTask[A1]]` to get "
"the `Task[A1]` created after parsing the command line"
msgstr ""
"`InputTask[A1]` または `Initialize[InputTask[A1]]` で `.parsed` を呼ぶと、コ"
"マンドラインをパースした後に作成された `Task[A1]` を取得する"
#: src/reference/reference/input-task.md:167
msgid ""
"Call `.evaluated` on an `InputTask[A1]` or `Initialize[InputTask[A1]]` to "
"get the value of type `A1` from evaluating that task"
msgstr ""
"`InputTask[A1]` または `Initialize[InputTask[A1]]` で `.evaluated` を呼ぶと、"
"そのタスクを評価した型 `A1` の値を取得する"
#: src/reference/reference/input-task.md:171
msgid ""
"In both situations, the underlying `Parser` is sequenced with other parsers "
"in the input task definition. In the case of `.evaluated`, the generated "
"task is evaluated."
msgstr ""
"いずれの場合も、基となる `Parser` はインプットタスク定義内の他のパーサーと順"
"序付けられる。`.evaluated` の場合は、生成されたタスクが評価される。"
#: src/reference/reference/input-task.md:175
msgid ""
"The following example applies the `run` input task, a literal separator "
"parser `--`, and `run` again. The parsers are sequenced in order of "
"syntactic appearance, so that the arguments before `--` are passed to the "
"first `run` and the ones after are passed to the second."
msgstr ""
"以下の例は `run` インプットタスク、リテラル区切りパーサー `--`、そして再度 "
"`run` を適用する。パーサーは構文的な出現順に並べられるため、`--` の前の引数は"
"最初の `run` に、後の引数は 2 番目の `run` に渡される。"
#: src/reference/reference/input-task.md:182
msgid ""
"\"Runs the main class twice with different argument lists separated by --\""
msgstr ""
#: src/reference/reference/input-task.md:184
msgid "\"--\""
msgstr ""
#: src/reference/reference/input-task.md:193
#: src/reference/reference/input-task.md:256
msgid "For a main class Demo that echoes its arguments, this looks like:"
msgstr "引数をエコーするメインクラス Demo の場合、以下のようになる:"
#: src/reference/reference/input-task.md:206
msgid "Preapplying input"
msgstr "入力の事前適用"
#: src/reference/reference/input-task.md:209
msgid ""
"Because `InputTasks` are built from `Parsers`, it is possible to generate a "
"new `InputTask` by applying some input programmatically. (It is also "
"possible to generate a `Task`, which is covered in the next section.) Two "
"convenience methods are provided on `InputTask[T]` and "
"`Initialize[InputTask[T]]` that accept the String to apply."
msgstr ""
"`InputTask` は `Parser` から構築されるため、プログラムで入力を適用して新しい "
"`InputTask` を生成できる。(`Task` を生成することも可能で、次セクションで説明"
"する。)適用する String を受け取る 2 つの便利メソッドが `InputTask[T]` と "
"`Initialize[InputTask[T]]` に用意されている。"
#: src/reference/reference/input-task.md:215
msgid ""
"`partialInput` applies the input and allows further input, such as from the "
"command line"
msgstr ""
"`partialInput` は入力を適用し、コマンドラインなどからの追加入力を許可する"
#: src/reference/reference/input-task.md:217
msgid ""
"`fullInput` applies the input and terminates parsing, so that further input "
"is not accepted"
msgstr "`fullInput` は入力を適用してパースを終了し、追加入力を受け付けない"
#: src/reference/reference/input-task.md:220
msgid ""
"In each case, the input is applied to the input task's parser. Because input "
"tasks handle all input after the task name, they usually require initial "
"whitespace to be provided in the input."
msgstr ""
"いずれの場合も、入力は インプットタスク のパーサーに適用される。インプットタ"
"スク はタスク名以降のすべての入力を扱うため、入力に先頭の空白を含める必要があ"
"ることが多い。"
#: src/reference/reference/input-task.md:224
msgid ""
"Consider the example in the previous section. We can modify it so that we:"
msgstr "前セクションの例を考える。以下のように変更できる:"
#: src/reference/reference/input-task.md:227
msgid ""
"Explicitly specify all of the arguments to the first `run`. We use `name` "
"and `version` to show that settings can be used to define and modify parsers."
msgstr ""
"最初の `run` への引数をすべて明示的に指定する。`name` と `version` を使って、"
"セッティングでパーサーを定義・変更できることを示す。"
#: src/reference/reference/input-task.md:230
msgid ""
"Define the initial arguments passed to the second `run`, but allow further "
"input on the command line."
msgstr ""
"2 番目の `run` に渡す初期引数を定義するが、コマンドラインからの追加入力を許可"
"する。"
#: src/reference/reference/input-task.md:233
msgid ""
"```admonish note\n"
"If the input derives from settings you need to use, for\n"
"example, `Def.taskDyn { ... }.value`\n"
"```"
msgstr ""
"```admonish note\n"
"入力がセッティングに由来する場合は、例えば `Def.taskDyn { ... }.value` を\n"
"使用する必要がある。\n"
"```"
#: src/reference/reference/input-task.md:239
msgid "\"Runs the main class twice: \""
msgstr ""
#: src/reference/reference/input-task.md:240
msgid "\"once with the project name and version as arguments\""
msgstr ""
#: src/reference/reference/input-task.md:241
msgid "\"and once with command line arguments preceded by hard coded values.\""
msgstr ""
#: src/reference/reference/input-task.md:242
msgid "// The argument string for the first run task is ' <name> <version>'"
msgstr ""
#: src/reference/reference/input-task.md:245
msgid "s\" ${"
msgstr ""
#: src/reference/reference/input-task.md:245
msgid "} ${"
msgstr ""
#: src/reference/reference/input-task.md:245
msgid "}\""
msgstr ""
#: src/reference/reference/input-task.md:246
msgid "// Make the first arguments to the second run task ' red blue'"
msgstr ""
#: src/reference/reference/input-task.md:248
msgid "\" red blue\""
msgstr ""
#: src/reference/reference/input-task.md:270
msgid "Get a Task from an InputTask"
msgstr "InputTask から Task を取得する"
#: src/reference/reference/input-task.md:273
msgid ""
"The previous section showed how to derive a new `InputTask` by applying "
"input. In this section, applying input produces a `Task`. The `toTask` "
"method on `Initialize[InputTask[A1]]` accepts the `String` input to apply "
"and produces a task that can be used normally. For example, the following "
"defines a plain task `runFixed` that can be used by other tasks or run "
"directly without providing any input:"
msgstr ""
"前セクションでは入力を適用して新しい `InputTask` を導出する方法を示した。この"
"セクションでは、入力を適用すると `Task` が生成される。"
"`Initialize[InputTask[A1]]` の `toTask` メソッドは適用する `String` 入力を受"
"け取り、通常通り使用できるタスクを生成する。例えば、以下は他のタスクから使用"
"したり、入力を渡さずに直接実行できる通常のタスク `runFixed` を定義する:"
#: src/reference/reference/input-task.md:281
#: src/reference/reference/input-task.md:306
msgid "\"A task that hard codes the values to `run`\""
msgstr ""
#: src/reference/reference/input-task.md:284
#: src/reference/reference/input-task.md:311
msgid "\" blue green\""
msgstr ""
#: src/reference/reference/input-task.md:285
#: src/reference/reference/input-task.md:313
msgid "\"Done!\""
msgstr ""
#: src/reference/reference/input-task.md:289
msgid ""
"For a main class Demo that echoes its arguments, running `runFixed` looks "
"like:"
msgstr ""
"引数をエコーするメインクラス Demo の場合、`runFixed` の実行は以下のようにな"
"る:"
#: src/reference/reference/input-task.md:301
msgid ""
"Each call to `toTask` generates a new task, but each task is configured the "
"same as the original `InputTask` (in this case, `run`) but with different "
"input applied. For example:"
msgstr ""
"`toTask` の各呼び出しは新しいタスクを生成するが、各タスクは元の `InputTask` "
"(この場合は `run`)と同じように設定され、異なる入力が適用される。例:"
#: src/reference/reference/input-task.md:312
msgid "\" red orange\""
msgstr ""
#: src/reference/reference/input-task.md:317
msgid ""
"The different `toTask` calls define different tasks that each run the "
"project's main class in a new jvm. That is, the `fork` setting configures "
"both, each has the same classpath, and each run the same main class. "
"However, each task passes different arguments to the main class. For a main "
"class Demo that echoes its arguments, the output of running `runFixed2` "
"might look like:"
msgstr ""
"異なる `toTask` 呼び出しは、それぞれ新しい JVM でプロジェクトのメインクラスを"
"実行する異なるタスクを定義する。つまり、`fork` セッティングが両方に適用され、"
"同じクラスパスを持ち、同じメインクラスを実行する。ただし、各タスクはメインク"
"ラスに異なる引数を渡す。引数をエコーするメインクラス Demo の場合、"
"`runFixed2` の実行出力は以下のようになる:"