traductionMenu

This commit is contained in:
Pauline MAROT 2021-12-16 22:09:01 +01:00
parent 6bf076b382
commit 14c8aa257f
Signed by untrusted user: linepau
GPG key ID: 0F0ED996BFD1E3D9
12 changed files with 117 additions and 88 deletions

1
kujiu_test Submodule

@ -0,0 +1 @@
Subproject commit b59e3b608247e8a9cb4f09e81f8a6d878127a241

View file

@ -1,18 +1,10 @@
<script setup> <script setup>
import ReloadPWA from './components/ReloadPWA.vue'; import ReloadPWA from './components/ReloadPWA.vue';
import {useI18n} from 'vue-i18n'; import {useI18n} from 'vue-i18n';
import NavMessage from './components/message/NavMessage.vue';
const {t} = useI18n({useScope: 'local'}); const {t} = useI18n({useScope: 'local'});
</script> </script>
<script>
export default{
components: {NavMessage}
}
</script>
<template> <template>
<div id="appflex"> <div id="appflex">
<div id="page"> <div id="page">
@ -28,8 +20,26 @@ export default{
<router-view name="Sidebar"></router-view> <router-view name="Sidebar"></router-view>
<div id="menu"> <div id="menu">
<NavMessage/> <details>
<router-view name="navMessage"></router-view> <summary>
<span>👤 {{ t('menu.contact') }}</span>
</summary>
<ul>
<li><router-link to="/profil">📝 {{ t('menu.profile') }}</router-link></li>
<li><router-link to="">🗒 {{ t('menu.contacts list') }}</router-link></li>
</ul>
</details>
<details>
<summary>
<span>💬 {{ t('menu.messages') }}</span>
</summary>
<ul>
<li><router-link to="/correspondance">📭 {{ t('menu.correspondence') }}</router-link></li>
<li><router-link to="/chat">💬 {{ t('menu.chat') }}</router-link></li>
<li><router-link to="">🎥 {{ t('menu.video conferencing') }}</router-link></li>
</ul>
</details>
</div> </div>
</div> </div>
</div> </div>
@ -42,12 +52,12 @@ export default{
<div class="nav-menu"> <div class="nav-menu">
<details> <details>
<summary> <summary>
<span class="connect">👥 Connexion</span> <span class="connect">👥 {{ t('home.connection') }}</span>
</summary> </summary>
<ul> <ul>
<li class="nav-connect"><a href="#">Compte</a></li> <li><router-link to="/">{{ t('home.account') }}</router-link></li>
<li class="nav-connect"><a href="#">Tableau de bord</a></li> <li><router-link to="/">{{ t('home.dashboard') }}</router-link></li>
<li class="nav-connect"><a href="#">Déconnexion</a></li> <li><router-link to="/">{{ t('home.disconnect') }}</router-link></li>
</ul> </ul>
</details> </details>
</div> </div>

View file

@ -27,6 +27,14 @@
font-size: 1.1rem; font-size: 1.1rem;
margin: 0.5rem; margin: 0.5rem;
padding: 1rem; padding: 1rem;
summary {
padding: 10px;
}
li {
list-style: none;
}
} }
.nav-menu{ .nav-menu{

View file

@ -1,9 +1,12 @@
<script setup>
import {useI18n} from 'vue-i18n';
const {t} = useI18n({useScope: 'local'});
</script>
<template> <template>
<form id="profil" method="POST" v-on:submit="checkForm">
<div class="personalInformation"> <div title="👤 Profil">
<vue-tabs>
<v-tab title="👤 Profil">
<h1>👤 Profil</h1> <h1>👤 Profil</h1>
<div> <div>
<label for="avatar">Avatar</label> <label for="avatar">Avatar</label>
@ -17,18 +20,17 @@
<div> <div>
<label for="emailHome">Email Personnelle :</label> <label for="emailHome">Email Personnelle :</label>
<input type="email" v-model="home" required> <input type="email" v-model="home" placeholder="john.Doe@email.com" required>
</div> </div>
</div>
<button @click="persist">Enregistrer</button>
</v-tab>
<br> <br>
<v-tab title="📇 Informations personnelles">
<div title="📇 Informations personnelles">
<h1>📇 Informations personnelles</h1> <h1>📇 Informations personnelles</h1>
<div> <div>
<label for="name">Nom complet :</label> <label for="name">Nom complet :</label>
<input type="text" v-model="home" pattern="{a-zA-Z}{4,25}" required> <input type="text" v-model="home" pattern="{a-zA-Z}{4,25}" placeholder="John Doe" required>
</div> </div>
<div> <div>
@ -38,8 +40,7 @@
<div> <div>
<label for="nbrHome">Numéro de téléphone :</label> <label for="nbrHome">Numéro de téléphone :</label>
<input type="tel" pattern="^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$" <input type="tel" v-model="home" placeholder="+32(0)15738490" >
v-model="home">
</div> </div>
<div class="Home"> <div class="Home">
@ -58,13 +59,11 @@
<input type="text" v-model="home"> <input type="text" v-model="home">
</ul> </ul>
</div> </div>
</div>
<div>
<button @click="persist">Enregistrer</button>
</div>
</v-tab>
<br> <br>
<v-tab title="💼 Emploi">
<div title="💼 Emploi">
<h1>💼 Emploi</h1> <h1>💼 Emploi</h1>
<div> <div>
<label for="orgname">Entreprise :</label> <label for="orgname">Entreprise :</label>
@ -84,8 +83,7 @@
</div> </div>
<div> <div>
<label for="nbrWork">Numéro de téléphone :</label> <label for="nbrWork">Numéro de téléphone :</label>
<input type="tel" pattern="^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$" <input type="tel" v-model="work">
v-model="work">
</div> </div>
<div class="Work"> <div class="Work">
@ -104,30 +102,46 @@
<input type="text" v-model="work"> <input type="text" v-model="work">
</ul> </ul>
</div> </div>
<button type="submit" value="Submit">Enregistrer</button>
</div>
<div>
<button @click="persist">Enregistrer</button>
</div>
</v-tab>
<br> <br>
<v-tab title="✍🏼 Commentaires">
<h1>🏼 Commentaires</h1> <div title="✍🏼 À propos / Commentaires">
<h1>🏼 À propos / Commentaires</h1>
<div> <div>
<label for="comments"></label> <label for="comments"></label>
<textarea v-model="home"></textarea> <textarea v-model="home"></textarea>
</div> </div>
<button @click="persist">Enregistrer</button>
<button @click="persist">Enregistrer</button> </div>
</v-tab> </form>
</vue-tabs>
</div>
</template> </template>
<script> <script>
/*export default { /*const profil = new Vue ({ // vue n'est pas définie
name: 'personalInformation', el: '#profil',
data: {
home: null,
work: null
},
methods:{
checkForm: function (e) {
if (this.home && this.work) {
return true;
}
e.preventDefault();
}
}
}); */
/*export default { //home n'est pas déclarer
name: 'profil',
setup() { setup() {
home = "", home = "",
work = "" work = ""
@ -147,8 +161,8 @@
console.log('ok'); console.log('ok');
} }
} }
}; }; */
*/
</script> </script>
<style scoped> <style scoped>
@ -168,3 +182,6 @@
margin-top: 20px; margin-top: 20px;
} }
</style> </style>
<i18n lang="json" locale="en" src="./locale/en.json"/>
<i18n lang="json" locale="fr" src="./locale/fr.json"/>

View file

View file

View file

@ -2,10 +2,10 @@
<form class='chat-box' v-on:submit='onSubmit($event)'> <form class='chat-box' v-on:submit='onSubmit($event)'>
<input <input
v-model='text' v-model='text'
placeholder='Ecrire un message' placeholder='Écrire un message'
type='text' type='text'
/> />
<button :disabled='text === ""'>Send</button> <button :disabled='text === ""'>Envoyer</button>
</form> </form>
</template> </template>

View file

@ -1,35 +0,0 @@
<template>
<details>
<summary>
<span class="onglet">👤 Contact</span>
</summary>
<ul>
<li><router-link to="/profil">📝 Profil</router-link></li>
<li><router-link to="">🗒 Liste des contacts</router-link></li>
</ul>
</details>
<details>
<summary>
<span class="onglet">💬 Messages</span>
</summary>
<ul>
<li><router-link to="/correspondance">📭 Correspondance</router-link></li>
<li><router-link to="/chat">💬 Chat</router-link></li>
<li><router-link to="">🎥 Visioconférence</router-link></li>
</ul>
</details>
</template>
<style scoped>
li {
list-style-type: none;
}
details {
padding-bottom: 10px;
}
</style>

View file

View file

View file

@ -9,12 +9,26 @@
"route_not_found": "Url {route} does not exist." "route_not_found": "Url {route} does not exist."
}, },
"home": { "home": {
"apps": "Applications" "apps": "Applications",
"connection": "Connection",
"account":"Account",
"dashboard": "Dashboard",
"disconnect": "Disconnect"
}, },
"pwa": { "pwa": {
"ready": "Your applications are ready for offline.", "ready": "Your applications are ready for offline.",
"new_content": "New version available!", "new_content": "New version available!",
"later": "See later", "later": "See later",
"reload": "Reload app" "reload": "Reload app"
},
"menu": {
"contact": "Contact",
"profile": "Profil",
"contacts list": "contacts list",
"messages": "Messages",
"correspondence": "Correspondence",
"chat": "Chat",
"video conferencing": "Video conferencing"
} }
} }

View file

@ -9,12 +9,26 @@
"route_not_found": "La route {route} n'existe pas." "route_not_found": "La route {route} n'existe pas."
}, },
"home": { "home": {
"apps": "Applications" "apps": "Applications",
"connection": "Connexion",
"account":"Compte",
"dashboard": "Tableau de bord",
"disconnect": "Déconnexion"
}, },
"pwa": { "pwa": {
"ready": "Vous êtes prêts pour le mode hors-ligne.", "ready": "Vous êtes prêts pour le mode hors-ligne.",
"new_content": "Nouvelle version disponible !", "new_content": "Nouvelle version disponible !",
"later": "Plus tard", "later": "Plus tard",
"reload": "Recharger" "reload": "Recharger"
},
"menu": {
"contact": "Contact",
"profile ": "Profil",
"contacts list": "Liste des contacts",
"messages": "Messages",
"correspondence": "Correspondence",
"chat": "Chat",
"video conferencing": "Visioconférence"
} }
} }