added transalations for UI texts
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user