Skip to content

Commit 739a965

Browse files
committed
translate 02-sveltekit/02-routing/02-layouts into Japanese
1 parent ddb7f4c commit 739a965

File tree

1 file changed

+4
-4
lines changed
  • content/tutorial/02-sveltekit/02-routing/02-layouts

1 file changed

+4
-4
lines changed

content/tutorial/02-sveltekit/02-routing/02-layouts/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Layouts
33
---
44

5-
Different routes of your app will often share common UI. Instead of repeating it in each `+page.svelte` component, we can use a `+layout.svelte` component that applies to all routes in the same directory.
5+
アプリの別々のルート(routes)が共通の UI を共有することがあると思います。その共通の UI を `+page.svelte` コンポーネントに繰り返し書く代わりに、同じディレクトリ内の全てのルート(routes)に適用される `+layout.svelte` コンポーネント を使用することができます。
66

7-
In this app we have two routes, `src/routes/+page.svelte` and `src/routes/about/+page.svelte`, that contain the same navigation UI. Let's create a new file, `src/routes/+layout.svelte`...
7+
このアプリには2つのルート(routes) `src/routes/+page.svelte` `src/routes/about/+page.svelte` があり、どちらにも同じナビゲーション UI があります。新たに `src/routes/+layout.svelte` ファイルを作成してみましょう…
88

99
```diff
1010
src/routes/
@@ -14,7 +14,7 @@ src/routes/
1414
└ +page.svelte
1515
```
1616

17-
...and move the duplicated content from the `+page.svelte` files into the new `+layout.svelte` file. The `<slot />` element is where the page content will be rendered:
17+
…そして2つの `+page.svelte` ファイルで重複しているコンテンツを新たに作成した `+layout.svelte` ファイルに移動しましょう。`<slot />` 要素は、ページコンテンツがレンダリングされる場所です。
1818

1919
```svelte
2020
/// file: src/routes/+layout.svelte
@@ -26,4 +26,4 @@ src/routes/
2626
<slot />
2727
```
2828

29-
A `+layout.svelte` file applies to every child route, including the sibling `+page.svelte` (if it exists). You can nest layouts to arbitrary depth.
29+
`+layout.svelte` ファイルは全ての子ルート(route)に適用されます。同じ階層にある `+page.svelte` にも適用されます(もし存在していれば)。レイアウトは任意の深さまでネストすることができます。

0 commit comments

Comments
 (0)