Skip to content

Commit f521c47

Browse files
committed
translate 01-svelte/01-introduction/02-your-first-component into Japanese
1 parent 5012159 commit f521c47

File tree

1 file changed

+5
-5
lines changed
  • content/tutorial/01-svelte/01-introduction/02-your-first-component

1 file changed

+5
-5
lines changed

content/tutorial/01-svelte/01-introduction/02-your-first-component/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: Your first component
33
---
44

5-
In Svelte, an application is composed from one or more _components_. A component is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written into a `.svelte` file. The `App.svelte` file, open in the code editor to the right, is a simple component.
5+
Svelteでは、アプリケーションは1つ以上の*コンポーネント*で構成されます。コンポーネントとは、HTMLCSSJavaScript をカプセル化した再利用可能な自己完結型のコードブロックのことで、`.svelte` ファイルに記述します。右のコードエディタにある `App.svelte` は単純なコンポーネントの例です。
66

77
## Adding data
88

9-
A component that just renders some static markup isn't very interesting. Let's add some data.
9+
静的なマークアップ(HTML)をレンダリングするだけでは面白くありません。いくつかデータを追加してみましょう。
1010

11-
First, add a script tag to your component and declare a `name` variable:
11+
まず、`script` タグを追加してその中に `name` 変数を宣言します。
1212

1313
```svelte
1414
+++<script>
@@ -18,13 +18,13 @@ First, add a script tag to your component and declare a `name` variable:
1818
<h1>Hello world!</h1>
1919
```
2020

21-
Then, we can refer to `name` in the markup:
21+
次に、マークアップから `name` を参照します。
2222

2323
```svelte
2424
<h1>Hello +++{name}+++!</h1>
2525
```
2626

27-
Inside the curly braces, we can put any JavaScript we want. Try changing `name` to `name.toUpperCase()` for a shoutier greeting.
27+
中括弧`{}`の中にはJavaScriptのコードを置くことができます。中括弧の中の `name` `name.toUpperCase()` に置き換えてみましょう。
2828

2929
```svelte
3030
<h1>Hello {name+++.toUpperCase()+++}!</h1>

0 commit comments

Comments
 (0)