-
Notifications
You must be signed in to change notification settings - Fork 2
Traduction de advanced/lazy-loading.md
#10
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 advanced/lazy-loading.md
#10
Conversation
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.
Merci @Kocal. Voici ma review.
docs/en/advanced/lazy-loading.md
Outdated
@@ -1,28 +1,27 @@ | |||
# Lazy Loading Routes (En) <br><br> *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/vue-router).* | |||
# Les Routes chargeant à la volée |
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 propose
Les routes chargées à la volée
ou
Le chargement à la volée
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.
Oulah, je sais pas pourquoi j'ai écris « chargeant », peut-être la fatigue 😝
Je garde la 1ère proposition (tu remarqueras que le titre dans le SUMMARY.md
est différent avec le titre du api/lazy-loading.md
)
EDIT : Finalement on garde la 2ème proposition : #10 (comment)
docs/en/SUMMARY.md
Outdated
@@ -21,7 +21,7 @@ | |||
- [Transitions (En)](advanced/transitions.md) | |||
- [Data Fetching (En)](advanced/data-fetching.md) | |||
- [Scroll Behavior (En)](advanced/scroll-behavior.md) | |||
- [Lazy Loading (En)](advanced/lazy-loading.md) | |||
- [Le chargement à la volée](advanced/lazy-loading.md) |
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.
Que pense tu d'aligner nos titres avec le menu, quitte à les raccourcir ?
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 marche !
docs/en/advanced/lazy-loading.md
Outdated
|
||
When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited. | ||
Pendant la construction d'applications avec un « bundler », le paquet JavaScript peut devenir un peut lourd, et donc cela peut affecter le temps de chargement de page. Il serait plus efficace si l'on pouvait séparer chaque composants de route dans des fragments séparés, et de ne les charger uniquement lorsque la route est visitée. |
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 empaqueteur (« bundler »)
un peu
et de
neles charger uniquement
docs/en/advanced/lazy-loading.md
Outdated
lazy-load route components. | ||
|
||
All we need to do is define our route components as async components: | ||
En combinant la [fonctionnalité de composant asynchrone](http://vuejs.org/guide/components.html#Async-Components) de Vue et la [fonctionnalité de séparation de code](https://webpack.js.org/guides/code-splitting-require/) de Webpack, il est très facile de charger à la volée les composants de route. |
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.
docs/en/advanced/lazy-loading.md
Outdated
|
||
``` js | ||
const Foo = resolve => { | ||
// require.ensure is Webpack's special syntax for a code-split point. | ||
// require.ensure est une syntaxe spéciale de Webpack pour une séparation de code. |
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.
require.ensure
avec tick et
webpack
sans majuscule
Je PR l'original
docs/en/advanced/lazy-loading.md
Outdated
@@ -32,14 +31,14 @@ const router = new VueRouter({ | |||
}) | |||
``` | |||
|
|||
### Grouping Components in the Same Chunk | |||
### Grouper des composants dans le même morceau |
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.
on traduit chunk
par fragment :
même fragment
J'ai ajouté l'info dans l'issue des trads now
docs/en/advanced/lazy-loading.md
Outdated
|
||
``` js | ||
const Foo = r => require.ensure([], () => r(require('./Foo.vue')), 'group-foo') | ||
const Bar = r => require.ensure([], () => r(require('./Bar.vue')), 'group-foo') | ||
const Baz = r => require.ensure([], () => r(require('./Baz.vue')), 'group-foo') | ||
``` | ||
|
||
Webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array). | ||
Webpack groupera tous les modules asynchrones avec le même nom de morceau, dans le même morceau asynchrone — cela signifie aussi que nous n'avons plus besoin de lister explicitement les dépendances pour `require.ensure` (équivaut à passer un tableau vide). |
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
asynchrone. Cela signifie
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 laisse Webpack
car il est au début de la phrase.
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.
Seconde review. Encore quelque petit trucs.
docs/en/advanced/lazy-loading.md
Outdated
|
||
When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited. | ||
Pendant la construction d'applications avec un empaqueteur (« bundler »), le paquet JavaScript peut devenir un peu lourd, et donc cela peut affecter le temps de chargement de page. Il serait plus efficace si l'on pouvait séparer chaque composants de route dans des fragments séparés, et de les charger uniquement lorsque la route est visitée. |
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.
de la page
p-e ?
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.
Oui c'est mieux avec le la
!
docs/en/advanced/lazy-loading.md
Outdated
All we need to do is define our route components as async components: | ||
En combinant la [fonctionnalité de composant asynchrone](https://fr.vuejs.org/v2/guide/components.html#Composants-asynchrones) de Vue et la [fonctionnalité de séparation de code](https://webpack.js.org/guides/code-splitting-require/) de webpack, il est très facile de charger à la volée les composants de route. | ||
|
||
Tout ce dont nous avons à faire, c'est de définir les composants de notre route en tant que composants asynchrones : |
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.
Tout ce que nous avons à faire
ou
Tout ce dont nous devons nous soucier
:)
docs/en/advanced/lazy-loading.md
Outdated
|
||
``` js | ||
const Foo = r => require.ensure([], () => r(require('./Foo.vue')), 'group-foo') | ||
const Bar = r => require.ensure([], () => r(require('./Bar.vue')), 'group-foo') | ||
const Baz = r => require.ensure([], () => r(require('./Baz.vue')), 'group-foo') | ||
``` | ||
|
||
Webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array). | ||
Webpack groupera tous les modules asynchrones avec le même nom de morceau, dans le même morceau asynchrone. Cela signifie aussi que nous n'avons plus besoin de lister explicitement les dépendances pour `require.ensure` (équivaut à passer un tableau vide). |
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 sans majuscule, même en début de phrase http://webpack.github.io/docs/
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.
Oh d'accord, étrange 😯
Modifié, tu peux approuver les changements si tu ne trouves rien d'autre à modifier ! |
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.
Deux points et bon pour moi !
docs/en/advanced/lazy-loading.md
Outdated
|
||
When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited. | ||
Pendant la construction d'applications avec un empaqueteur (« bundler »), le paquet JavaScript peut devenir un peu lourd, et donc cela peut affecter le temps de chargement de la page. Il serait plus efficace si l'on pouvait séparer chaque composants de route dans des fragments séparés, et de les charger uniquement lorsque la route est visitée. |
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.
chaque composant
docs/en/advanced/lazy-loading.md
Outdated
|
||
``` js | ||
const Foo = r => require.ensure([], () => r(require('./Foo.vue')), 'group-foo') | ||
const Bar = r => require.ensure([], () => r(require('./Bar.vue')), 'group-foo') | ||
const Baz = r => require.ensure([], () => r(require('./Baz.vue')), 'group-foo') | ||
``` | ||
|
||
Webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array). | ||
webpack groupera tous les modules asynchrones avec le même nom de morceau, dans le même morceau asynchrone. Cela signifie aussi que nous n'avons plus besoin de lister explicitement les dépendances pour `require.ensure` (équivaut à passer un tableau vide). |
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.
nom de fragment, dans le même fragment
Deux points et bon pour moi ! @Kocal |
Modifié |
No description provided.