-
Notifications
You must be signed in to change notification settings - Fork 103
v2/guide/routing.md - proposition de traduction #11
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- | ||
title: Routing | ||
title: Routeur | ||
type: guide | ||
order: 21 | ||
--- | ||
|
||
## Official Router | ||
## Routeur officiel | ||
|
||
<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>For most Single Page Applications, it's recommended to use the officially-supported [vue-router library](https://github.com/vuejs/vue-router). For more details, see vue-router's [documentation](http://vuejs.github.io/vue-router/). | ||
Pour la plupart des applications monopages, il est recommandé d'utiliser la librairie officiellement supportée [vue-router](https://github.com/vuejs/vue-router). Pour plus de détails, voir la [documentation de vue-router](http://vuejs.github.io/vue-router/). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On traduit library par bibliothèque comme l'a suggéré @sylvainpolletvillard |
||
|
||
## Simple Routing From Scratch | ||
## Un routeur simple en partant de zéro | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je pencherai pour
Puisqu'on parle de « routing » et non de « router » |
||
|
||
If you just need very simple routing and do not wish to involve a full-featured router library, you can do so by dynamically rendering a page-level component like this: | ||
Si vous avez simplement besoin d'un routage très simple et ne souhaitez pas ajouter une librairie riche en fonctionnalités, vous pouvez le faire en déclenchant dynamiquement le rendu d'un composant de page de cette manière : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
``` js | ||
const NotFound = { template: '<p>Page not found</p>' } | ||
|
@@ -35,9 +35,9 @@ new Vue({ | |
render (h) { return h(this.ViewComponent) } | ||
}) | ||
``` | ||
Combiné à l'API d'historique d'HTML5, vous pouvez construire un routeur client basique mais parfaitement fonctionnel. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. API HTML5 History (garder le nom officiel de la spec pour trouver plus facilement les références et coller au namespace History associé) |
||
Pour en voir une démonstration, faites un checkout [de cette application d'exemple](https://github.com/chrisvfritz/vue-2.0-simple-routing-example). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Que faisons nous des termes associés au versionnage de source ? Repository devient Dépôt Mais le reste ? Commit = Valider etc. Je serais d'avis de conserver les termes car je les ai moi même rarement vu traduit en ce qui concerne GIT là ou ce n'est pas le cas pour d'autres plateformes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. La doc ne s’embarrasse pas d'expliquer le fonctionnement de git donc même en traduisant, pas sûr que ça aide le lecteur non averti. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je trouve aussi plus facile à lire de garder les termes anglais pour ce qui touche à git |
||
|
||
Combined with the HTML5 History API, you can build a very basic but fully-functional client-side router. To see that in practice, check out [this example app](https://github.com/chrisvfritz/vue-2.0-simple-routing-example). | ||
## Intégrer des routeurs tierce-partie | ||
|
||
## Integrating 3rd-Party Routers | ||
|
||
If there's a 3rd-party router you prefer to use, such as [Page.js](https://github.com/visionmedia/page.js) or [Director](https://github.com/flatiron/director), integration is [similarly easy](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/compare/master...pagejs). Here's a [complete example](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/tree/pagejs) using Page.js. | ||
Si il y a un routeur tierce-partie que vous préférez utiliser, tel que [Page.js](https://github.com/visionmedia/page.js) ou [Director](https://github.com/flatiron/director), l'intégration est [tout aussi simple](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/compare/master...pagejs). Voici [un exemple complet](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/tree/pagejs) qui utilise Page.js. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. S'il y a |
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.
Routage plutôt