diff --git a/i18n/locales/de.json b/i18n/locales/de.json index 711a4079952dc4bd738f6773df727ee9adca42ff..a20e4de460cd7225841c0c62f1d33d76ca46f3e1 100644 --- a/i18n/locales/de.json +++ b/i18n/locales/de.json @@ -85,7 +85,7 @@ "infos": "Informationen", "inout": "Bei- und Austritte des Vertrauensnetz in den 2 letzten Tagen", "inpreparation": "In Vorbereitung", - "jours": "0 Tage | 1 Tag | {n} Tage", + "jours": "0 Tage | 1 Tag | {n} Tage", "lexique": "Lexicon", "membre": { "calculant": { diff --git a/i18n/locales/en.json b/i18n/locales/en.json index d1e6a03fd700818b7839c6dcf627074bc796b916..abece6ef2549ebca71b1d7595c255e3e8bc91818 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -86,7 +86,7 @@ "infos": "Informations", "inout": "Entries and exits of the web of trust for the last 2 days", "inpreparation": "In preparation", - "jours": "0 days | 1 day | {n} days", + "jours": "0 days | 1 day | {n} days", "lexique": "Lexicon", "membre": { "calculant": { diff --git a/i18n/locales/es.json b/i18n/locales/es.json index 48ec2cfb4f0da829241d94c6e2567e22f3965f21..8ef0f7bb21ecce970277ba3edf8b22f4b5123135 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -86,7 +86,7 @@ "infos": "Informaciones", "inout": "Entradas y salidas de la red de confianza en los últimos 2 dÃas", "inpreparation": "En preparación", - "jours": "0 dÃas | 1 dÃa | {n} dÃas", + "jours": "0 dÃas | 1 dÃa | {n} dÃas", "lexique": "Léxico", "membre": { "calculant": { diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index 8ab132d311a507e3cd6de256ab8aba5368438b6a..9ab92d4f5e08aecec7aceea434e5000c9b0c0b89 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -86,7 +86,7 @@ "infos": "Informations", "inout": "Entrées et sorties de la toile de confiance des 2 derniers jours", "inpreparation": "En préparation", - "jours": "0 jours | 1 jour | {n} jours", + "jours": "0 jours | 1 jour | {n} jours", "lexique": "Lexique", "membre": { "calculant": { diff --git a/pages/parametres.vue b/pages/parametres.vue index c581da2d9483d27f376ba0f9a801ca1c8ffe989c..7ac030ded17ba151968107c3409a7f57c0440de0 100644 --- a/pages/parametres.vue +++ b/pages/parametres.vue @@ -20,7 +20,19 @@ <td class="d-none d-sm-table-cell"> {{ param.par_type }} </td> - <td>{{ param.value }}</td> + <td + v-if="param.par_type == 'DURATION'" + v-html="getDuration(param.value)"></td> + <td v-else-if="param.par_type == 'DATE'"> + {{ $d(new Date(param.value * 1000), "short") }} + </td> + <td v-else-if="param.par_type == 'FLOAT'"> + {{ param.value * 100 + "%" }} + </td> + <td + v-else-if="param.name == 'ud0'" + v-html="param.value / 100 + ' Äž1'"></td> + <td v-else>{{ param.value }}</td> <td class="d-none d-md-table-cell" v-html="$t('params.name.' + param.name)"></td> @@ -51,6 +63,23 @@ export default { error: null } }, + methods: { + getDuration(duration) { + let min = Math.floor(duration / 60) + let sec = duration % 60 + let h = Math.floor(min / 60) + min = min % 60 + let days = Math.floor(h / 24) + h = h % 24 + + sec = sec == 0 ? "" : sec + "s" + min = min == 0 ? "" : min + "min" + h = h == 0 ? "" : h + "h" + days = days == 0 ? "" : this.$tc("jours", days) + " " + + return days + h + min + sec + } + }, apollo: { allParameters: { query: PARAMS, diff --git a/pages/previsions/futures_sorties.vue b/pages/previsions/futures_sorties.vue index 48a9d8be3793fce8e0d348c9032ea368d70c45de..dc01ed1c8c22d8693d494235a8980e0d8af3a1eb 100644 --- a/pages/previsions/futures_sorties.vue +++ b/pages/previsions/futures_sorties.vue @@ -12,9 +12,11 @@ aria-describedby="periodHelp" v-model="period" @change="save"> - <option v-for="index in 30" :key="index" :value="index"> - {{ $tc("jours", index) }} - </option> + <option + v-for="index in 30" + :key="index" + :value="index" + v-html="$tc('jours', index)"></option> </select> <small id="periodHelp" class="form-text text-muted">{{ $t("previsions.period.desc")