added transalations for UI texts

This commit is contained in:
2026-02-14 07:34:04 +01:00
parent 3010a66d59
commit 9b2f2c4e91
24 changed files with 681 additions and 118 deletions

View File

@ -1,5 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import type { Meal, MealType } from '@/types/domain'
const props = defineProps<{
@ -14,6 +15,8 @@ const emit = defineEmits<{
(event: 'select-meal', mealType: MealType, mealId: number | null): void
}>()
const { t } = useI18n()
const selectedValue = computed({
get: () => (props.selectedMealId === null ? '' : String(props.selectedMealId)),
set: (value: string) => {
@ -32,16 +35,19 @@ const selectedValue = computed({
<h3>{{ label }}</h3>
</div>
<select v-model="selectedValue" class="input-select">
<option value="">Bez jedálnička</option>
<option value="">{{ t('today.noMealPlan') }}</option>
<option v-for="option in mealOptions" :key="option.value" :value="String(option.value)">
{{ option.label }}
</option>
</select>
<p class="day-meal-card__summary" v-if="meal?.totals">
{{ meal.totals.kcal }} kcal · B {{ meal.totals.protein_g }} g · S {{ meal.totals.carbs_g }} g · T {{ meal.totals.fat_g }} g
{{ meal.totals.kcal }} {{ t('common.kcalUnit') }}
· {{ t('nutrition.short.protein') }} {{ meal.totals.protein_g }} g
· {{ t('nutrition.short.carbs') }} {{ meal.totals.carbs_g }} g
· {{ t('nutrition.short.fat') }} {{ meal.totals.fat_g }} g
</p>
<p class="day-meal-card__summary" v-else>
Zatiaľ bez položiek.
{{ t('today.noItems') }}
</p>
</section>
</template>