1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 23:59:45 +02:00

More localization (#525)

* More localization

* Localize search dialog

* Fix "about" page title
This commit is contained in:
sephrat 2021-06-16 20:30:57 +02:00 committed by GitHub
parent 81fd224d88
commit f5ede73eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 77 additions and 56 deletions

View file

@ -4,14 +4,14 @@
<BaseDialog <BaseDialog
title="Custom Meal" title="Custom Meal"
:title-icon="$globals.icons.primary" :title-icon="$globals.icons.primary"
submit-text="Save" :submit-text="$t('general.save')"
:top="true" :top="true"
ref="customMealDialog" ref="customMealDialog"
@submit="pushCustomMeal" @submit="pushCustomMeal"
> >
<v-card-text> <v-card-text>
<v-text-field autofocus v-model="customMeal.name" label="Name"> </v-text-field> <v-text-field autofocus v-model="customMeal.name" :label="$t('general.name')"> </v-text-field>
<v-textarea v-model="customMeal.description" label="Description"> </v-textarea> <v-textarea v-model="customMeal.description" :label="$t('recipe.description')"> </v-textarea>
</v-card-text> </v-card-text>
</BaseDialog> </BaseDialog>
<v-col cols="12" sm="12" md="6" lg="4" xl="3" v-for="(planDay, index) in value" :key="index"> <v-col cols="12" sm="12" md="6" lg="4" xl="3" v-for="(planDay, index) in value" :key="index">
@ -23,7 +23,7 @@
<v-icon left> <v-icon left>
{{ $globals.icons.edit }} {{ $globals.icons.edit }}
</v-icon> </v-icon>
No Recipe {{ $t('reicpe.no-recipe') }}
</v-btn> </v-btn>
</v-fade-transition> </v-fade-transition>
</CardImage> </CardImage>
@ -40,14 +40,14 @@
<v-icon left> <v-icon left>
{{ $globals.icons.edit }} {{ $globals.icons.edit }}
</v-icon> </v-icon>
No Recipe {{ $t('reicpe.no-recipe') }}
</v-btn> </v-btn>
</v-fade-transition> </v-fade-transition>
<v-btn color="info" outlined small @click="openSearch(index, modes.sides)"> <v-btn color="info" outlined small @click="openSearch(index, modes.sides)">
<v-icon small class="mr-1"> <v-icon small class="mr-1">
{{ $globals.icons.create }} {{ $globals.icons.create }}
</v-icon> </v-icon>
Side {{ $t('meal-plan.side') }}
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
</v-hover> </v-hover>

View file

@ -4,7 +4,7 @@
<v-icon large class="mr-2"> <v-icon large class="mr-2">
mdi-comment-text-multiple-outline mdi-comment-text-multiple-outline
</v-icon> </v-icon>
Comments {{ $t('recipe.comments') }}
</v-card-title> </v-card-title>
<v-divider class="mx-2"></v-divider> <v-divider class="mx-2"></v-divider>
<v-card class="ma-2" v-for="(comment, index) in comments" :key="comment.id"> <v-card class="ma-2" v-for="(comment, index) in comments" :key="comment.id">
@ -43,7 +43,7 @@
<v-card-text v-if="loggedIn"> <v-card-text v-if="loggedIn">
<v-textarea auto-grow row-height="1" outlined v-model="newComment"> </v-textarea> <v-textarea auto-grow row-height="1" outlined v-model="newComment"> </v-textarea>
<div class="d-flex"> <div class="d-flex">
<TheButton class="ml-auto" create @click="createNewComment"> Comment </TheButton> <TheButton class="ml-auto" create @click="createNewComment"> {{ $t('recipe.comment-action') }} </TheButton>
</div> </div>
</v-card-text> </v-card-text>
</v-card> </v-card>

View file

@ -14,7 +14,7 @@
dense dense
solo solo
flat flat
placeholder="Section Title" :placeholder="$t('recipe.section-title')"
background-color="primary" background-color="primary"
> >
</v-text-field> </v-text-field>
@ -41,7 +41,7 @@
</v-btn> </v-btn>
{{ $t("recipe.step-index", { step: index + 1 }) }} {{ $t("recipe.step-index", { step: index + 1 }) }}
<v-btn v-if="edit" text color="primary" class="ml-auto" @click="toggleShowTitle(index)"> <v-btn v-if="edit" text color="primary" class="ml-auto" @click="toggleShowTitle(index)">
{{ !showTitleEditor[index] ? "Insert Section" : "Remove Section" }} {{ !showTitleEditor[index] ? $t('recipe.insert-section') : $t('recipe.remove-section') }}
</v-btn> </v-btn>
</v-card-title> </v-card-title>
<v-card-text v-if="edit"> <v-card-text v-if="edit">

View file

@ -78,34 +78,39 @@ export default {
data() { data() {
return { return {
edit: false, edit: false,
editorButtons: [
{
text: "Delete",
icon: this.$globals.icons.delete,
event: DELETE_EVENT,
color: "error",
},
{
text: "JSON",
icon: "mdi-code-braces",
event: JSON_EVENT,
color: "accent",
},
{
text: "Close",
icon: "mdi-close",
event: CLOSE_EVENT,
color: "",
},
{
text: "Save",
icon: this.$globals.icons.save,
event: SAVE_EVENT,
color: "success",
},
],
}; };
}, },
computed: {
editorButtons() {
return [
{
text: this.$t('general.delete'),
icon: this.$globals.icons.delete,
event: DELETE_EVENT,
color: "error",
},
{
text: this.$t('general.json'),
icon: "mdi-code-braces",
event: JSON_EVENT,
color: "accent",
},
{
text: this.$t('general.close'),
icon: "mdi-close",
event: CLOSE_EVENT,
color: "",
},
{
text: this.$t('general.save'),
icon: this.$globals.icons.save,
event: SAVE_EVENT,
color: "success",
},
];
},
},
methods: { methods: {
emitHandler(event) { emitHandler(event) {
switch (event) { switch (event) {

View file

@ -39,9 +39,9 @@
<v-card class="mt-1 pa-1" relative> <v-card class="mt-1 pa-1" relative>
<v-card-actions> <v-card-actions>
<div class="mr-auto"> <div class="mr-auto">
Results {{ $t('search.results') }}
</div> </div>
<router-link to="/search"> Advanced Search </router-link> <router-link to="/search"> {{ $t('search.advanced-search') }} </router-link>
</v-card-actions> </v-card-actions>
<v-card-actions v-if="loading"> <v-card-actions v-if="loading">
<SiteLoader :loading="loading" /> <SiteLoader :loading="loading" />

View file

@ -9,7 +9,7 @@
<v-icon> mdi-heart </v-icon> <v-icon> mdi-heart </v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-content> <v-list-item-content>
<v-list-item-title> Favorites </v-list-item-title> <v-list-item-title> {{ $t('general.favorites') }} </v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
</template> </template>

View file

@ -4,6 +4,7 @@
"take-me-home": "Take me Home" "take-me-home": "Take me Home"
}, },
"about": { "about": {
"about": "About",
"about-mealie": "About Mealie", "about-mealie": "About Mealie",
"api-docs": "API Docs", "api-docs": "API Docs",
"api-port": "API Port", "api-port": "API Port",
@ -54,6 +55,7 @@
"clear": "Clear", "clear": "Clear",
"close": "Close", "close": "Close",
"confirm": "Confirm", "confirm": "Confirm",
"confirm-delete-generic": "Are you sure you want to delete this?",
"copied": "Copied", "copied": "Copied",
"create": "Create", "create": "Create",
"created": "Created", "created": "Created",
@ -61,7 +63,6 @@
"custom": "Custom", "custom": "Custom",
"dashboard": "Dashboard", "dashboard": "Dashboard",
"delete": "Delete", "delete": "Delete",
"confirm-delete-generic": "Are you sure you want to delete this?",
"disabled": "Disabled", "disabled": "Disabled",
"download": "Download", "download": "Download",
"edit": "Edit", "edit": "Edit",
@ -69,6 +70,7 @@
"exception": "Exception", "exception": "Exception",
"failed-count": "Failed: {count}", "failed-count": "Failed: {count}",
"failure-uploading-file": "Failure uploading file", "failure-uploading-file": "Failure uploading file",
"favorites": "Favorites",
"field-required": "Field Required", "field-required": "Field Required",
"file-folder-not-found": "File/folder not found", "file-folder-not-found": "File/folder not found",
"file-uploaded": "File uploaded", "file-uploaded": "File uploaded",
@ -79,10 +81,12 @@
"image": "Image", "image": "Image",
"image-upload-failed": "Image upload failed", "image-upload-failed": "Image upload failed",
"import": "Import", "import": "Import",
"json": "JSON",
"keyword": "Keyword", "keyword": "Keyword",
"link": "Link", "link": "Link",
"link-copied": "Link Copied", "link-copied": "Link Copied",
"monday": "Monday", "monday": "Monday",
"more": "More",
"name": "Name", "name": "Name",
"new": "New", "new": "New",
"no": "No", "no": "No",
@ -120,8 +124,7 @@
"url": "URL", "url": "URL",
"view": "View", "view": "View",
"wednesday": "Wednesday", "wednesday": "Wednesday",
"yes": "Yes", "yes": "Yes"
"more": "More"
}, },
"group": { "group": {
"are-you-sure-you-want-to-delete-the-group": "Are you sure you want to delete <b>{groupName}<b/>?", "are-you-sure-you-want-to-delete-the-group": "Are you sure you want to delete <b>{groupName}<b/>?",
@ -151,6 +154,7 @@
"edit-meal-plan": "Edit Meal Plan", "edit-meal-plan": "Edit Meal Plan",
"end-date": "End Date", "end-date": "End Date",
"group": "Group (Beta)", "group": "Group (Beta)",
"main": "Main",
"meal-planner": "Meal Planner", "meal-planner": "Meal Planner",
"meal-plans": "Meal Plans", "meal-plans": "Meal Plans",
"mealplan-categories": "MEALPLAN CATEGORIES", "mealplan-categories": "MEALPLAN CATEGORIES",
@ -166,6 +170,8 @@
"only-recipes-with-these-categories-will-be-used-in-meal-plans": "Only recipes with these categories will be used in Meal Plans", "only-recipes-with-these-categories-will-be-used-in-meal-plans": "Only recipes with these categories will be used in Meal Plans",
"planner": "Planner", "planner": "Planner",
"quick-week": "Quick Week", "quick-week": "Quick Week",
"side": "Side",
"sides": "Sides",
"start-date": "Start Date" "start-date": "Start Date"
}, },
"migration": { "migration": {
@ -183,18 +189,18 @@
}, },
"new-recipe": { "new-recipe": {
"bulk-add": "Bulk Add", "bulk-add": "Bulk Add",
"error-title": "Looks Like We Couldn't Find Anything",
"error-details": "Only websites containing ld+json or microdata can be imported imported by Mealie. Most major recipe websites support this data structure. If your site cannot be imported but there is json data in the log, please submit a github issue with the URL and data.", "error-details": "Only websites containing ld+json or microdata can be imported imported by Mealie. Most major recipe websites support this data structure. If your site cannot be imported but there is json data in the log, please submit a github issue with the URL and data.",
"error-title": "Looks Like We Couldn't Find Anything",
"from-url": "Import a Recipe", "from-url": "Import a Recipe",
"paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list": "Paste in your recipe data. Each line will be treated as an item in a list", "paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list": "Paste in your recipe data. Each line will be treated as an item in a list",
"recipe-url": "Recipe URL", "recipe-url": "Recipe URL",
"url-form-hint": "Copy and paste a link from your favorite recipe website" "url-form-hint": "Copy and paste a link from your favorite recipe website"
}, },
"page": { "page": {
"page": "Page",
"all-recipes": "All Recipes", "all-recipes": "All Recipes",
"home-page": "Home Page", "home-page": "Home Page",
"new-page-created": "New page created", "new-page-created": "New page created",
"page": "Page",
"page-creation-failed": "Page creation failed", "page-creation-failed": "Page creation failed",
"page-deleted": "Page deleted", "page-deleted": "Page deleted",
"page-deletion-failed": "Page deletion failed", "page-deletion-failed": "Page deletion failed",
@ -206,24 +212,27 @@
}, },
"recipe": { "recipe": {
"add-key": "Add Key", "add-key": "Add Key",
"add-to-favorites": "Add to Favorites",
"api-extras": "API Extras", "api-extras": "API Extras",
"assets": "Assets", "assets": "Assets",
"calories": "Calories", "calories": "Calories",
"calories-suffix": "calories", "calories-suffix": "calories",
"carbohydrate-content": "Carbohydrate", "carbohydrate-content": "Carbohydrate",
"categories": "Categories", "categories": "Categories",
"disable-comments": "Disable Comments", "comment-action": "Comment",
"disable-amount": "Disable Ingredient Amounts", "comments": "Comments",
"delete-confirmation": "Are you sure you want to delete this recipe?", "delete-confirmation": "Are you sure you want to delete this recipe?",
"delete-recipe": "Delete Recipe", "delete-recipe": "Delete Recipe",
"description": "Description", "description": "Description",
"disable-amount": "Disable Ingredient Amounts",
"disable-comments": "Disable Comments",
"fat-content": "Fat", "fat-content": "Fat",
"fiber-content": "Fiber", "fiber-content": "Fiber",
"grams": "grams", "grams": "grams",
"ingredient": "Ingredient", "ingredient": "Ingredient",
"ingredients": "Ingredients", "ingredients": "Ingredients",
"insert-section": "Insert Section",
"instructions": "Instructions", "instructions": "Instructions",
"share-recipe-message": "I wanted to share my {0} recipe with you.",
"key-name-required": "Key Name Required", "key-name-required": "Key Name Required",
"landscape-view-coming-soon": "Landscape View (Coming Soon)", "landscape-view-coming-soon": "Landscape View (Coming Soon)",
"milligrams": "milligrams", "milligrams": "milligrams",
@ -249,7 +258,11 @@
"recipe-settings": "Recipe Settings", "recipe-settings": "Recipe Settings",
"recipe-update-failed": "Recipe update failed", "recipe-update-failed": "Recipe update failed",
"recipe-updated": "Recipe updated", "recipe-updated": "Recipe updated",
"remove-from-favorites": "Remove from Favorites",
"remove-section": "Remove Section",
"section-title": "Section Title",
"servings": "Servings", "servings": "Servings",
"share-recipe-message": "I wanted to share my {0} recipe with you.",
"show-assets": "Show Assets", "show-assets": "Show Assets",
"show-nutrition-values": "Show Nutrition Values", "show-nutrition-values": "Show Nutrition Values",
"sodium-content": "Sodium", "sodium-content": "Sodium",
@ -258,16 +271,19 @@
"title": "Title", "title": "Title",
"total-time": "Total Time", "total-time": "Total Time",
"unable-to-delete-recipe": "Unable to Delete Recipe", "unable-to-delete-recipe": "Unable to Delete Recipe",
"view-recipe": "View Recipe", "view-recipe": "View Recipe"
"add-to-favorites": "Add to Favorites", },
"remove-from-favorites": "Remove from Favorites" "reicpe": {
"no-recipe": "No Recipe"
}, },
"search": { "search": {
"advanced-search": "Advanced Search",
"and": "and", "and": "and",
"exclude": "Exclude", "exclude": "Exclude",
"include": "Include", "include": "Include",
"max-results": "Max Results", "max-results": "Max Results",
"or": "Or", "or": "Or",
"results": "Results",
"search": "Search", "search": "Search",
"search-mealie": "Search Mealie (press /)", "search-mealie": "Search Mealie (press /)",
"search-placeholder": "Search...", "search-placeholder": "Search...",
@ -338,6 +354,8 @@
"secondary": "Secondary", "secondary": "Secondary",
"select-a-theme-from-the-dropdown-or-create-a-new-theme-note-that-the-default-theme-will-be-served-to-all-users-who-have-not-set-a-theme-preference": "Select a theme from the dropdown or create a new theme. Note that the default theme will be served to all users who have not set a theme preference.", "select-a-theme-from-the-dropdown-or-create-a-new-theme-note-that-the-default-theme-will-be-served-to-all-users-who-have-not-set-a-theme-preference": "Select a theme from the dropdown or create a new theme. Note that the default theme will be served to all users who have not set a theme preference.",
"success": "Success", "success": "Success",
"switch-to-dark-mode": "Switch to dark mode",
"switch-to-light-mode": "Switch to light mode",
"theme": "Theme", "theme": "Theme",
"theme-deleted": "Theme deleted", "theme-deleted": "Theme deleted",
"theme-name": "Theme Name", "theme-name": "Theme Name",
@ -345,9 +363,7 @@
"theme-saved": "Theme Saved", "theme-saved": "Theme Saved",
"theme-settings": "Theme Settings", "theme-settings": "Theme Settings",
"theme-updated": "Theme updated", "theme-updated": "Theme updated",
"warning": "Warning", "warning": "Warning"
"switch-to-light-mode": "Switch to light mode",
"switch-to-dark-mode": "Switch to dark mode"
}, },
"token": { "token": {
"active-tokens": "ACTIVE TOKENS", "active-tokens": "ACTIVE TOKENS",

View file

@ -7,7 +7,7 @@
<v-divider class="mx-2"></v-divider> <v-divider class="mx-2"></v-divider>
<v-row> <v-row>
<v-col cols="12" md="5" sm="12"> <v-col cols="12" md="5" sm="12">
<v-card-title class="headline">Main</v-card-title> <v-card-title class="headline">{{ $t('meal-plan.main') }}</v-card-title>
<RecipeCard <RecipeCard
:name="planDay.meals[0].name" :name="planDay.meals[0].name"
:slug="planDay.meals[0].slug" :slug="planDay.meals[0].slug"
@ -15,7 +15,7 @@
/> />
</v-col> </v-col>
<v-col cols="12" lg="6" md="6" sm="12"> <v-col cols="12" lg="6" md="6" sm="12">
<v-card-title class="headline">Sides</v-card-title> <v-card-title class="headline">{{ $t('meal-plan.sides') }}</v-card-title>
<MobileRecipeCard <MobileRecipeCard
class="mb-1" class="mb-1"
v-for="(side, index) in planDay.meals.slice(1)" v-for="(side, index) in planDay.meals.slice(1)"

View file

@ -60,7 +60,7 @@ export const adminRoutes = {
path: "about", path: "about",
component: About, component: About,
meta: { meta: {
title: "general.about", title: "about.about",
}, },
}, },
{ {