Skip to content

Commit 18da3bc

Browse files
committed
translate 04-svelte-js-files.md and 01-what-are-runes.md
1 parent 0f7d41d commit 18da3bc

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3-
title: .svelte.js and .svelte.ts files
3+
title: .svelte.js .svelte.ts ファイル
44
---
55

6-
Besides `.svelte` files, Svelte also operates on `.svelte.js` and `.svelte.ts` files.
6+
Svelte では、`.svelte` ファイル以外に、`.svelte.js` ファイルと `.svelte.ts` ファイルも処理します。
77

8-
These behave like any other `.js` or `.ts` module, except that you can use runes. This is useful for creating reusable reactive logic, or sharing reactive state across your app.
8+
これらは他の `.js` `.ts` モジュールと同じように振る舞いますが、Rune を使用することができます。これは、再利用可能なりアクティブロジックを作ったり、アプリ全体でリアクティブな state を共有するのに有用です。
99

1010
> [!LEGACY]
11-
> This is a concept that didn't exist prior to Svelte 5
11+
> これは Svelte 5 より前には存在しないコンセプトです
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3-
title: What are runes?
3+
title: Runeとは?
44
---
55

66
> [!NOTE] **rune** /ro͞on/ _noun_
77
>
8-
> A letter or mark used as a mystical or magic symbol.
8+
> 神秘的または魔術的なシンボルとして使用される文字やマーク。
99
10-
Runes are symbols that you use in `.svelte` and `.svelte.js`/`.svelte.ts` files to control the Svelte compiler. If you think of Svelte as a language, runes are part of the syntax — they are _keywords_.
10+
Rune は `.svelte` ファイルや `.svelte.js`/`.svelte.ts` ファイルで使用するシンボルで、Svelte コンパイラをコントロールします。Svelte を言語として考えるなら、Rune は構文の一部であり、キーワードです。
1111

12-
Runes have a `$` prefix and look like functions:
12+
Rune には `$` 接頭辞があり、関数のように見えます:
1313

1414
```js
1515
let message = $state('hello');
1616
```
1717

18-
They differ from normal JavaScript functions in important ways, however:
18+
しかし、これらは通常の JavaScript の関数とはいくつか重要な点で異なります:
1919

20-
- You don't need to import them — they are part of the language
21-
- They're not values — you can't assign them to a variable or pass them as arguments to a function
22-
- Just like JavaScript keywords, they are only valid in certain positions (the compiler will help you if you put them in the wrong place)
20+
- インポートする必要はありません — これは言語の一部です
21+
- 値ではありません — 変数に代入したり、関数の引数として渡すことはできません
22+
- JavaScript のキーワードと同じように、特定の位置でのみ有効です (もし間違った位置に置いても、コンパイラが助けてくれます)
2323

2424
> [!LEGACY]
25-
> Runes didn't exist prior to Svelte 5.
25+
> Rune は Svelte 5 以前には存在しません。

0 commit comments

Comments
 (0)