Skip to content

Commit 5b3b9c9

Browse files
committed
Traduction transitions.md (2)
1 parent 35bbcc7 commit 5b3b9c9

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/v2/guide/transitions.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -478,24 +478,24 @@ methods: {
478478
}
479479
```
480480

481-
These hooks can be used in combination with CSS transitions/animations or on their own.
481+
Ces hooks peuvent être utilisés en combinaison avec des transitions/animations CSS ou sur eux-mêmes.
482482

483-
<p class="tip">When using JavaScript-only transitions, **the `done` callbacks are required for the `enter` and `leave` hooks**. Otherwise, they will be called synchronously and the transition will finish immediately.</p>
483+
<p class="tip">Lors de l'utilisation de transitions uniquement JavaScript, **les fonctions de retour `done` sont obligatoires pour les hooks `enter` et `leave`**. Dans le cas contraire, elles seront appelées de façon synchrone et la transition se terminera immédiatement.</p>
484484

485-
<p class="tip">It's also a good idea to explicitly add `v-bind:css="false"` for JavaScript-only transitions so that Vue can skip the CSS detection. This also prevents CSS rules from accidentally interfering with the transition.</p>
485+
<p class="tip">C'est aussi une bonne idée d'ajouter explicitement `v-bind:css="false"` pour les transitions uniquement JavaScript afin que Vue puisse ignorer la détection CSS. Cela empêche également les règles CSS d'interfèrer accidentellement avec la transition.</p>
486486

487-
Now let's dive into an example. Here's a simple JavaScript transition using Velocity.js:
487+
Maintenant, nous allons plonger dans un exemple. Voici une simple transition JavaScript à l'aide de Velocity.js :
488488

489489
``` html
490490
<!--
491-
Velocity works very much like jQuery.animate and is
492-
a great option for JavaScript animations
491+
Velocity fonctionne aussi bien que jQuery.animate et est
492+
une excellente option pour les animations
493493
-->
494494
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.2.3/velocity.min.js"></script>
495495

496496
<div id="example-4">
497497
<button @click="show = !show">
498-
Toggle
498+
Permter
499499
</button>
500500
<transition
501501
v-on:before-enter="beforeEnter"
@@ -504,7 +504,7 @@ a great option for JavaScript animations
504504
v-bind:css="false"
505505
>
506506
<p v-if="show">
507-
Demo
507+
Démo
508508
</p>
509509
</transition>
510510
</div>
@@ -541,15 +541,15 @@ new Vue({
541541
{% raw %}
542542
<div id="example-4" class="demo">
543543
<button @click="show = !show">
544-
Toggle
544+
Permuter
545545
</button>
546546
<transition
547547
v-on:before-enter="beforeEnter"
548548
v-on:enter="enter"
549549
v-on:leave="leave"
550550
>
551551
<p v-if="show">
552-
Demo
552+
Démo
553553
</p>
554554
</transition>
555555
</div>
@@ -584,17 +584,17 @@ new Vue({
584584
</script>
585585
{% endraw %}
586586

587-
## Transitions on Initial Render
587+
## Transitions sur le rendu initial
588588

589-
If you also want to apply a transition on the initial render of a node, you can add the `appear` attribute:
589+
Si vous souhaitez également appliquer une transition sur le rendu initial d'un nœud, vous pouvez ajouter l'attribut `appear` :
590590

591591
``` html
592592
<transition appear>
593593
<!-- ... -->
594594
</transition>
595595
```
596596

597-
By default, this will use the transitions specified for entering and leaving. If you'd like however, you can also specify custom CSS classes:
597+
Par défaut, cela utilisera les transitions spécifiées pour l’entrée et la sortie. Si vous le souhaitez, vous pouvez également spécifier des classes CSS personnalisées :
598598

599599
``` html
600600
<transition
@@ -607,7 +607,7 @@ By default, this will use the transitions specified for entering and leaving. If
607607
</transition>
608608
```
609609

610-
and custom JavaScript hooks:
610+
et des hooks JavaScript personnalisés :
611611

612612
``` html
613613
<transition
@@ -621,63 +621,63 @@ and custom JavaScript hooks:
621621
</transition>
622622
```
623623

624-
## Transitioning Between Elements
624+
## Transition entre éléments
625625

626-
We discuss [transitioning between components](#Transitioning-Between-Components) later, but you can also transition between raw elements using `v-if`/`v-else`. One of the most common two-element transitions is between a list container and a message describing an empty list:
626+
Plus loin, nous parlons de [transition entre les composants](#Transitioning-Between-Components), mais vous pouvez également faire une transition entre des éléments bruts en utilisant `v-if`/`v-else`. L'une des transitions les plus courantes sur deux éléments est entre un conteneur de liste et un message décrivant une liste vide :
627627

628628
``` html
629629
<transition>
630630
<table v-if="items.length > 0">
631631
<!-- ... -->
632632
</table>
633-
<p v-else>Sorry, no items found.</p>
633+
<p v-else>Désolé, aucun élément trouvé.</p>
634634
</transition>
635635
```
636636

637-
This works well, but there's one caveat to be aware of:
637+
Cela fonctionne bien, mais il y a une mise en garde à connaître :
638638

639-
<p class="tip">When toggling between elements that have **the same tag name**, you must tell Vue that they are distinct elements by giving them unique `key` attributes. Otherwise, Vue's compiler will only replace the content of the element for efficiency. Even when technically unnecessary though, **it's considered good practice to always key multiple items within a `<transition>` component.**</p>
639+
<p class="tip">Lors de la permutation entre des éléments qui ont **le même nom de balise**, vous devez indiquer à Vue qu’ils sont des éléments distincts en lui donnant des attributs `key` uniques. Sinon, le compilateur de Vue ne remplacera que le contenu de l'élément dans le but d'être efficace. Cependant, même si c'est techniquement inutile, **c'est considéré comme une bonne pratique de toujours avoir une clé pour chaque élément dans un composant `<transition>`.**</p>
640640

641-
For example:
641+
Par exemple :
642642

643643
``` html
644644
<transition>
645645
<button v-if="isEditing" key="save">
646-
Save
646+
Sauver
647647
</button>
648648
<button v-else key="edit">
649-
Edit
649+
Modifier
650650
</button>
651651
</transition>
652652
```
653653

654-
In these cases, you can also use the `key` attribute to transition between different states of the same element. Instead of using `v-if` and `v-else`, the above example could be rewritten as:
654+
Dans ces cas, vous pouvez aussi utiliser l'attribut `key` pour effectuer une transition entre différents états du même élément. Au lieu d’utiliser `v-if` et `v-else`, l’exemple ci-dessus pourrait être réécrit ainsi :
655655

656656
``` html
657657
<transition>
658658
<button v-bind:key="isEditing">
659-
{{ isEditing ? 'Save' : 'Edit' }}
659+
{{ isEditing ? 'Sauver' : 'Modifier' }}
660660
</button>
661661
</transition>
662662
```
663663

664-
It's actually possible to transition between any number of elements, either by using multiple `v-if`s or binding a single element to a dynamic property. For example:
664+
Il est effectivement possible de faire une transition entre un nombre indéfini d'éléments, soit en utilisant plusieurs `v-if` ou soit en liant un élément unique à une propriété dynamique. Par exemple :
665665

666666
``` html
667667
<transition>
668668
<button v-if="docState === 'saved'" key="saved">
669-
Edit
669+
Modifier
670670
</button>
671671
<button v-if="docState === 'edited'" key="edited">
672-
Save
672+
Sauver
673673
</button>
674674
<button v-if="docState === 'editing'" key="editing">
675-
Cancel
675+
Annuler
676676
</button>
677677
</transition>
678678
```
679679

680-
Which could also be written as:
680+
Qui pourrait aussi s'écrire ainsi :
681681

682682
``` html
683683
<transition>
@@ -692,9 +692,9 @@ Which could also be written as:
692692
computed: {
693693
buttonMessage: function () {
694694
switch (docState) {
695-
case 'saved': return 'Edit'
696-
case 'edited': return 'Save'
697-
case 'editing': return 'Cancel'
695+
case 'saved': return 'Modifier'
696+
case 'edited': return 'Sauver'
697+
case 'editing': return 'Annuler'
698698
}
699699
}
700700
}

0 commit comments

Comments
 (0)