Skip to content

Commit

Permalink
feat(ui): fr locale + related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Mar 15, 2018
1 parent 969e326 commit 1441c02
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 36 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prod-graphql-api": "cross-env NODE_ENV=production vue-cli-service run-graphql-api"
},
"dependencies": {
"@vue/ui": "^0.2.0",
"@vue/ui": "^0.2.1",
"ansi_up": "^2.0.2",
"apollo-cache-inmemory": "^1.1.10",
"apollo-client": "^2.2.6",
Expand Down
9 changes: 8 additions & 1 deletion packages/@vue/cli-ui/src/components/InstantSearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
icon-left="search"
v-model="query"
class="big"
:placeholder="$t('components.instant-search-input.placeholder')"
:placeholder="placeholder"
>
<template slot="right">
<VueButton
Expand All @@ -26,6 +26,13 @@ export default {
Component
],
props: {
placeholder: {
type: String,
default: null
}
},
computed: {
query: {
get() {
Expand Down
5 changes: 5 additions & 0 deletions packages/@vue/cli-ui/src/components/PromptsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
:prompt="prompt"
@answer="value => $emit('answer', { prompt, value })"
/>

<div v-if="!prompts.length" class="vue-ui-empty">
<VueIcon icon="check_circle" class="empty-icon"/>
<span>{{ $t('components.prompts-list.empty') }}</span>
</div>
</div>
</div>
</template>
Expand Down
12 changes: 8 additions & 4 deletions packages/@vue/cli-ui/src/graphql-api/connectors/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,15 @@ function runInvoke (id, context) {

async function initPrompts (id, context) {
prompts.reset()
let data = require(path.join(getPath(id), 'prompts.js'))
if (typeof data === 'function') {
data = await data()
try {
let data = require(path.join(getPath(id), 'prompts.js'))
if (typeof data === 'function') {
data = await data()
}
data.forEach(prompts.add)
} catch (e) {
console.warn(`No prompts found for ${id}`)
}
data.forEach(prompts.add)
prompts.start()
}

Expand Down
19 changes: 10 additions & 9 deletions packages/@vue/cli-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"empty": "No favorite folders yet."
}
},
"instant-search-input": {
"placeholder": "Search a plugin"
},
"list-item-info": {
"more-info": "More Info"
},
Expand Down Expand Up @@ -53,6 +50,9 @@
"official": "Official",
"installed": "Installed"
},
"prompts-list": {
"empty": "No configuration"
},
"status-bar": {
"project": {
"tooltip": "Current project<br><i>Click to toggle Project Manager</i>",
Expand All @@ -77,9 +77,9 @@
"completion-hooks": "Running completion hooks...",
"fetch-remote-preset": "Fetching remote preset...",
"done": "Successfully created project",
"plugin-install": "Installing {arg0}",
"plugin-uninstall": "Uninstalling {arg0}",
"plugin-invoke": "Invoking {arg0}"
"plugin-install": "Installing {arg0}...",
"plugin-uninstall": "Uninstalling {arg0}...",
"plugin-invoke": "Invoking {arg0}..."
}
},
"views": {
Expand Down Expand Up @@ -108,7 +108,7 @@
"action": "Select this folder"
},
"manager": {
"label": "Project manager",
"label": "Package manager",
"default": "Default"
},
"options": {
Expand Down Expand Up @@ -145,7 +145,7 @@
},
"features": {
"title": "Features",
"description": "You will be able to add features after the project is created.",
"description": "You will be able to add features after the project is created by installing plugins.",
"enable": "Enable features",
"buttons": {
"previous": "Previous",
Expand Down Expand Up @@ -185,7 +185,8 @@
"tabs": {
"search": {
"label": "Search",
"not-found": "Not results found",
"search-input": "Search a plugin",
"not-found": "No results found",
"buttons": {
"cancel": "Cancel",
"install": "Install {target}"
Expand Down
221 changes: 221 additions & 0 deletions packages/@vue/cli-ui/src/locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
{
"components": {
"folder-explorer": {
"toolbar": {
"tooltips": {
"parent-folder": "Ouvrir le dossier parent",
"edit-path": "Modifier le chemin",
"favorite": "Ajouter/Retirer des favoris",
"favorite-folders": "Dossiers favoris",
"refresh": "Rafraichir"
},
"placeholder": "Entrer le chemin complet d'un dossier",
"empty": "Aucun dossier favoris."
}
},
"list-item-info": {
"more-info": "Plus d'infos"
},
"logger-view": {
"title": "Journal",
"empty": "Aucune entrée du journal",
"buttons": {
"clear": "Nettoyer le journal",
"scroll": "Défiler en bas",
"close": "Fermer"
}
},
"progress-screen": {
"close": "Fermer"
},
"project-nav": {
"tooltips": {
"plugins": "Plugins",
"configuration": "Configuration",
"tasks": "Tâches"
}
},
"project-select-list": {
"empty": "Aucun projet"
},
"project-select-list-item": {
"tooltips": {
"favorite": "Ajouter/Retirer des favoris",
"delete": "Supprimer"
}
},
"project-plugin-item": {
"version": "version",
"latest": "dernière version",
"official": "Officiel",
"installed": "Installé"
},
"prompts-list": {
"empty": "Pas de configuration"
},
"status-bar": {
"project": {
"tooltip": "Project actuel<br><i>Cliquer pour afficher le Gestionnaire de Projets</i>",
"empty": "Aucun projet ouvert"
},
"path": {
"tooltip": "Dossier de travail actuel"
},
"log": {
"tooltip": "Journal<br><i>Cliquer pour Afficher/Masquer le Journal Vue CLI</i>",
"empty": "Aucun entrée dans le journal"
}
}
},
"mixins": {
"progress": {
"creating": "Création du projet...",
"git-init": "Initialisation du dépôt git...",
"plugins-install": "Installation des plugins Vue CLI. Ceci peut prendre un certain temps...",
"invoking-generators": "Invocation des générateurs...",
"deps-install": "Installation des dépendances additionnelles...",
"completion-hooks": "Lancement des hooks de fin...",
"fetch-remote-preset": "Téléchargement du preset distant...",
"done": "Projet créé avec succès",
"plugin-install": "Installation de {arg0}...",
"plugin-uninstall": "Désinstallation de {arg0}...",
"plugin-invoke": "Invocation de {arg0}..."
}
},
"views": {
"project-select": {
"title": "Gestion des Projets Vue",
"tabs": {
"projects": "Projets",
"create": "Créer",
"import": "Importer"
},
"buttons": {
"create": "Créer un nouveau projet ici",
"import": "Importer ce dossier"
}
},
"project-create": {
"title": "Créer un nouveau projet",
"tabs": {
"details": {
"title": "Détails",
"form": {
"folder": {
"label": "Dossier du projet",
"placeholder": "mon-app",
"tooltip": "Modifier le dossier cible",
"action": "Sélectionner ce dossier"
},
"manager": {
"label": "Gestionnaire de paquets",
"default": "Par défaut"
},
"options": {
"label": "Options additionnelles",
"description": "Ecraser le dossier s'il existe"
}
},
"buttons": {
"cancel": "Annuler",
"next": "Suivant"
},
"modal": {
"title": "Annuler et réintialiser la création de projet",
"body": "Êtes-vous sûr de vouloir réinitialiser la création de projet?",
"buttons": {
"back": "Revenir en arrière",
"clear": "Supprimer le projet"
}
}
},
"presets": {
"title": "Presets",
"description": "Un preset est un ensemble de plugins et de configurations prédéfins. Après avoir sélectionné des fonctionnalités, vous pouves sauvegarder la sélection actuelle dans un nouveau preset que vous pourrez réutiliser pour de futurs projets, sans avoir à tout reconfigurer à nouveau.",
"select": "Sélectionner un preset",
"buttons": {
"previous": "Précédent",
"next": "Suivant",
"create": "Créer le projet"
},
"modal": {
"title": "Configurer le preset distant",
"body": "Bientôt disponible..."
}
},
"features": {
"title": "Fonctionnalités",
"description": "Vous pourrez ajouter des fonctionnalités après la création du projet en installant des plugins.",
"enable": "Activer des fonctionnalités",
"buttons": {
"previous": "Précédent",
"next": "Suivant",
"create": "Créer le projet"
}
},
"configuration": {
"title": "Configuration",
"buttons": {
"previous": "Précédent",
"create": "Créer le projet"
},
"modal": {
"title": "Sauvegarder dans un nouveau preset",
"body": {
"title": "Nom du preset",
"subtitle": "Sauvegarder les fonctionnalités et configurations dans un nouveau preset"
},
"buttons": {
"cancel": "Annuler",
"continue": "Continuer sans sauvegarder",
"create": "Créer un nouveau preset"
}
}
}
}
},
"project-plugins": {
"title": "Plugins du projet",
"button": "Ajouter un plugin",
"heading": "Plugins installés"
},
"project-plugins-add": {
"title": "Ajouter un plugin",
"plugin": "un plugin",
"tabs": {
"search": {
"label": "Recherche",
"search-input": "Rechercher un plugin",
"not-found": "Aucun résultat trouvé",
"buttons": {
"cancel": "Annuler",
"install": "Installer {target}"
}
},
"configuration": {
"label": "Configuration",
"heading": "Installation de {target}",
"buttons": {
"cancel": "Annuler",
"finish": "Terminer l'installation"
}
}
},
"modal": {
"title": "Désinstaller {target}?",
"body": "Voulez-vous désinstaller le plugin {target}?",
"buttons": {
"back": "Revenir en arrière",
"cancel": "Annuler sans désinstaller",
"uninstall": "Désinstaller"
}
}
},
"project-configuration": {
"title": "Configuration du projet"
},
"project-tasks": {
"title": "Tâches du projet"
}
}
}
Loading

0 comments on commit 1441c02

Please sign in to comment.