From 023c1b2b0497212c0a7b692cc5ce6de655699a25 Mon Sep 17 00:00:00 2001 From: Romain Crestey Date: Tue, 7 Jan 2025 09:49:21 +0100 Subject: [PATCH] fr: tutorial/01/03/01 --- .../+assets/app-a/src/lib/Nested.svelte | 2 +- .../+assets/app-b/src/lib/Nested.svelte | 2 +- .../01-svelte/03-props/01-declaring-props/index.md | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-a/src/lib/Nested.svelte b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-a/src/lib/Nested.svelte index 5b1d9142a..ec384b7b8 100644 --- a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-a/src/lib/Nested.svelte +++ b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-a/src/lib/Nested.svelte @@ -2,4 +2,4 @@ let { answer } = {}; -

The answer is {answer}

+

La réponse est {answer}

diff --git a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-b/src/lib/Nested.svelte b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-b/src/lib/Nested.svelte index 5b229b0c1..078a81e12 100644 --- a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-b/src/lib/Nested.svelte +++ b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/+assets/app-b/src/lib/Nested.svelte @@ -2,4 +2,4 @@ let { answer } = $props(); -

The answer is {answer}

+

La réponse est {answer}

diff --git a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/index.md b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/index.md index 828f722fc..bf99b81ce 100644 --- a/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/index.md +++ b/apps/svelte.dev/content/tutorial/01-svelte/03-props/01-declaring-props/index.md @@ -1,10 +1,13 @@ --- -title: Declaring props +title: Déclarer des props --- -So far, we've dealt exclusively with internal state — that is to say, the values are only accessible within a given component. +Jusqu'à maintenant, nous avons exclusivement eu affaire à des états internes — c'est-à-dire des +valeurs qui ne sont accessibles uniquement au sein d'un composant donné. -In any real application, you'll need to pass data from one component down to its children. To do that, we need to declare _properties_, generally shortened to 'props'. In Svelte, we do that with the `$props` rune. Edit the `Nested.svelte` component: +Dans une vraie application, vous aurez besoin de passer des données d'un composant à ses enfants. +Pour faire cela, nous devons déclarer des _propriétés_, généralement surnommées 'props'. En Svelte, +nous faisons ça grâce à la rune `$props`. Modifiez le composant `Nested.svelte` : ```svelte /// file: Nested.svelte