Skip to content

Commit 8e9ac94

Browse files
MachinisteWebposva
authored andcommitted
🇫🇷 [Translation WIP] Official French Translation from Vuejs-FR (#1520)
* First fr translation part. Signed-off-by: Bruno Lesieur <[email protected]> * paquet -> paquetage Signed-off-by: Bruno Lesieur <[email protected]> * Update `lazy-loading.md` Signed-off-by: Bruno Lesieur <[email protected]> * Traduction de : - essentials/history-mode.md - essentials/named-routes.md - essentials/named-views.md - essentials/navigation.md - essentials/nested-routes.md - essentials/redirect-and-alias.md + update of some file from EN version Signed-off-by: Bruno Lesieur <[email protected]> * Declarative to Déclarative Signed-off-by: Bruno Lesieur <[email protected]>
1 parent 6f93fc9 commit 8e9ac94

10 files changed

+145
-95
lines changed

Diff for: docs/fr/SUMMARY.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,34 @@
88
- Essentiel
99
- [Pour commencer](essentials/getting-started.md)
1010
- [Dynamic Route Matching (En)](essentials/dynamic-matching.md)
11-
- [Nested Routes (En)](essentials/nested-routes.md)
12-
- [Programmatic Navigation (En)](essentials/navigation.md)
13-
- [Named Routes (En)](essentials/named-routes.md)
14-
- [Named Views (En)](essentials/named-views.md)
15-
- [Redirect and Alias (En)](essentials/redirect-and-alias.md)
11+
- [Navigation programmatique](essentials/navigation.md)
12+
- [Routes imbriquées](essentials/nested-routes.md)
13+
- [Routes nommées](essentials/named-routes.md)
14+
- [Vues nommées](essentials/named-views.md)
15+
- [Redirection et alias](essentials/redirect-and-alias.md)
1616
- [Passing Props to Route Components (En)](essentials/passing-props.md)
1717
- [HTML5 History Mode (En)](essentials/history-mode.md)
1818
- Avancé
1919
- [Navigation Guards (En)](advanced/navigation-guards.md)
2020
- [Route Meta Fields (En)](advanced/meta.md)
2121
- [Transitions (En)](advanced/transitions.md)
2222
- [La récupération de données](advanced/data-fetching.md)
23-
- [Les transitions](advanced/transitions.md)
2423
- [Comportement du défilement](advanced/scroll-behavior.md)
2524
- [Le chargement à la volée](advanced/lazy-loading.md)
2625
- Réference de l'API
26+
- [Options de construction du routeur](api/options.md)
27+
- [routes](api/options.md#routes)
28+
- [mode](api/options.md#mode)
29+
- [base](api/options.md#base)
30+
- [linkActiveClass](api/options.md#linkactiveclass)
31+
- [linkExactActiveClass](api/options.md#linkexactactiveclass)
32+
- [scrollBehavior](api/options.md#scrollbehavior)
33+
- [parseQuery / stringifyQuery](api/options.md#parsequery--stringifyquery)
34+
- [fallback](api/options.md#fallback)
35+
- [L'instance du routeur](api/router-instance.md)
36+
- [Propriétés](api/router-instance.md#propriétés)
37+
- [Méthodes](api/router-instance.md#méthodes)
38+
- [L'objet Route](api/route-object.md)
39+
- [Injections de composant](api/component-injections.md)
2740
- [router-link](api/router-link.md)
2841
- [router-view](api/router-view.md)
29-
- [L'objet Route](api/route-object.md)
30-
- [Options de construction du routeur](api/options.md)
31-
- [L'Instance du routeur](api/router-instance.md)
32-
- [Injections de composant](api/component-injections.md)

Diff for: docs/fr/advanced/scroll-behavior.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ La fonction `scrollBehavior` reçoit les objets de route `to` et `from`. Le troi
2020
La fonction peut retourner un objet décrivant la position du défilement. L'objet peut être de la forme :
2121

2222
- `{ x: number, y: number }`
23-
- `{ selector: String }`
23+
- `{ selector: string, offset? : { x: number, y: number }}` (offset seulement supporté pour les versions 2.6.0+)
2424

2525
Si une valeur équivalente à `false` ou un objet vide est retourné, aucun défilement ne sera produit.
2626

27-
Par exemple :
27+
Par exemple :
2828

2929
``` js
3030
scrollBehavior (to, from, savedPosition) {
@@ -53,6 +53,7 @@ scrollBehavior (to, from, savedPosition) {
5353
if (to.hash) {
5454
return {
5555
selector: to.hash
56+
// , offset: { x: 0, y: 10 }
5657
}
5758
}
5859
}

Diff for: docs/fr/api/options.md

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
children?: Array<RouteConfig>; // pour les routes imbriquées
1919
beforeEnter?: (to: Route, from: Route, next: Function) => void;
2020
meta?: any;
21+
22+
// 2.6.0+
23+
caseSensitive?: boolean; // use case sensitive match? (default: false)
24+
pathToRegexpOptions?: Object; // path-to-regexp options for compiling regex
2125
}
2226
```
2327

@@ -86,3 +90,13 @@
8690
- type : `Function`
8791

8892
Permet de spécifier des fonctions personnalisées pour formater en objet ou en chaîne de caractères la requête. Surcharge les fonctions par défaut.
93+
94+
### fallback
95+
96+
> 2.6.0+
97+
98+
- type : `boolean`
99+
100+
Contrôle comment le routeur devrait passer en mode `hash` quand le navigateur ne supporte pas `history.pushState`. Par défaut à `true`.
101+
102+
Passer cette valeur à `false` va essentiellement faire que la navigation via `router-link` va réclamer un rechargement de page dans IE9. Ceci est utile quand l'application est rendu côté serveur et à besoin de fonctionner dans IE9, car le mode hash ne fonctionne pas avec du SSR.

Diff for: docs/fr/api/router-instance.md

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
}
5757
```
5858

59+
- `current` is the current Route by default (most of the time you don't need to change this)
60+
- `append` allows you to append the path to the `current` route (as with [`router-link`](https://router.vuejs.org/en/api/router-link.html#props))
5961

6062
- **router.addRoutes(routes)**
6163

Diff for: docs/fr/essentials/history-mode.md

+28
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,34 @@ location / {
4444

4545
For Node.js/Express, consider using [connect-history-api-fallback middleware](https://github.com/bripkens/connect-history-api-fallback).
4646

47+
#### Internet Information Services (IIS)
48+
```
49+
<?xml version="1.0" encoding="UTF-8"?>
50+
<configuration>
51+
<system.webServer>
52+
<rewrite>
53+
<rules>
54+
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
55+
<match url="(.*)" />
56+
<conditions logicalGrouping="MatchAll">
57+
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
58+
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
59+
</conditions>
60+
<action type="Rewrite" url="index.html" />
61+
</rule>
62+
</rules>
63+
</rewrite>
64+
<httpErrors>
65+
<remove statusCode="404" subStatusCode="-1" />
66+
<remove statusCode="500" subStatusCode="-1" />
67+
<error statusCode="404" path="/survey/notfound" responseMode="ExecuteURL" />
68+
<error statusCode="500" path="/survey/error" responseMode="ExecuteURL" />
69+
</httpErrors>
70+
<modules runAllManagedModulesForAllRequests="true"/>
71+
</system.webServer>
72+
</configuration>
73+
```
74+
4775
## Caveat
4876

4977
There is a caveat to this: Your server will no longer report 404 errors as all not-found paths now serve up your `index.html` file. To get around the issue, you should implement a catch-all route within your Vue app to show a 404 page:

Diff for: docs/fr/essentials/named-routes.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
# Named Routes (En) <br><br> *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/vue-router).*
1+
# Routes nommées
22

3-
Sometimes it is more convenient to identify a route with a name, especially when linking to a route or performing navigations. You can give a route a name in the `routes` options while creating the Router instance:
3+
Parfois il est plus pratique d'identifer une route avec un nom, tout particulièrement quand on souhaite attacher cette route ou exécuter des actions de navigation. Vous pouvez donner un nom à une route dans les options `routes` pendant la création de l'instance du routeur :
44

55
``` js
66
const router = new VueRouter({
77
routes: [
88
{
9-
path: '/user/:userId',
9+
path: '/utilisateur/:userId',
1010
name: 'user',
1111
component: User
1212
}
1313
]
1414
})
1515
```
1616

17-
To link to a named route, you can pass an object to the `router-link`
18-
component's `to` prop:
17+
Pour attacher une route nommée, vous pouvez passer un objet à la prop `to` du composant `router-link` :
1918

2019
``` html
21-
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
20+
<router-link :to="{ name: 'user', params: { userId: 123 }}">Utilisateur</router-link>
2221
```
2322

24-
This is the exact same object used programatically with `router.push()`:
23+
C'est exactement le même objet à utiliser programmatiquement avec `router.push()` :
2524

2625
``` js
2726
router.push({ name: 'user', params: { userId: 123 }})
2827
```
2928

30-
In both cases, the router will navigate to the path `/user/123`.
29+
Dans les deux cas, le routeur va naviguer vers le chemin `/utilisateur/123`.
3130

32-
Full example [here](https://github.com/vuejs/vue-router/blob/dev/examples/named-routes/app.js).
31+
Un exemple complet se trouve [ici](https://github.com/vuejs/vue-router/blob/dev/examples/named-routes/app.js).

Diff for: docs/fr/essentials/named-views.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Named Views (En) <br><br> *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/vue-router).*
1+
# Vues nommées
22

3-
Sometimes you need to display multiple views at the same time instead of nesting them, e.g. creating a layout with a `sidebar` view and a `main` view. This is where named views came in handy. Instead of having one single outlet in your view, you can have multiple and give each of them a name. A `router-view` without a name will be given `default` as its name.
3+
Parfois vous avez besoin d'afficher différentes vues en même temps plutôt que de les imbriquer, c.-à-d. créer un affichage avec une vue `sidebar` et une vue `main` par exemple. C'est ici que les routes nommées entre en jeu. Au lieu d'avoir une seule balise de vue, vous pouvez en avoir une multitude et donner à chacune d'entre elle un nom. Un `router-view` sans nom aura comme nom par défaut : `default`.
44

55
``` html
66
<router-view class="view one"></router-view>
77
<router-view class="view two" name="a"></router-view>
88
<router-view class="view three" name="b"></router-view>
99
```
1010

11-
A view is rendered by using a component, therefore multiple views require multiple components for the same route. Make sure to use the `components` (with
12-
an s) option:
11+
Une vue est rendue en utilisant un composant, donc de multiples vues nécessites de multiples composants pour une même route. Assurez-vous d'utiliser l'option `components` (avec un s) :
1312

1413
``` js
1514
const router = new VueRouter({
@@ -26,5 +25,4 @@ const router = new VueRouter({
2625
})
2726
```
2827

29-
A working demo of this example can be found
30-
[here](https://jsfiddle.net/posva/6du90epg/).
28+
Une démo de cet exemple peut-être trouvée ici : [ici](https://jsfiddle.net/posva/6du90epg/).

Diff for: docs/fr/essentials/navigation.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
# Programmatic Navigation (En) <br><br> *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/vue-router).*
1+
# Navigation programmatique
22

3-
Aside from using `<router-link>` to create anchor tags for declarative navigation, we can do this programmatically using the router's instance methods.
3+
En complément du l'utilisation de `<router-link>` pour créer des balises ancres pour la navigation déclarative, nous pouvons le faire de manière programmatique en utilisant les méthodes de l'instance du routeur.
44

55
#### `router.push(location, onComplete?, onAbort?)`
66

7-
**Note: Inside of a Vue instance, you have access to the router instance as `$router`. You can therefore call `this.$router.push`.**
7+
** Note : Dans une instance Vue, vous pouvez accéder à l'instance du routeur via `$router`. Vous pouvez donc appeler `this.$router.push`.**
88

9-
To navigate to a different URL, use `router.push`. This method pushes a new entry into the history stack, so when the user clicks the browser back button they will be taken to the previous URL.
9+
Pour naviguer vers une URL différente, utilisez `router.push`. Cette méthode ajoute une nouvelle entrée dans la pile de l'historique. Ainsi quand un utilisateur clique sur le bouton retour de son navigateur, il retournera à l'URL précédente.
1010

11-
This is the method called internally when you click a `<router-link>`, so clicking `<router-link :to="...">` is the equivalent of calling `router.push(...)`.
11+
Cette méthode est appelée en interne quand vous cliquez sur `<router-link>`, donc cliquer sur `<router-link :to="...">` est équivalent à appeler `router.push(...)`.
1212

13-
| Declarative | Programmatic |
13+
| Déclarative | Programmatique |
1414
|-------------|--------------|
1515
| `<router-link :to="...">` | `router.push(...)` |
1616

17-
The argument can be a string path, or a location descriptor object. Examples:
17+
L'argument peut être une chaîne de caractère représentant un chemin, ou un objet de description de destination. Des exemples :
1818

1919
``` js
20-
// literal string path
20+
// chaîne de caractère représentant un chemin
2121
router.push('home')
2222

23-
// object
23+
// objet
2424
router.push({ path: 'home' })
2525

26-
// named route
26+
// route nommée
2727
router.push({ name: 'user', params: { userId: 123 }})
2828

29-
// with query, resulting in /register?plan=private
29+
// avec une requête « query » résultant de `/register?plan=private`
3030
router.push({ path: 'register', query: { plan: 'private' }})
3131
```
3232

33-
In 2.2.0+, optionally provide `onComplete` and `onAbort` callbacks to `router.push` or `router.replace` as the 2nd and 3rd arguments. These callbacks will be called when the navigation either successfully completed (after all async hooks are resolved), or aborted (navigated to the same route, or to a different route before current navigation has finished), respectively.
33+
Dans la version 2.2.0+, vous pouvez optionnellement fournir les fonctions de rappel `onComplete` et `onAbort` à `router.push` ou `router.replace` en tant que deuxième et troisième arguments. Ces fonctions de rappel seront appelées quand la navigation sera respectivement ; complétée avec succès (après la résolution de tous les hooks asynchrones), ou arrêtée (navigation vers la même route ou vers une route différente avant que la navigation courante ne soit achevée).
3434

3535
#### `router.replace(location, onComplete?, onAbort?)`
3636

37-
It acts like `router.push`, the only difference is that it navigates without pushing a new history entry, as its name suggests - it replaces the current entry.
37+
Il agit comme `router.push`. La seule différence est que la navigation se fait sans ajouter de nouvelle entrée dans la pile de l'historique. Comme son nom l'indique, il remplace l'entrée courante.
3838

39-
| Declarative | Programmatic |
39+
| Déclarative | Programmatique |
4040
|-------------|--------------|
4141
| `<router-link :to="..." replace>` | `router.replace(...)` |
4242

4343

4444
#### `router.go(n)`
4545

46-
This method takes a single integer as parameter that indicates by how many steps to go forwards or go backwards in the history stack, similar to `window.history.go(n)`.
46+
Cette méthode prend un seul nombre en tant que paramètre. Celui-ci indique de combien d'entrée vers l'avant ou vers l'arrière il faut naviguer dans la pile de l'historique, de la même manière qu'avec `window.history.go(n)`.
4747

48-
Examples
48+
Des exemples
4949

5050
``` js
51-
// go forward by one record, the same as history.forward()
51+
// avancer d'une entrée, identique à `history.forward()`
5252
router.go(1)
5353

54-
// go back by one record, the same as history.back()
54+
// retourner d'une entrée en arrière, identique à `history.back()`
5555
router.go(-1)
5656

57-
// go forward by 3 records
57+
// avancer de trois entrées
5858
router.go(3)
5959

60-
// fails silently if there aren't that many records.
60+
// échoue silencieusement s'il n'y a pas assez d'entrées.
6161
router.go(-100)
6262
router.go(100)
6363
```
6464

65-
#### History Manipulation
65+
#### Manipulation de l'historique
6666

67-
You may have noticed that `router.push`, `router.replace` and `router.go` are counterparts of [`window.history.pushState`, `window.history.replaceState` and `window.history.go`](https://developer.mozilla.org/en-US/docs/Web/API/History), and they do imitate the `window.history` APIs.
67+
Vous avez peut être remarqué que `router.push`, `router.replace` et `router.go` sont des équivalent de [`window.history.pushState`, `window.history.replaceState` et `window.history.go`](https://developer.mozilla.org/fr-FR/docs/Web/API/History), et qu'ils imitent les APIs de `window.history`.
6868

69-
Therefore, if you are already familiar with [Browser History APIs](https://developer.mozilla.org/en-US/docs/Web/API/History_API), manipulating history will be super easy with vue-router.
69+
Donc, si vous utilisez déjà l'[API History des navigateurs](https://developer.mozilla.org/fr-FR/docs/Web/API/History_API), manipuler l'historique sera très simple avec vue-router.
7070

71-
It is worth mentioning that vue-router navigation methods (`push`, `replace`, `go`) work consistently in all router modes (`history`, `hash` and `abstract`).
71+
Il n'est pas nécessaire de préciser que les méthodes de navigation (`push`, `replace`, `go`) fonctionnent de la même manière dans tous les modes de routage (`history`, `hash` and `abstract`).

0 commit comments

Comments
 (0)