feat: Ajout de traductions
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is failing Details

This commit is contained in:
Simon 2024-02-15 09:57:04 +01:00
parent 79a0ab2a1a
commit 2bcddaabcf
1 changed files with 13 additions and 3 deletions

View File

@ -154,6 +154,15 @@ async function share() {
saveAs(dataUrl, `Ceiba-score-${fileName}.png`); saveAs(dataUrl, `Ceiba-score-${fileName}.png`);
sharing.value = false; sharing.value = false;
} }
const trad = store.language == "fr-FR" ? {
"failure": "Probabilité d'échec",
"params": "Rappel des paramètres choisis",
"sigle": "PdE",
} : {
"failure": "Likelihood of Failure",
"params": "Chosen parameters",
"sigle": "LoF",
}
</script> </script>
<template> <template>
@ -182,19 +191,20 @@ async function share() {
<SplideSlide class="latest"> <SplideSlide class="latest">
<template v-if="displayScoreResult && result"> <template v-if="displayScoreResult && result">
<div> <div>
<h2 class="center">Probabilité d'échec</h2> <h2 class="center">{{ trad.failure }}</h2>
<h2 class="center">{{ result.pde_qtra }}</h2> <h2 class="center">{{ result.pde_qtra }}</h2>
<div class="gradient"> <div class="gradient">
<div <div
v-for="(item, index) in [...Array(7).keys()]" v-for="(item, index) in [...Array(7).keys()]"
:class="{ active: result && result.pde_qtra === index + 1 }" :class="{ active: result && result.pde_qtra === index + 1 }"
:key="item" :key="item"
:data-title=trad.sigle
> >
{{ index + 1 }} {{ index + 1 }}
</div> </div>
</div> </div>
<div class="details"> <div class="details">
<p>Rappel des paramètres choisis :</p> <p>{{ trad.params }} :</p>
<ul> <ul>
<li v-for="question in questions" :key="question.id"> <li v-for="question in questions" :key="question.id">
{{ question.title }} : {{ question.title }} :
@ -402,7 +412,7 @@ label
justify-content: center justify-content: center
&::after &::after
content: "PdE" content: attr(data-title)
position: absolute position: absolute
font-size: 1rem font-size: 1rem
top: -2rem top: -2rem