mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-06 22:15:22 +02:00
feat(lang): more localization(#2219)
* feat(lang): localize some views * fix: typo * fix: Localization broke bug report generation * feat(lang): localize recipe page instructions
This commit is contained in:
parent
6b63c751b1
commit
9fd1ba6e46
29 changed files with 362 additions and 226 deletions
|
@ -26,8 +26,8 @@
|
|||
|
||||
<div class="d-flex align-center justify-space-between mb-2">
|
||||
<v-tabs>
|
||||
<v-tab to="/group/mealplan/planner/view">Meal Planner</v-tab>
|
||||
<v-tab to="/group/mealplan/planner/edit">Edit</v-tab>
|
||||
<v-tab to="/group/mealplan/planner/view">{{ $t('meal-plan.meal-planner') }}</v-tab>
|
||||
<v-tab to="/group/mealplan/planner/edit">{{ $t('general.edit') }}</v-tab>
|
||||
</v-tabs>
|
||||
<ButtonLink :icon="$globals.icons.calendar" to="/group/mealplan/settings" :text="$tc('general.settings')" />
|
||||
</div>
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<v-icon left>
|
||||
{{ $globals.icons.tags }}
|
||||
</v-icon>
|
||||
{{ mealplan.entryType }}
|
||||
{{ getEntryTypeText(mealplan.entryType) }}
|
||||
</v-chip>
|
||||
</template>
|
||||
<v-list>
|
||||
|
@ -167,7 +167,7 @@
|
|||
children: [
|
||||
{
|
||||
icon: $globals.icons.diceMultiple,
|
||||
text: 'Breakfast',
|
||||
text: $tc('meal-plan.breakfast'),
|
||||
event: 'randomBreakfast',
|
||||
},
|
||||
{
|
||||
|
@ -212,7 +212,7 @@ import { SortableEvent } from "sortablejs";
|
|||
import draggable from "vuedraggable";
|
||||
import { watchDebounced } from "@vueuse/core";
|
||||
import { MealsByDate } from "./types";
|
||||
import { useMealplans, planTypeOptions } from "~/composables/use-group-mealplan";
|
||||
import { useMealplans, usePlanTypeOptions, getEntryTypeText } from "~/composables/use-group-mealplan";
|
||||
import RecipeCardImage from "~/components/Domain/Recipe/RecipeCardImage.vue";
|
||||
import { PlanEntryType } from "~/lib/api/types/meal-plan";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
|
@ -333,10 +333,13 @@ export default defineComponent({
|
|||
|
||||
const search = useRecipeSearch(api);
|
||||
|
||||
const planTypeOptions = usePlanTypeOptions();
|
||||
|
||||
return {
|
||||
state,
|
||||
onMoveCallback,
|
||||
planTypeOptions,
|
||||
getEntryTypeText,
|
||||
|
||||
// Dialog
|
||||
dialog,
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, useContext } from "@nuxtjs/composition-api";
|
||||
import { MealsByDate } from "./types";
|
||||
import { ReadPlanEntry } from "~/lib/api/types/meal-plan";
|
||||
import RecipeCardMobile from "~/components/Domain/Recipe/RecipeCardMobile.vue";
|
||||
|
@ -65,15 +65,17 @@ export default defineComponent({
|
|||
sections: DaySection[];
|
||||
};
|
||||
|
||||
const { i18n } = useContext();
|
||||
|
||||
const plan = computed<Days[]>(() => {
|
||||
return props.mealplans.reduce((acc, day) => {
|
||||
const out: Days = {
|
||||
date: day.date,
|
||||
sections: [
|
||||
{ title: "Breakfast", meals: [] },
|
||||
{ title: "Lunch", meals: [] },
|
||||
{ title: "Dinner", meals: [] },
|
||||
{ title: "Side", meals: [] },
|
||||
{ title: i18n.tc("meal-plan.breakfast"), meals: [] },
|
||||
{ title: i18n.tc("meal-plan.lunch"), meals: [] },
|
||||
{ title: i18n.tc("meal-plan.dinner"), meals: [] },
|
||||
{ title: i18n.tc("meal-plan.side"), meals: [] },
|
||||
],
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue