-
Notifications
You must be signed in to change notification settings - Fork 1
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 structure.md
#10
Conversation
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
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.
Mes retours sur structure.md
docs/en/structure.md
Outdated
|
||
Vuex doesn't really restrict how you structure your code. Rather, it enforces a set of high-level principles: | ||
Vuex ne vous restreint pas vraiment dans la façon dont vous voulez structurer votre code. Il impose plutôt un set de principes de haut niveau : |
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.
Vuex ne vous restreint pas quand à la structure de code à utiliser.
Il impose plutôt de respecter des principes de haut niveau
docs/en/structure.md
Outdated
|
||
1. Application-level state is centralized in the store. | ||
1. Le state d'application est centralisé dans le store. |
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.
L'état de l'application
docs/en/structure.md
Outdated
|
||
2. The only way to mutate the state is by committing **mutations**, which are synchronous transactions. | ||
2. La seule façon de muter le state est de commiter des **mutations**, qui sont des transactions synchrones. |
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.
muter l'état
est d'acter des
docs/en/structure.md
Outdated
|
||
As long as you follow these rules, it's up to you how to structure your project. If your store file gets too big, simply start splitting the actions, mutations and getters into separate files. | ||
Tant que vous suivez ces règles, c'est à vous de structurer votre projet. Si votre fichier de store devient trop gros, commencez simplement par séparer les actions, mutations et getters dans des fichiers séparés. |
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.
commencez dès lors à séparer les actions, mutations et accesseurs
docs/en/structure.md
Outdated
├── mutations.js # root mutations | ||
├── index.js # Là où l'on assemble nos modules et exportons le store | ||
├── actions.js # Actions racine | ||
├── mutations.js # Mutations racine | ||
└── modules | ||
├── cart.js # cart module | ||
└── products.js # products module |
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.
À traduire
docs/en/structure.md
Outdated
└── modules | ||
├── cart.js # cart module | ||
└── products.js # products module | ||
``` | ||
|
||
As a reference, check out the [Shopping Cart Example](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart). | ||
Vous pouvez jeter à un œil à [l'exemple Shopping Cart](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart). |
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.
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
On commence cette relecture !