mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-03 09:04:06 -05:00
Localize more dates and texts (#341)
* Localize more dates and texts * Adapt source language to 4-letter code for VS code * Make page titles more reactive to language change * Translate missing text + fix missed refactoring * Fix missed page titles refactoring * Translate nutrition view * Translate Image upload vue * Fix default text being defined twice in upload btn
This commit is contained in:
@@ -8,7 +8,6 @@ import ManageUsers from "@/pages/Admin/ManageUsers";
|
||||
import Settings from "@/pages/Admin/Settings";
|
||||
import About from "@/pages/Admin/About";
|
||||
import { store } from "../store";
|
||||
import i18n from '@/i18n.js';
|
||||
|
||||
export const adminRoutes = {
|
||||
path: "/admin",
|
||||
@@ -27,7 +26,7 @@ export const adminRoutes = {
|
||||
path: "profile",
|
||||
component: Profile,
|
||||
meta: {
|
||||
title: i18n.t('settings.profile'),
|
||||
title: "settings.profile",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -35,49 +34,49 @@ export const adminRoutes = {
|
||||
path: "backups",
|
||||
component: Backup,
|
||||
meta: {
|
||||
title: i18n.t('settings.backup-and-exports'),
|
||||
title: "settings.backup-and-exports",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "themes",
|
||||
component: Theme,
|
||||
meta: {
|
||||
title: i18n.t('general.themes'),
|
||||
title: "general.themes",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "meal-planner",
|
||||
component: MealPlanner,
|
||||
meta: {
|
||||
title: i18n.t('meal-plan.meal-planner'),
|
||||
title: "meal-plan.meal-planner",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "migrations",
|
||||
component: Migration,
|
||||
meta: {
|
||||
title: i18n.t('settings.migrations'),
|
||||
title: "settings.migrations",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "manage-users",
|
||||
component: ManageUsers,
|
||||
meta: {
|
||||
title: i18n.t('settings.manage-users'),
|
||||
title: "settings.manage-users",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "settings",
|
||||
component: Settings,
|
||||
meta: {
|
||||
title: i18n.t('settings.site-settings'),
|
||||
title: "settings.site-settings",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "about",
|
||||
component: About,
|
||||
meta: {
|
||||
title: i18n.t('general.about'),
|
||||
title: "general.about",
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import i18n from "@/i18n.js";
|
||||
import SearchPage from "@/pages/SearchPage";
|
||||
import HomePage from "@/pages/HomePage";
|
||||
|
||||
@@ -9,7 +8,7 @@ export const generalRoutes = [
|
||||
path: "/search",
|
||||
component: SearchPage,
|
||||
meta: {
|
||||
title: i18n.t("search.search"),
|
||||
title: "search.search",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -9,6 +9,7 @@ import VueRouter from "vue-router";
|
||||
import VueI18n from "@/i18n";
|
||||
import Vuetify from "@/plugins/vuetify";
|
||||
import Vue from "vue";
|
||||
import i18n from '@/i18n.js';
|
||||
|
||||
export const routes = [
|
||||
...generalRoutes,
|
||||
@@ -34,8 +35,8 @@ router.afterEach(to => {
|
||||
const title = await to.meta.title(to);
|
||||
document.title = title + TITLE_SUFFIX;
|
||||
} else {
|
||||
document.title = to.meta.title
|
||||
? to.meta.title + TITLE_SUFFIX
|
||||
document.title = i18n.t(to.meta.title)
|
||||
? i18n.t(to.meta.title) + TITLE_SUFFIX
|
||||
: DEFAULT_TITLE;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Planner from "@/pages/MealPlan/Planner";
|
||||
import ThisWeek from "@/pages/MealPlan/ThisWeek";
|
||||
import i18n from "@/i18n.js";
|
||||
import { api } from "@/api";
|
||||
|
||||
export const mealRoutes = [
|
||||
@@ -8,14 +7,14 @@ export const mealRoutes = [
|
||||
path: "/meal-plan/planner",
|
||||
component: Planner,
|
||||
meta: {
|
||||
title: i18n.t("meal-plan.meal-planner"),
|
||||
title: "meal-plan.meal-planner",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/meal-plan/this-week",
|
||||
component: ThisWeek,
|
||||
meta: {
|
||||
title: i18n.t("meal-plan.dinner-this-week"),
|
||||
title: "meal-plan.dinner-this-week",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user