Skip to content

Commit bca50af

Browse files
committed
translate 02-sveltekit/04-forms/02-named-form-actions into Japanese
1 parent c36e682 commit bca50af

File tree

1 file changed

+6
-6
lines changed
  • content/tutorial/02-sveltekit/04-forms/02-named-form-actions

1 file changed

+6
-6
lines changed

content/tutorial/02-sveltekit/04-forms/02-named-form-actions/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Named form actions
33
---
44

5-
A page that only has a single action is, in practice, quite rare. Most of the time you'll need to have multiple actions on a page. In this app, creating a todo isn't enough — we'd like to delete them once they're complete.
5+
単一の action しかないページというものは、実際にはかなりまれです。多くの場合、1つのページに複数の action を持たせる必要があるかと思います。このアプリでは、todo を作成するだけでは不十分で、一度完了した todo を削除したいと思います。
66

7-
Begin by replacing our `default` action with named `create` and `delete` actions:
7+
`default` action を、`create` `delete` という名前を付けた action に置き換えるところから始めましょう。
88

99
```js
1010
/// file: src/routes/+page.server.js
@@ -21,9 +21,9 @@ export const actions = {
2121
};
2222
```
2323

24-
> Default actions cannot coexist with named actions.
24+
> default action と名前付きの action を共存させることはできません。
2525
26-
The `<form>` element has an optional `action` attribute, which is similar to an `<a>` element's `href` attribute. Update the existing form so that it points to the new `create` action:
26+
`<form>` 要素にはオプションの `action` 属性があり、これは `<a>` 要素にとっての `href` 属性と同じようなものです。新たに追加した `create` action を呼び出すようにするため、form を書き換えましょう。
2727

2828
```svelte
2929
/// file: src/routes/+page.svelte
@@ -35,9 +35,9 @@ The `<form>` element has an optional `action` attribute, which is similar to an
3535
</form>
3636
```
3737

38-
> The `action` attribute can be any URL — if the action was defined on another page, you might have something like `/todos?/create`. Since the action is on _this_ page, we can omit the pathname altogether, hence the leading `?` character.
38+
> `action` 属性には任意の URL を指定することができます。別のページで定義されている action を呼び出したければ、`/todos?/create` のように指定することになるでしょう。ここでは action _この_ ページにあるため、パス名を完全に省略することができるので、先頭が `?` 文字から始まっているのです。
3939
40-
Next, we want to create a form for each todo, complete with a hidden `<input>` that uniquely identifies it:
40+
次に、各 todo ごとに、一意な識別子を持つ hidden `<input>` を含めた form を作りたいと思います。
4141

4242
```svelte
4343
/// file: src/routes/+page.svelte

0 commit comments

Comments
 (0)