From d2f5d7d840772fab9910b6fb14e69f2b9db28d88 Mon Sep 17 00:00:00 2001 From: Simon C Date: Thu, 15 Feb 2024 10:16:37 +0100 Subject: [PATCH] feat: Ajout des traductions depuis l'administration --- src/components/Score.vue | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/Score.vue b/src/components/Score.vue index 3175b32..b6ef393 100644 --- a/src/components/Score.vue +++ b/src/components/Score.vue @@ -61,7 +61,8 @@ function formatScore(score) { function getTranslation(translations, key) { return translations.find((translation) => translation[key] == store.language); } -const title = score ? getTranslation(score.translations, "languages_id").title : ""; +const trad = getTranslation(score.translations, "languages_id") +const title = score ? trad.title : ""; const questions = ref(formatScore(score)); const scoreSum = computed(() => { @@ -154,15 +155,6 @@ async function share() { saveAs(dataUrl, `Ceiba-score-${fileName}.png`); 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", -}