Skip to content

Commit ab2dad3

Browse files
Merge pull request #66 from forresst/translate-transitionning-state
Traduction `transitioning-state.md`
2 parents 2243e9a + 9dcd4cc commit ab2dad3

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/v2/guide/transitioning-state.md

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
2-
title: Transitioning State (En)
2+
title: État de transition
33
type: guide
44
order: 14
55
---
66

7-
<p class="tip">**Cette page est en cours de traduction française. Revenez une autre fois pour lire une traduction achevée ou [participez à la traduction française ici](https://github.com/vuejs-fr/vuejs.org).**</p><p>Vue's transition system offers many simple ways to animate entering, leaving, and lists, but what about animating your data itself? For example:</p>
7+
Le système de transition de Vue offre de nombreuses façons simples d'animer l'entrée, la sortie et les listes, mais qu'en est-il de l'animation de vos propres données ? Par exemple :
88

9-
- numbers and calculations
10-
- colors displayed
11-
- the positions of SVG nodes
12-
- the sizes and other properties of elements
9+
- les nombres et les calculs
10+
- les couleurs affichées
11+
- les positions des nœuds SVG
12+
- les tailles et les autres propriétés des éléments
1313

14-
All of these are either already stored as raw numbers or can be converted into numbers. Once we do that, we can animate these state changes using 3rd-party libraries to tween state, in combination with Vue's reactivity and component systems.
14+
Tous ces éléments sont déjà stockés sous forme de nombres bruts, ou peuvent être convertis en nombres. Dès lors, nous pouvons animer ces modifications de l'état à l'aide de bibliothèques tierces vers un état intermédiaire, en combinaison avec la réactivité de Vue et les systèmes de composants.
1515

16-
## Animating State with Watchers
16+
## Animation de l'état avec des observateurs
1717

18-
Watchers allow us to animate changes of any numerical property into another property. That may sound complicated in the abstract, so let's dive into an example using [Tween.js](https://github.com/tweenjs/tween.js):
18+
Les observateurs nous permettent d'animer les changements de toute propriété numérique dans une autre propriété. Cela peut paraître compliqué dans l'abstrait, donc plongeons-nous dans un exemple en utilisant [Tween.js](https://github.com/tweenjs/tween.js):
1919

2020
``` html
2121
<script src="https://unpkg.com/[email protected]"></script>
@@ -95,7 +95,7 @@ new Vue({
9595
</script>
9696
{% endraw %}
9797

98-
When you update the number, the change is animated below the input. This makes for a nice demo, but what about something that isn't directly stored as a number, like any valid CSS color for example? Here's how we could accomplish this with the addition of [Color.js](https://github.com/brehaut/color-js):
98+
Lorsque vous mettez à jour le nombre, la modification est animée en dessous de l'input. Cela fait une belle démonstration, mais qu'en est-il de quelque-chose qui n'est pas directement stocké comme un nombre, comme n'importe quelle couleur CSS valide par exemple ? Voici comment nous pourrions accomplir cela avec l'ajout de [Color.js](https://github.com/brehaut/color-js):
9999

100100
``` html
101101
<script src="https://unpkg.com/[email protected]"></script>
@@ -105,10 +105,10 @@ When you update the number, the change is animated below the input. This makes f
105105
<input
106106
v-model="colorQuery"
107107
v-on:keyup.enter="updateColor"
108-
placeholder="Enter a color"
108+
placeholder="Entrer une couleur"
109109
>
110-
<button v-on:click="updateColor">Update</button>
111-
<p>Preview:</p>
110+
<button v-on:click="updateColor">Mettre à jour</button>
111+
<p>Aperçu :</p>
112112
<span
113113
v-bind:style="{ backgroundColor: tweenedCSSColor }"
114114
class="example-7-color-preview"
@@ -185,10 +185,10 @@ new Vue({
185185
<input
186186
v-model="colorQuery"
187187
v-on:keyup.enter="updateColor"
188-
placeholder="Enter a color"
188+
placeholder="Entrer une couleur"
189189
>
190-
<button v-on:click="updateColor">Update</button>
191-
<p>Preview:</p>
190+
<button v-on:click="updateColor">Mettre à jour</button>
191+
<p>Aperçu :</p>
192192
<span
193193
v-bind:style="{ backgroundColor: tweenedCSSColor }"
194194
class="example-7-color-preview"
@@ -255,9 +255,9 @@ new Vue({
255255
</style>
256256
{% endraw %}
257257

258-
## Dynamic State Transitions
258+
## Transitions d'état dynamiques
259259

260-
Just as with Vue's transition components, the data backing state transitions can be updated in real time, which is especially useful for prototyping! Even using a simple SVG polygon, you can achieve many effects that would be difficult to conceive of until you've played with the variables a little.
260+
Tout comme pour les composants de transition de Vue, les transitions d'état de données peuvent être mises à jour en temps réel, ce qui est particulièrement utile pour le prototypage ! Même en utilisant un polygone SVG simple, vous pouvez obtenir de nombreux effets qui seraient difficile à concevoir tant que vous n'avez pas un peu joué avec les variables.
261261

262262
{% raw %}
263263
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.5/TweenLite.min.js"></script>
@@ -266,23 +266,23 @@ Just as with Vue's transition components, the data backing state transitions can
266266
<polygon :points="points" class="demo-polygon"></polygon>
267267
<circle cx="100" cy="100" r="90" class="demo-circle"></circle>
268268
</svg>
269-
<label>Sides: {{ sides }}</label>
269+
<label>Faces : {{ sides }}</label>
270270
<input
271271
class="demo-range-input"
272272
type="range"
273273
min="3"
274274
max="500"
275275
v-model.number="sides"
276276
>
277-
<label>Minimum Radius: {{ minRadius }}%</label>
277+
<label>Rayon minimum : {{ minRadius }}%</label>
278278
<input
279279
class="demo-range-input"
280280
type="range"
281281
min="0"
282282
max="90"
283283
v-model.number="minRadius"
284284
>
285-
<label>Update Interval: {{ updateInterval }} milliseconds</label>
285+
<label>Intervalle de mise à jour : {{ updateInterval }} millisecondes</label>
286286
<input
287287
class="demo-range-input"
288288
type="range"
@@ -390,11 +390,11 @@ function generatePoints (stats) {
390390
</style>
391391
{% endraw %}
392392

393-
See [this fiddle](https://jsfiddle.net/chrisvfritz/65gLu2b6/) for the complete code behind the above demo.
393+
Consulter [ce fiddle](https://jsfiddle.net/chrisvfritz/65gLu2b6/) pour voir le code complet derrière la démo ci-dessus.
394394

395-
## Organizing Transitions into Components
395+
## Organisation des transitions dans les composants
396396

397-
Managing many state transitions can quickly increase the complexity of a Vue instance or component. Fortunately, many animations can be extracted out into dedicated child components. Let's do this with the animated integer from our earlier example:
397+
La gestion de nombreuses transitions d'états peut augmenter rapidement la complexité d'une instance ou d'un composant Vue. Heureusement, de nombreuses animations peuvent être extraites dans des composants enfants dédiés. Faisons cela avec l'entier animé de notre exemple précédent :
398398

399399
``` html
400400
<script src="https://unpkg.com/[email protected]"></script>
@@ -412,11 +412,11 @@ Managing many state transitions can quickly increase the complexity of a Vue ins
412412
```
413413

414414
``` js
415-
// This complex tweening logic can now be reused between
416-
// any integers we may wish to animate in our application.
417-
// Components also offer a clean interface for configuring
418-
// more dynamic transitions and complex transition
419-
// strategies.
415+
// Cette logique d'interpolation complexe peut maintenant être réutilisée entre
416+
// les entiers que nous souhaitons animer dans notre application.
417+
// Les composants offrent également une interface propre pour configurer
418+
// des transitions plus dynamiques et des stratégies complexes
419+
// de transition.
420420
Vue.component('animated-integer', {
421421
template: '<span>{{ tweeningValue }}</span>',
422422
props: {
@@ -460,7 +460,7 @@ Vue.component('animated-integer', {
460460
}
461461
})
462462

463-
// All complexity has now been removed from the main Vue instance!
463+
// Toute la complexité a été supprimée de l'instance principale de Vue !
464464
new Vue({
465465
el: '#example-8',
466466
data: {
@@ -545,4 +545,4 @@ new Vue({
545545
</script>
546546
{% endraw %}
547547

548-
Within child components, we can use any combination of transition strategies that have been covered on this page, along with those offered by Vue's [built-in transition system](transitions.html). Together, there are very few limits to what can be accomplished.
548+
Dans les composants enfants, nous pouvons utiliser n'importe quelle combinaison de stratégies de transition qui ont été abordées dans cette page, ainsi que celles offertes par le [système intégré de transition](transitions.html) de Vue. En utilisant les deux, il existe très peu de limites à ce qui peut être accompli.

0 commit comments

Comments
 (0)