Commit 105c43d2 authored by Quentin David's avatar Quentin David
Browse files

Adding some localization

parent 97c598c5
...@@ -52,3 +52,4 @@ See [Configuration Reference](https://cli.vuejs.org/config/). ...@@ -52,3 +52,4 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
* Multiple page form: devrais-je utiliser Vuex? Stocker les paramètres dans la session ? * Multiple page form: devrais-je utiliser Vuex? Stocker les paramètres dans la session ?
Besoin de garder momentanément potentiellement un fichier lourd. Besoin de garder momentanément potentiellement un fichier lourd.
* Comment gérer le json des paramètres des modules et la traduction ? (import a file, cfshared locale msg in i18n)
...@@ -5198,6 +5198,11 @@ ...@@ -5198,6 +5198,11 @@
"locate-path": "^2.0.0" "locate-path": "^2.0.0"
} }
}, },
"flag-icon-css": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-2.9.0.tgz",
"integrity": "sha512-SeHvGEB43XFPZiJz6lFFRGHfp+Db+s1qGiClW70cZauQVbPM42wImlNUEuXSXs94kPchz7xvoxP0QK1y6FxLfg=="
},
"flat": { "flat": {
"version": "5.0.2", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
...@@ -10884,6 +10889,14 @@ ...@@ -10884,6 +10889,14 @@
} }
} }
}, },
"vue-flag-icon": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/vue-flag-icon/-/vue-flag-icon-1.0.6.tgz",
"integrity": "sha1-AwT9/uvZgqa/mFxjPDRv88bS+dc=",
"requires": {
"flag-icon-css": "^2.8.0"
}
},
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"core-js": "^3.6.5", "core-js": "^3.6.5",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-flag-icon": "^1.0.6",
"vue-i18n": "^8.17.3", "vue-i18n": "^8.17.3",
"vue-router": "^3.3.3", "vue-router": "^3.3.3",
"vuetify": "^2.2.11" "vuetify": "^2.2.11"
......
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
<v-container class="my-5"> <v-container class="my-5">
<v-card outlined class="px-6 mb-5"> <v-card outlined class="px-6 mb-5">
<v-card-title class="justify-center py-6"> <v-card-title class="justify-center py-6">
<h1 class="display-3">Choix des modules</h1> <h1 class="display-3"> {{ $t('module-choice') }} </h1>
</v-card-title> </v-card-title>
<DefinePipeline class="my-5" @add-module="updateChain" /> <DefinePipeline class="my-5" @add-module="updateChain" />
<ModuleChain class="my-5" @delete-module="deleteModuleFromChain" :added_modules="chain"/> <ModuleChain class="my-5"
v-if="chain.length > 0"
@delete-module="deleteModuleFromChain"
:added_modules="chain"/>
</v-card> </v-card>
<v-btn block color="success" to="/validation"> Lancer le traitement </v-btn> <v-btn block color="success" to="/validation"> {{ $t('treatment-validation') }} </v-btn>
</v-container> </v-container>
</template> </template>
...@@ -26,13 +29,22 @@ ...@@ -26,13 +29,22 @@
methods: { methods: {
updateChain: function(module) { updateChain: function(module) {
this.chain.push(module); this.chain.push(module);
console.log("CHain:");
console.log(this.chain);
}, },
deleteModuleFromChain: function(index) { deleteModuleFromChain: function(index) {
this.chain.splice(index, 1); this.chain.splice(index, 1);
console.log("Removed from list");
} }
} }
} }
</script> </script>
<i18n>
{
"fr":{
"module-choice":"Choix des modules",
"treatment-validation":"Lancer le traitement"
},
"en":{
"module-choice":"Choice of modules",
"treatment-validation":"Start treatment"
}
}
</i18n>
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<v-col cols="3"> <v-col cols="3">
<v-treeview <v-treeview
class="fixed24" class="fixed24"
:items="items" :items="items_annotation"
color="white" color="white"
activatable activatable
> >
...@@ -38,77 +38,44 @@ ...@@ -38,77 +38,44 @@
export default { export default {
data: () => ({ data: () => ({
selection: null, selection: null,
items: [ items_annotation: [
{ {
id: 1, id: 1,
name: 'Applications :', name: 'Entités nommées',
children: [ children: [
{ id: 2, name: 'Calendar : app' }, { id: 2, name: 'Nom'},
{ id: 3, name: 'Chrome : app' }, { id: 3, name: 'Lieu'},
{ id: 4, name: 'Webstorm : app' }, { id: 4, name: 'Date'}
]
}
], ],
}, items: [
{
id: 5,
name: 'Documents :',
children: [
{
id: 6,
name: 'vuetify :',
children: [
{ {
id: 7, id: 1,
name: 'src :', name: 'Documents source :',
children: [ children: [
{ id: 8, name: 'index : ts' }, { id: 2, name: 'Fichier1' },
{ id: 9, name: 'bootstrap : ts' }, { id: 3, name: 'Fichier2' },
], { id: 4, name: 'Fichier3' },
},
], ],
}, },
{ {
id: 10, id: 5,
name: 'material2 :', name: 'Néoveille :',
children: [ children: [
{ {
id: 11, id: 6,
name: 'src :', name: 'Résultats de Néoveille'
children: [ }
{ id: 12, name: 'v-btn : ts' },
{ id: 13, name: 'v-card : ts' },
{ id: 14, name: 'v-window : ts' },
],
},
],
},
], ],
}, },
{ {
id: 15, id: 15,
name: 'Downloads :', name: 'SDMC :',
children: [
{ id: 16, name: 'October : pdf' },
{ id: 17, name: 'November : pdf' },
{ id: 18, name: 'Tutorial : html' },
],
},
{
id: 19,
name: 'Videos :',
children: [
{
id: 20,
name: 'Tutorials :',
children: [ children: [
{ id: 21, name: 'Basic layouts : mp4' }, { id: 16, name: 'Résultats de SDMC' }
{ id: 22, name: 'Advanced techniques : mp4' },
{ id: 23, name: 'All about app : dir' },
], ],
}, }
{ id: 24, name: 'Intro : mov' },
{ id: 25, name: 'Conference introduction : avi' },
],
},
], ],
}), }),
} }
......
...@@ -40,9 +40,12 @@ ...@@ -40,9 +40,12 @@
:key="lang.locale" :key="lang.locale"
@click="changeLocale(lang.locale)" @click="changeLocale(lang.locale)"
> >
<v-list-item-title > <v-list-item-icon>
<flag :iso="lang.iso"/>
</v-list-item-icon>
<v-list-item-content >
{{ lang.language }} {{ lang.language }}
</v-list-item-title> </v-list-item-content>
</v-list-item> </v-list-item>
</v-list> </v-list>
</v-menu> </v-menu>
...@@ -86,8 +89,8 @@ module.exports = { ...@@ -86,8 +89,8 @@ module.exports = {
{ title: 'my-corpora', link: 'cart', icon: 'fa-copy' } { title: 'my-corpora', link: 'cart', icon: 'fa-copy' }
], ],
web_languages: [ web_languages: [
{ "language":"Français", "locale":"fr" }, { "language":"Français", "locale":"fr", "iso":"FR" },
{ "language": "English", "locale":"en"}, { "language": "English", "locale":"en", "iso":"GB"},
], ],
} }
}, },
......
...@@ -2,9 +2,11 @@ import Vue from 'vue' ...@@ -2,9 +2,11 @@ import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import vuetify from './plugins/vuetify'; import vuetify from './plugins/vuetify';
import router from './router'; import router from './router';
import i18n from './plugins/i18n' import i18n from './plugins/i18n';
import FlagIcon from 'vue-flag-icon';
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(FlagIcon);
new Vue({ new Vue({
vuetify, vuetify,
......
{
"name1": "SDMC",
"description: "Outil de fouille de motifs"
"parameters":
[
{
"label": "Type de motifs calculés",
"name": "motif_type",
"type": "List-Mono",
"items": ["Forme du mot seul", "Lemme du mot seul", "Catégorie syntaxique du mot seul",
"Catégorie syntaxique et lemme du mot"],
"default_value": "Lemme du mot seul"
},
{
"label": "Représentation condensée des motifs",
"name": "motif_representation",
"type": "List-Mono",
"items": ["Fermés (tous les motifs)", "Fermés (sans sous-motifs de même fréquence)",
"Maximaux (en ôtant les sous-motifs)"],
"default_value": "Fermés (tous les motifs)"
},
{
"label": "Gap",
"name": "gap",
"description": "Nombre d'items que l'extracteur peut ignorer entre deux items d'un motif extrait",
"type": "Int-2",
"items": ["Minimal", "Maximal"],
"default_value": ["0","10"],
},
{
"label": "Support minimal absolu",
"name": "minimal_absolute_support",
"description": "Nombre d'occurrence minimal d'un motif dans le corpus pour être extrait",
"type": "Int",
"default": ["100"]
},
{
"label": "Appartenance d'une ou plusieurs catégories",
"name": "categories",
"type": "List-Poly",
"items": ["Nom", "Verbe", "Adjectif", "Adverbe"],
}
]
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment