-
Notifications
You must be signed in to change notification settings - Fork 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
Relecture de async-data.md
#13
Conversation
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
en/guide/async-data.md
Outdated
1. Returning a `Promise`. Nuxt.js will wait for the promise to be resolved before rendering the component. | ||
2. Using the [async/await proposal](https://github.com/lukehoban/ecmascript-asyncawait) ([learn more about it](https://zeit.co/blog/async-and-await)) | ||
3. Define a callback as second argument. It has to be called like this: `callback(err, data)` | ||
1. Retourner une `Promise`. Nuxt.js attends que la promesse soit résolue avant de faire le rendu du composant. |
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.
"attend"
en/guide/async-data.md
Outdated
|
||
You can use the context object injected into the `asyncData` property to access dynamic route data. For example, dynamic route params can be accessed using the name of the file or folder that configured it. So if you define a file named `_slug.vue`, you can acccess it via `context.params.slug`. | ||
Vous pouvez utiliser l'objet du contexte injecté à la propriété `asyncData` afin d'accéder aux données des routes dynamiques. Par example, les données des routes dynamiques peuvent être accédées en utilisant le nom du fichier ou du dossier qui la configure. Si vous définissez un fichier nommé `_slug.vue`, vous pourrez y accéder via `context.params.slug`. |
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.
"Par exemple"
en/guide/async-data.md
Outdated
|
||
Nuxt.js adds the `error(params)` method in the `context`, you can call it to display the error page. `params.statusCode` will be also used to render the proper status code form the server-side. | ||
Nuxt.js ajoute la méthode `error(params)` au `context`, vous pouvez l'appeler pour afficher la page d'erreur. `params.statusCode` sera également utilisée pour faire le rendu avec le code de status approprié côté serveur. |
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.
"code de statut"
en/guide/async-data.md
Outdated
@@ -108,4 +108,4 @@ export default { | |||
} | |||
``` | |||
|
|||
To customize the error page, take a look at the [VIEWS layouts section](/guide/views#layouts). | |||
Pour personnaliser la page d'erreur, consultez la [partie mises en page de la section vues](/guide/views#mises-en-page). |
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.
Est-ce qu'on capitaliserait le mot "vues" étant donné qu'il s'agit du nom d'une section?
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.
Même question pour "Mises en page".
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 tout a fait possible oui. Pour le moment tous les liens déjà parcouru on été rédigé sans majuscule. Pour la consistence, je préfère revoir tous les liens précédents d'un coup.
Je vais jetter un œil rétroactivement si je peux faire ça dans cette PR vu que toutes les autres sont fusionné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.
Top ! Je suis du meme avis que @rspt concernant les liens.
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
J'ai pris tes remarques en compte @rspt. Si c'est ok pour toi, je merge ! |
@@ -88,7 +88,7 @@ router: { | |||
|
|||
Comme vous pouvez le voir, la route nommée `users-id` contient le chemin `:id?` ce qui le rend optionnel. Si vous voulez le rendre obligatoire, créez un fichier `index.vue` dans le dossier `users/_id`. | |||
|
|||
<p class="Alert Alert--info"><b>Attention :</b> les routes dynamiques sont ignorées par la commande `generate` : [ Configuration de l'API pour la génération](/api/configuration-generate#routes)</p> | |||
<p class="Alert Alert--info"><b>Attention :</b> les routes dynamiques sont ignorées par la commande `generate`, consultez la configuration de l'API pour La propriété `generate`](/api/configuration-generate#routes)</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.
Même question également pour les noms de section que sur la PR #14 ?
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.
Cette fois c'est le bon nom de page :)
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.
👏
@@ -88,7 +88,7 @@ router: { | |||
|
|||
Comme vous pouvez le voir, la route nommée `users-id` contient le chemin `:id?` ce qui le rend optionnel. Si vous voulez le rendre obligatoire, créez un fichier `index.vue` dans le dossier `users/_id`. | |||
|
|||
<p class="Alert Alert--info"><b>Attention :</b> les routes dynamiques sont ignorées par la commande `generate` : [ Configuration de l'API pour la génération](/api/configuration-generate#routes)</p> | |||
<p class="Alert Alert--info"><b>Attention :</b> les routes dynamiques sont ignorées par la commande `generate`, consultez la configuration de l'API pour La propriété `generate`](/api/configuration-generate#routes)</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.
Est-ce qu'il ne manquerais pas un '['?
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 bien vu. J'ai commit ça : 8768bc4
Pensez à jeter un œil aux modifications rétroactives.