-
Notifications
You must be signed in to change notification settings - Fork 2
Traduction de advanced/data-fetching.md
#12
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
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.
Plusieurs point de consistence.
Bon boulot !
Je sais pas si tu avais pris en compte notre discussion a ce niveau de traduction sur In-Component Guard pour « Composant de sécurisation »
docs/en/advanced/data-fetching.md
Outdated
|
||
- **Fetching Before Navigation**: Fetch data before navigation in the route enter guard, and perform the navigation after data has been fetched. | ||
- **Récupération de donnée avant la navigation** : récupère les données avant la navigation dans la fonction de garde d'entrée de la route, et effectue la navigation après que les données aient été récupérées. |
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.
Suite à notre discussion
la fonction de sécurisation
docs/en/advanced/data-fetching.md
Outdated
|
||
Technically, both are valid choices - it ultimately depends on the user experience you are aiming for. | ||
Techniquement, les deux choix sont valides — cela dépend de l'expérience utilisateur que vous souhaitez apporter. |
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.
valides. Cela
docs/en/advanced/data-fetching.md
Outdated
|
||
When using this approach, we navigate and render the incoming component immediately, and fetch data in the component's `created` hook. It gives us the opportunity to display a loading state while the data is being fetched over the network, and we can also handle loading differently for each view. | ||
En utilisant cette approche, nous naviguons et faisons immédiatement le rendu du composant, et récupère les données via le hook `created` du composant. Cela nous donne l'opportunité d'afficher un état de chargement pendant ques les données sont récupérées à travers le réseau, et nous pouvons aussi gérer le chargement différemment pour chaque vue. |
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.
Conserver le nous / éviter les virgules en français devant les « et »
du composant et récupérons
pendant que
docs/en/advanced/data-fetching.md
Outdated
|
||
Let's assume we have a `Post` component that needs to fetch the data for a post based on `$route.params.id`: | ||
Assumons que nous ayons un composant `Post` qui a besoin de récupérer des données pour un post identifié par `$route.params.id` : |
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.
pour un billet (c.f. billet de blog)
docs/en/advanced/data-fetching.md
Outdated
@@ -43,19 +43,19 @@ export default { | |||
} | |||
}, | |||
created () { | |||
// fetch the data when the view is created and the data is | |||
// already being observed | |||
// récupère les données lorsque la vue est créée et |
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.
récupérer
docs/en/advanced/data-fetching.md
Outdated
this.fetchData() | ||
}, | ||
watch: { | ||
// call again the method if the route changes | ||
// on appelle encore la méthode si la route change |
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.
appeler
docs/en/advanced/data-fetching.md
Outdated
'$route': 'fetchData' | ||
}, | ||
methods: { | ||
fetchData () { | ||
this.error = this.post = null | ||
this.loading = true | ||
// replace getPost with your data fetching util / API wrapper | ||
// remplacez getPost par votre fonction de récupération de données |
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.
remplacer
getPost
par une fonction de récupération de données
(j'ouvre une PR à l'original pour les ticks)
docs/en/advanced/data-fetching.md
Outdated
|
||
With this approach we fetch the data before actually navigating to the new | ||
route. We can perform the data fetching in the `beforeRouteEnter` guard in the incoming component, and only call `next` when the fetch is complete: | ||
Avec cette approche, nous récupérerons les données avant de naviguer vers la nouvelle route. Nous pouvons effectuer la récupération de données dans la fonction de garde `beforeRouteEnter` du composant à venir, et seulement appeler `next` lorsque la récupération est terminé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.
la fonction de sécurisation
Il me semble avoir écrit traduit en Pour l'instant je laisse les modifs à propos des (Après, ça peut aussi venir de vue-router qui a mal interprété |
En ce qui concerne le terme tu peux toujours ouvrir une issue pour revenir rétroactivement sur le terme. Pour le moment, afin de ne pas bloquer le travail, je t'encourage à adopter « sécurité / sécurisation » ici ou « garde » partout ailleurs mais de conserver une consistance. En holacratie l'idée c'est d'avancé pas à pas et de se dire que chaque tension peut être retraité à l'infinie sans bloquer le travail global de la Raison d'être de l'entreprise. Je pense qu'étant donnée que les issues et PR sont faisable à l'infinie, on peut revenir sur ce point plus tard. Sinon on peut toujours bloquer cette PR ici mais c'est dommage d'autant que tu as utilisé sécurisation partout ailleurs. On peut également voir si sa passe la validation de l'équipe Vue Router car l'un des décideurs est français et il fait des relectures avant validation. Quand quelque chose lui paraît vraiment « trop » en général ça repars en discussion ici. |
Bon très bien, je pars sur Tu peux approuver les changements ~ |
No description provided.