Skip to content

Commit a6e6b20

Browse files
committed
translate parts of tutorials into Japanese
1 parent 7396e71 commit a6e6b20

File tree

5 files changed

+21
-21
lines changed
  • content/tutorial
    • 02-advanced-svelte
      • 05-bindings/03-media-elements/app-a/src/lib
      • 10-module-context/01-sharing-code/app-a/src/lib
    • 04-advanced-sveltekit
  • src/routes/tutorial/[slug]

5 files changed

+21
-21
lines changed

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/app-a/src/lib/tracks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
export const tracks = [
22
{
33
// https://musopen.org/music/9862-the-blue-danube-op-314/
4-
src: 'https://learn.svelte.dev/assets/media/music/strauss.mp3',
4+
src: 'https://learn.svelte.jp/assets/media/music/strauss.mp3',
55
title: 'The Blue Danube Waltz',
66
artist: 'Johann Strauss'
77
},
88

99
{
1010
// https://musopen.org/music/43775-the-planets-op-32/
11-
src: 'https://learn.svelte.dev/assets/media/music/holst.mp3',
11+
src: 'https://learn.svelte.jp/assets/media/music/holst.mp3',
1212
title: 'Mars, the Bringer of War',
1313
artist: 'Gustav Holst'
1414
},
1515

1616
{
1717
// https://musopen.org/music/8010-3-gymnopedies/
18-
src: 'https://learn.svelte.dev/assets/media/music/satie.mp3',
18+
src: 'https://learn.svelte.jp/assets/media/music/satie.mp3',
1919
title: 'Gymnopédie no. 1',
2020
artist: 'Erik Satie'
2121
},
2222

2323
{
2424
// https://musopen.org/music/43683-requiem-in-d-minor-k-626/
25-
src: 'https://learn.svelte.dev/assets/media/music/mozart.mp3',
25+
src: 'https://learn.svelte.jp/assets/media/music/mozart.mp3',
2626
title: 'Requiem in D minor, K. 626 - III. Sequence - Lacrymosa',
2727
artist: 'Wolfgang Amadeus Mozart'
2828
}

content/tutorial/02-advanced-svelte/10-module-context/01-sharing-code/app-a/src/lib/tracks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
export const tracks = [
22
{
33
// https://musopen.org/music/9862-the-blue-danube-op-314/
4-
src: 'https://learn.svelte.dev/assets/media/music/strauss.mp3',
4+
src: 'https://learn.svelte.jp/assets/media/music/strauss.mp3',
55
title: 'The Blue Danube Waltz',
66
artist: 'Johann Strauss'
77
},
88

99
{
1010
// https://musopen.org/music/43775-the-planets-op-32/
11-
src: 'https://learn.svelte.dev/assets/media/music/holst.mp3',
11+
src: 'https://learn.svelte.jp/assets/media/music/holst.mp3',
1212
title: 'Mars, the Bringer of War',
1313
artist: 'Gustav Holst'
1414
},
1515

1616
{
1717
// https://musopen.org/music/8010-3-gymnopedies/
18-
src: 'https://learn.svelte.dev/assets/media/music/satie.mp3',
18+
src: 'https://learn.svelte.jp/assets/media/music/satie.mp3',
1919
title: 'Gymnopédie no. 1',
2020
artist: 'Erik Satie'
2121
},
2222

2323
{
2424
// https://musopen.org/music/43683-requiem-in-d-minor-k-626/
25-
src: 'https://learn.svelte.dev/assets/media/music/mozart.mp3',
25+
src: 'https://learn.svelte.jp/assets/media/music/mozart.mp3',
2626
title: 'Requiem in D minor, K. 626 - III. Sequence - Lacrymosa',
2727
artist: 'Wolfgang Amadeus Mozart'
2828
}

content/tutorial/04-advanced-sveltekit/01-hooks/02-handlefetch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
title: handleFetch
33
---
44

5-
SvelteKit provides several _hooks_ — ways to intercept and override the framework's default behaviour.
5+
SvelteKit は、いくつかの _hooks_ (フレームワークのデフォルトの動作をインターセプトしてオーバーライドする方法) を提供します。
66

77
> Coming soon

content/tutorial/04-advanced-sveltekit/04-advanced-loading/01-universal-load-functions/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
title: Universal load functions
33
---
44

5-
In the [previous section on loading](page-data) we loaded data from the server using `+page.server.js` and `+layout.server.js` files. This is very convenient if you need to do things like getting data directly from a database, or reading cookies.
5+
[以前学習した loading のセクション](page-data)では、`+page.server.js` `+layout.server.js` ファイルを使ってサーバーからデータを取得しました。データベースから直接データを取得したり、cookie から読み取ったりするのにとても便利です。
66

7-
Sometimes it doesn't make sense to load data from the server when doing a client-side navigation. For example:
7+
しかし、クライアントサイドナビゲーションを行うとき、サーバーからデータを取得することが理にかなっていないケースもあります。例えば:
88

9-
- You're loading data from an external API
10-
- You want to use in-memory data if it's available
11-
- You want to delay navigation until an image has been preloaded, to avoid pop-in
12-
- You need to return something from `load` that can't be serialized (SvelteKit uses [devalue](https://github.com/Rich-Harris/devalue) to turn server data into JSON), such as a component or a store
9+
- 外部の API からデータを取得する
10+
- インメモリデータが使えるならそれを使いたい
11+
- ポップインを避けるため、画像がプリロードされるまでナビゲーションを遅らせたい
12+
- コンポーネントやストアなど、シリアライズできないもの (SvelteKit [devalue](https://github.com/Rich-Harris/devalue) でサーバーのデータを JSON に変換しています) を `load` から返す必要がある
1313

14-
In this exercise, we're dealing with the latter case. The server `load` functions in `src/routes/red/+page.server.js`, `src/routes/green/+page.server.js` and `src/routes/blue/+page.server.js` return a `component` constructor, which can't be serialized like data. If you navigate to `/red`, `/green` or `/blue`, you'll see a 'Data returned from `load` ... is not serializable' error in the terminal.
14+
この演習では、最後のケースを扱います。`src/routes/red/+page.server.js``src/routes/green/+page.server.js``src/routes/blue/+page.server.js` の server `load` 関数は、シリアライズできない `component` コンストラクタを返します。`/red``/green``/blue` に移動すると、ターミナルで 'Data returned from `load` ... is not serializable' というエラーが表示されるでしょう。
1515

16-
To turn the server `load` functions into universal `load` functions, rename each `+page.server.js` file to `+page.js`. Now, the functions will run on the server during server-side rendering, but will also run in the browser when the app hydrates or the user performs a client-side navigation.
16+
server `load` 関数を universal `load` 関数に変えるため、各 `+page.server.js` ファイルを `+page.js` にリネームします。これで、この関数はサーバーサイドレンダリング中にサーバーで実行されるものの、アプリのハイドレーション中またはユーザーがクライアントサイドナビゲーションを実行しているときにも実行されるようになります。
1717

18-
We can now use the `component` returned from these `load` functions like any other value, including in `src/routes/+layout.svelte`:
18+
これで、他の値と同じように、`load` 関数から返された `component``src/routes/+layout.svelte` で使えるようになりました:
1919

2020
```svelte
2121
/// file: src/routes/+layout.svelte
@@ -34,4 +34,4 @@ We can now use the `component` returned from these `load` functions like any oth
3434
</nav>
3535
```
3636

37-
Read the [documentation](https://kit.svelte.dev/docs/load#shared-vs-server) to learn more about the distinction between server `load` functions and universal `load` functions, and when to use which.
37+
server `load` 関数と universal `load` 関数の違いや、その使い分けなど、詳細については[ドキュメント](https://kit.svelte.jp/docs/load#shared-vs-server)をご参照ください。

src/routes/tutorial/[slug]/Loading.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</p>
3333
<p>
3434
If you have 'Delete cookies and site data when Firefox is closed' enabled in
35-
<code>about:preferences#privacy</code>, make sure <code>learn.svelte.dev</code> is included
35+
<code>about:preferences#privacy</code>, make sure <code>learn.svelte.jp</code> is included
3636
as an exception.
3737
</p>
3838
{:else if /chrome/i.test(navigator.userAgent) && !/edg/i.test(navigator.userAgent)}
@@ -51,7 +51,7 @@
5151
/>
5252
</svg>
5353
icon in the URL bar or go to
54-
<code>chrome://settings/cookies</code> and add <code>learn.svelte.dev</code> to 'Sites that
54+
<code>chrome://settings/cookies</code> and add <code>learn.svelte.jp</code> to 'Sites that
5555
can always use cookies'.
5656
</p>
5757
{:else}

0 commit comments

Comments
 (0)