-
Notifications
You must be signed in to change notification settings - Fork 103
Traduction de components-dynamic-async
#129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traduction de components-dynamic-async
#129
Conversation
components-dynamic-async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plusieurs changement mineurs pour la cohérance avec le reste de la documentation française, mais comme d'hab : une traduction impec !
@@ -1,20 +1,20 @@ | |||
--- | |||
title: Dynamic & Async Components | |||
title: Composants Dynamiques & Async |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nommer « Composants dynamiques (et/&) asynchrones », en tout cas pas de majuscule dans le titre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je crois que l'auteur tient à désigner les composants comme "async" et non le mot complet "asynchronous", de la même manière qu'ils parlent de "props" et non de properties.
|
||
## `keep-alive` with Dynamic Components | ||
## `keep-alive` avec les Composants Dynamiques |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
composants dynamiques
(sans majuscule)
</strong>\ | ||
</div>\ | ||
</div>\ | ||
' | ||
}) | ||
Vue.component('tab-archive', { | ||
template: '<div>Archive component</div>' | ||
template: '<div>Composant Archive</div>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
archive sans majuscule
@@ -149,18 +149,18 @@ new Vue({ | |||
</style> | |||
{% endraw %} | |||
|
|||
You'll notice that if you select a post, switch to the _Archive_ tab, then switch back to _Posts_, it's no longer showing the post you selected. That's because each time you switch to a new tab, Vue creates a new instance of the `currentTabComponent`. | |||
Vous remarquerez que si vous sélectionnez un post, puis basculez sur l'onglet _Archive_, puis rebasculer à nouveau sur _Posts_, il n'affiche plus le post que vous avez initialement sélectionné. En effet, chaque fois que vous basculez vers un nouvel onglet, Vue crée une nouvelle instance du `composantOngletActuel`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
un billet
(au lieu de un post)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça m'embête à cause de tout le code qui utilise le mot Post, et post est francisé : http://www.larousse.fr/dictionnaires/francais/post/10910858?q=post-#11044443
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -185,89 +185,89 @@ new Vue({ | |||
tabs: ['Posts', 'Archive'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Billets
au lieu de Posts ?
}) | ||
``` | ||
|
||
You can also return a `Promise` in the factory function, so with Webpack 2 and ES2015 syntax you can do: | ||
Vous pouvez également retourner une `Promise` dans la fonction usine, ainsi avec Webpack 2 et la syntaxe ES2015 vous pourrez écrire : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webpack
// The `import` function returns a Promise. | ||
() => import('./my-async-component') | ||
'exemple-webpack-async', | ||
// La fonction `import` retourne une Promise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
une `Promise` ou une promesse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c'est un commentaire de code, je ne vais pas ajouter de ticks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si, tu peux. Vérifie la documentation original Vue à travers les PR, les ticks sont ajoutés pour différencier le texte du code. C'est à ça que sert le Markdown : mettre en page un texte brut.
Vue
https://vuejs.org/v2/style-guide/#Component-style-scoping-essential
<!-- Using the `scoped` attribute -->
https://vuejs.org/v2/guide/computed.html#Basic-Example
// `this` points to the vm instance
Vue Routeur
https://router.vuejs.org/en/essentials/getting-started.html
<!-- `<router-link>` will be rendered as an `<a>` tag by default -->
etc.
Mais ça ne fait rien, on vivra bien avec va.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown ne remplace pas les ticks à l'intérieur du code, on ne peut pas formater du code dans du code. Il faut donc comprendre la syntaxe Markdown pour percevoir l'intention, et vu que les ticks servent aussi à l'écriture littérale de String en JavaScript, je pense que ça apportera plus de confusion qu'autre chose.
} | ||
}) | ||
``` | ||
|
||
<p class="tip">If you're a <strong>Browserify</strong> user that would like to use async components, its creator has unfortunately [made it clear](https://github.com/substack/node-browserify/issues/58#issuecomment-21978224) that async loading "is not something that Browserify will ever support." Officially, at least. The Browserify community has found [some workarounds](https://github.com/vuejs/vuejs.org/issues/620), which may be helpful for existing and complex applications. For all other scenarios, we recommend using Webpack for built-in, first-class async support.</p> | ||
<p class="tip">Si vous êtes un utilisateur de <strong>Browserify</strong> et souhaitez utiliser les composants async, son créateur a malheureusement [été très clair](https://github.com/substack/node-browserify/issues/58#issuecomment-21978224) sur le fait que le chargement asynchrone n'est pas quelque-chose que Browserify supportera un jour. Officiellement du moins. La communauté Browserify a trouvé [quelques solutions de contournement](https://github.com/vuejs/vuejs.org/issues/620), qui peuvent s'avérer utiles pour les applications complexes existantes. Pour tous les autres scénarios, nous recommandons d'utiliser Webpack pour un support natif et de première classe de l'asynchrone.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utiliser les composants asynchrones
webpack
|
||
The async component factory can also return an object of the following format: | ||
La fabrique de composants async peut aussi retourner un objet avec le format suivant : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
le composants asynchrones
// The component to load (should be a Promise) | ||
component: import('./MyComponent.vue'), | ||
// A component to use while the async component is loading | ||
// Le composant à charger (doit être une Promise) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
une `Promise` ou une promesse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c'est un commentaire de code, je ne vais pas ajouter de ticks
J'ai fait quelques corrections, mais pas d'accord avec tous les retours, cf mes commentaires |
bon pour valider ? |
Bon pour moi ! p-e une relecture de plus ? Mais si ça tarde trop on pourra corriger les petites coquilles plus tard ! |
No description provided.