-
Notifications
You must be signed in to change notification settings - Fork 2
Guide: using-with-vuex.md #7
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.
Merci pour la traduction ! Dans Vuex on a traduit state par état et getter par accesseur. Le store reste le store !
docs/en/guides/using-with-vuex.md
Outdated
|
||
## Mocking Actions | ||
## Simuler des Actions |
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.
des actions
@@ -35,13 +35,13 @@ export default{ | |||
</script> |
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.
Cliquer
docs/en/guides/using-with-vuex.md
Outdated
|
||
To test this, we need to pass a mock store to Vue when we shallow our component. | ||
Pour tester cela, on doit passer un store fictif à Vue lorsque l'on isole notre composant. *TODO : Isoler, bon verbe ?* |
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.
Bon pour moi isole
docs/en/guides/using-with-vuex.md
Outdated
|
||
Instead of passing the store to the base Vue constructor, we can pass it to a - [localVue](../api/options.md#localvue). A localVue is a scoped Vue constructor that we can make changes to without affecting the global Vue constructor. | ||
Au lieu de passer le store au constructeur de base de Vue, on peut le passer à - [localVue](../api/options.md#localvue). Une localVue est un constructeur à portée limitée de Vue sur lequel on peut effectuer des changements sans avoir à affecter le constructeur global. |
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.
le passer à [`localVue`](...
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 Vue local est un constructeur
ou
un `localVue` est un constructeur
docs/en/guides/using-with-vuex.md
Outdated
@@ -67,47 +67,47 @@ describe('Actions.vue', () => { | |||
}) | |||
}) | |||
|
|||
it('calls store action actionInput when input value is input and an input event is fired', () => { | |||
it('appelle une action du store (actionInput) quand la valeur de l\'input est input et qu\'un évènement input est lancé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.
On s'autorise le " en français dans le cas ou les « ' » sont utilisés dans la traduction
it("appelle l'action `actionInput` du store quand la valeur du champ est `input` et qu'un évènement `input` est lancé", () =>
docs/en/guides/using-with-vuex.md
Outdated
|
||
[Modules](https://vuex.vuejs.org/en/modules.html) are useful for separating out our store into manageable chunks. They also export getters. We can use these in our tests. | ||
[Modules](https://vuex.vuejs.org/en/modules.html) sont utiles pour séparer un store en plusieurs morceaux. Ils exportent des getters que l'on peut utiliser dans nos tests. |
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.
Les [modules]
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.
accesseurs
@@ -205,9 +205,9 @@ export default{ | |||
} | |||
</script> | |||
``` |
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.
Cliquer
docs/en/guides/using-with-vuex.md
Outdated
@@ -205,9 +205,9 @@ export default{ | |||
} | |||
</script> | |||
``` | |||
Simple component that includes one action and one getter. | |||
Simple composant qui possède une action et un getter. |
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 accesseur
docs/en/guides/using-with-vuex.md
Outdated
@@ -242,23 +242,23 @@ describe('Modules.vue', () => { | |||
}) | |||
}) | |||
|
|||
it('calls store action moduleActionClick when button is clicked', () => { | |||
it('appelle l\'action du store moduleActionClick quand le bouton est cliqué', () => { |
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.
it("appelle l'action `moduleActionClick` du store quand le bouton est cliqué", () => {
docs/en/guides/using-with-vuex.md
Outdated
const wrapper = shallow(Modules, { store, localVue }) | ||
const button = wrapper.find('button') | ||
button.trigger('click') | ||
expect(actions.moduleActionClick).toHaveBeenCalled() | ||
}) | ||
|
||
it('Renders state.inputValue in first p tag', () => { | ||
it('affiche state.inputValue dans le premier tag 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.
it('affiche `state.inputValue` dans la première balise `<p>`', () => {
Traduction du fichier using-with-vuex.md
Je n'ai fait qu'une seule relecture, ça risque d'être un peu brut et pas forcement trop agréable à lire. A voir :)
Ligne 40 : pas sûr du verbe à utiliser (j'ai laissé un TODO)