Skip to content

Commit

Permalink
I18n: French translation (#12153)
Browse files Browse the repository at this point in the history
* Docs: add french translation (fr-FR) in "components.json".

* Docs: add french translation (fr-FR) in "page.json"

* Docs: add french translation (fr-FR) in "route.json"

* Docs: add french translation (fr-FR) in "title.json"

* Docs: remove a comma in "title.json"

* Docs: translate alert.md into french (fr-FR)

* Docs: remove a comma in "component.json"

* Docs: translate badge.md into french (fr-FR)

* * a77b551 Docs: translate breadcrumb.md into french (fr-FR)

* * a77b551 Docs: translate breadcrumb.md into french (fr-FR)

* Docs: translate button.md into french (fr-FR)

* Docs: translate card.md into french (fr-FR)

* Docs: translate carousel.md into french (fr-FR)

* Docs: translate cascader.md into french (fr-FR)

* Docs: translate checkbox.md into french (fr-FR)

* Docs: translate collapse.md into french (fr-FR)

* Docs: translate color-picker.md into french (fr-FR)

* Docs: translate color.md into french (fr-FR)

* Docs: translate container.md into french (fr-FR)

* Docs: translate custom-theme.md into french (fr-FR)

* Docs: translate date-picker.md into french (fr-FR)

* Docs: translate datetime-picker.md into french (fr-FR)

* Docs: translate dialog.md into french (fr-FR)

* Docs: translate form.md into french (fr-FR)

* Docs: translate i18n.md into french (fr-FR)

* Docs: translate icon.md into french (fr-FR)

* Docs: translate input-number.md into french (fr-FR)

* Docs: translate input.md into french (fr-FR)

* Docs: translate installation.md into french (fr-FR)

* Docs: translate dropdown.md into french (fr-FR)

* Docs: translate layout.md into french (fr-FR)

* Docs: translate loading.md into french (fr-FR)

* Docs: translate menu.md into french (fr-FR)

* Docs: translate message-box.md into french (fr-FR)

* Docs: translate message.md into french (fr-FR)

* Docs: translate notification.md into french (fr-FR)

* Docs: translate pagination.md into french (fr-FR)

* Docs: translate popover.md into french (fr-FR)

* Docs: translate progress.md into french (fr-FR)

* Docs: translate quickstart.md into french (fr-FR)

* Docs: translate radio.md into french (fr-FR)

* Docs: translate rate.md into french (fr-FR)

* Docs: translate select.md into french (fr-FR)

* Docs: translate slider.md into french (fr-FR)

* Docs: translate steps.md into french (fr-FR)

* Docs: translate switch.md into french (fr-FR)

* Docs: translate table.md into french (fr-FR)

* Docs: translate tabs.md into french (fr-FR)

* Docs: translate tag.md into french (fr-FR)

* Docs: translate time-picker.md into french (fr-FR)

* Docs: translate tooltip.md into french (fr-FR)

* Docs: translate transfer.md into french (fr-FR)

* Docs: translate transition.md into french (fr-FR)

* Docs: translate tree.md into french (fr-FR)

* Docs: translate typography.md into french (fr-FR)

* Docs: translate upload.md into french (fr-FR)

* Docs: update the configuration for the french translation

* Docs: update the french documentation from 2.4.4 to 2.4.11

* Changelog: translate to line 408 into french (fr-FR)

* Changelog: finish the translation into french (fr-FR)

* Changelog: update from 2.4.11 to 2.5.4

* Doc: update french translation from 2.4.11 to 2.5.4

* Changelog: fix a display bug with the subtitles

* Examples: add french language (fr-FR) in search.vue component

* Doc: change some french titles

* Doc: add the french locale to app.vue
  • Loading branch information
IvanOdd authored and island205 committed Feb 12, 2019
1 parent f598d9b commit 958efae
Show file tree
Hide file tree
Showing 60 changed files with 19,473 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ examples/element-ui
examples/pages/en-US
examples/pages/zh-CN
examples/pages/es
examples/pages/fr-FR
fe.element/element-ui
.npmrc
coverage
Expand Down
873 changes: 873 additions & 0 deletions CHANGELOG.fr-FR.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions examples/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import zhLocale from 'main/locale/lang/zh-CN';
import enLocale from 'main/locale/lang/en';
import esLocale from 'main/locale/lang/es';
import frLocale from 'main/locale/lang/fr';
const lang = location.hash.replace('#', '').split('/')[1] || 'zh-CN';
const localize = lang => {
Expand All @@ -23,6 +24,9 @@
case 'es':
use(esLocale);
break;
case 'fr-FR':
use(frLocale);
break;
default:
use(enLocale);
}
Expand Down
3 changes: 2 additions & 1 deletion examples/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@
langs: {
'zh-CN': '中文',
'en-US': 'English',
'es': 'Español'
'es': 'Español',
'fr-FR': 'Français'
}
};
},
Expand Down
25 changes: 15 additions & 10 deletions examples/components/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<style>
.algolia-search {
width: 450px !important;
&.is-empty {
.el-autocomplete-suggestion__list {
padding-bottom: 0;
Expand All @@ -51,27 +51,27 @@
li {
border-bottom: solid 1px #ebebeb;
&:last-child {
border-bottom: none;
}
}
.algolia-highlight {
color: #409EFF;
font-weight: bold;
}
.algolia-search-title {
font-size: 14px;
margin: 6px 0;
line-height: 1.8;
}
.algolia-search-separator {
padding: 0 6px;
}
.algolia-search-content {
font-size: 12px;
margin: 6px 0;
Expand All @@ -80,7 +80,7 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.algolia-search-link {
position: absolute;
bottom: 0;
Expand All @@ -96,14 +96,14 @@
&:hover {
background-color: #e4e7ed;
}
img {
display: inline-block;
height: 17px;
margin-top: 10px;
}
}
.algolia-search-empty {
margin: 5px 0;
text-align: center;
Expand Down Expand Up @@ -136,6 +136,11 @@
search: 'Buscar',
empty: 'No hay datos que coincidan',
index: 'es'
},
'fr-FR': {
search: 'Rechercher',
empty: 'Aucun résultat',
index: 'fr'
}
}
};
Expand Down Expand Up @@ -213,4 +218,4 @@
this.initIndex();
}
};
</script>
</script>
228 changes: 228 additions & 0 deletions examples/docs/fr-FR/alert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
<script>
export default {
methods: {
hello() {
alert('Hello World!');
}
}
}
</script>
<style>
.demo-box.demo-alert .el-alert {
margin: 20px 0 0;
}

.demo-box.demo-alert .el-alert:first-child {
margin: 0;
}
</style>

## Alerte

Affiche des messages importants.

### Usage

Les Alertes sont des composants non-superposés qui ne disparaissent pas automatiquement.

:::demo Les Alertes peuvent être de 4 types différents, définit par `type`, le type par défaut étant `info`.

```html
<template>
<el-alert
title="succès"
type="success">
</el-alert>
<el-alert
title="information"
type="info">
</el-alert>
<el-alert
title="avertissement"
type="warning">
</el-alert>
<el-alert
title="erreur"
type="error">
</el-alert>
</template>
```
:::

### Bouton personnalisable

Personnalisez le bouton de fermeture avec du texte ou des symboles.

:::demo Les alertes peuvent être configurées pour être fermables ou non. Le bouton de fermeture et les callbacks sont aussi personnalisables. L'attribut `closable` détermine si le composant peut être fermé ou non. Il accepte un `boolean`, la valeur par défaut étant `true`. Vous pouvez configurer l'attribut `close-text`pour remplacer la croix du bouton de fermeture. Assurez-vous que `close-text` soit une chaîne de caractères. L'évènement `close` se déclenche quand le composant est fermé.

```html
<template>
<el-alert
title="alerte non-fermable"
type="success"
:closable="false">
</el-alert>
<el-alert
title="texte de fermeture personnalisé"
type="info"
close-text="Gotcha">
</el-alert>
<el-alert
title="alerte avec callback"
type="warning"
@close="hello">
</el-alert>
</template>

<script>
export default {
methods: {
hello() {
alert('Hello World!');
}
}
}
</script>
```
:::

### Avec icône

Afficher une icône améliore la lisibilité.

:::demo Ajouter l'attribut `show-icon` affiche une icône correspondant au type de l'alerte.

```html
<template>
<el-alert
title="succès"
type="success"
show-icon>
</el-alert>
<el-alert
title="information"
type="info"
show-icon>
</el-alert>
<el-alert
title="avertissement"
type="warning"
show-icon>
</el-alert>
<el-alert
title="erreur"
type="error"
show-icon>
</el-alert>
</template>
```
:::

## Texte centré

Utilisez l'attribut `center` pour centrer le texte.

:::demo

```html
<template>
<el-alert
title="succès"
type="success"
center
show-icon>
</el-alert>
<el-alert
title="information"
type="info"
center
show-icon>
</el-alert>
<el-alert
title="avertissement"
type="warning"
center
show-icon>
</el-alert>
<el-alert
title="erreur"
type="error"
center
show-icon>
</el-alert>
</template>
```
:::

### Description

Contient un message avec plus d'informations.

:::demo A coté de l'attribut `title`, vous pouvez ajouter `description` pour décrire l'alerte avec plus de précisions. Les descriptions ne peuvent contenir que du texte, et les retours à la ligne sont automatiques.

```html
<template>
<el-alert
title="avec description"
type="success"
description="Ceci est la description.">
</el-alert>
</template>
```
:::

### Icône et description

:::demo Pour finir, voici un exemple utilisant à la fois l'icône et la description.

```html
<template>
<el-alert
title="succès"
type="success"
description="Plus de texte pour décrire."
show-icon>
</el-alert>
<el-alert
title="information"
type="info"
description="Plus de texte pour décrire."
show-icon>
</el-alert>
<el-alert
title="avertissement"
type="warning"
description="Plus de texte pour décrire."
show-icon>
</el-alert>
<el-alert
title="erreur"
type="error"
description="Plus de texte pour décrire."
show-icon>
</el-alert>
</template>
```
:::

### Attributs
| Attribut | Description | Type | Valeurs acceptées | Défaut |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| title | Titre. | string |||
| type | Type du composant. | string | success/warning/info/error | info |
| description | Texte de description. Peut aussi être passé via le slot par défaut | string |||
| closable | Si peut être fermé ou non. | boolean || true |
| center | Si le texte doit être centré ou non. | boolean || false |
| close-text | Texte personnalisé pour le bouton de fermeture. | string |||
| show-icon | Si une icône s'affiche ou non. | boolean || false |

### Slot

| Nom | Description |
|------|--------|
| title | Le contenu du titre. |

### Évènements
| Nom | Description | Paramètres |
|---------- |-------- |---------- |
| close | Se déclenche lorsque l'alerte est fermée. ||
Loading

0 comments on commit 958efae

Please sign in to comment.