Translate new tiles in profile page

This commit is contained in:
Florian Dupret 2021-05-07 09:05:44 +02:00
commit a0170d1e8e
3 changed files with 37 additions and 22 deletions

View file

@ -9,6 +9,7 @@
"api-port": "API Port", "api-port": "API Port",
"application-mode": "Application Mode", "application-mode": "Application Mode",
"database-type": "Database Type", "database-type": "Database Type",
"database-url": "Database URL",
"default-group": "Default Group", "default-group": "Default Group",
"demo": "Demo", "demo": "Demo",
"demo-status": "Demo Status", "demo-status": "Demo Status",
@ -17,18 +18,17 @@
"download-recipe-json": "Last Scraped JSON", "download-recipe-json": "Last Scraped JSON",
"not-demo": "Not Demo", "not-demo": "Not Demo",
"production": "Production", "production": "Production",
"database-url": "Database URL",
"version": "Version" "version": "Version"
}, },
"category": { "category": {
"category": "Category",
"category-created": "Category created", "category-created": "Category created",
"category-creation-failed": "Category creation failed", "category-creation-failed": "Category creation failed",
"category-deleted": "Category Deleted", "category-deleted": "Category Deleted",
"category-deletion-failed": "Category deletion failed", "category-deletion-failed": "Category deletion failed",
"category-filter": "Category Filter", "category-filter": "Category Filter",
"category-update-failed": "Category update failed", "category-update-failed": "Category update failed",
"category-updated": "Category updated", "category-updated": "Category updated"
"category": "Category"
}, },
"general": { "general": {
"apply": "Apply", "apply": "Apply",
@ -61,11 +61,12 @@
"link": "Link", "link": "Link",
"monday": "Monday", "monday": "Monday",
"name": "Name", "name": "Name",
"new": "New",
"no": "No", "no": "No",
"ok": "OK", "ok": "OK",
"options": "Options:", "options": "Options:",
"rating": "Rating",
"random": "Random", "random": "Random",
"rating": "Rating",
"recent": "Recent", "recent": "Recent",
"recipes": "Recipes", "recipes": "Recipes",
"rename-object": "Rename {0}", "rename-object": "Rename {0}",
@ -73,13 +74,13 @@
"saturday": "Saturday", "saturday": "Saturday",
"save": "Save", "save": "Save",
"settings": "Settings", "settings": "Settings",
"shuffle": "Shuffle",
"sort": "Sort", "sort": "Sort",
"sort-alphabetically": "Alphabetical", "sort-alphabetically": "Alphabetical",
"status": "Status", "status": "Status",
"submit": "Submit", "submit": "Submit",
"success-count": "Success: {count}", "success-count": "Success: {count}",
"sunday": "Sunday", "sunday": "Sunday",
"shuffle": "Shuffle",
"templates": "Templates:", "templates": "Templates:",
"themes": "Themes", "themes": "Themes",
"thursday": "Thursday", "thursday": "Thursday",
@ -116,15 +117,18 @@
"create-a-new-meal-plan": "Create a New Meal Plan", "create-a-new-meal-plan": "Create a New Meal Plan",
"dinner-this-week": "Dinner This Week", "dinner-this-week": "Dinner This Week",
"dinner-today": "Dinner Today", "dinner-today": "Dinner Today",
"dinner-tonight": "DINNER TONIGHT",
"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)",
"meal-planner": "Meal Planner", "meal-planner": "Meal Planner",
"meal-plans": "Meal Plans", "meal-plans": "Meal Plans",
"mealplan-categories": "MEALPLAN CATEGORIES",
"mealplan-created": "Mealplan created", "mealplan-created": "Mealplan created",
"mealplan-creation-failed": "Mealplan creation failed", "mealplan-creation-failed": "Mealplan creation failed",
"mealplan-deleted": "Mealplan Deleted", "mealplan-deleted": "Mealplan Deleted",
"mealplan-deletion-failed": "Mealplan deletion failed", "mealplan-deletion-failed": "Mealplan deletion failed",
"mealplan-settings": "Mealplan Settings",
"mealplan-update-failed": "Mealplan update failed", "mealplan-update-failed": "Mealplan update failed",
"mealplan-updated": "Mealplan Updated", "mealplan-updated": "Mealplan Updated",
"no-meal-plan-defined-yet": "No meal plan defined yet", "no-meal-plan-defined-yet": "No meal plan defined yet",
@ -305,6 +309,14 @@
"theme-updated": "Theme updated", "theme-updated": "Theme updated",
"warning": "Warning" "warning": "Warning"
}, },
"token": {
"active-tokens": "ACTIVE TOKENS",
"api-token": "API Token",
"api-tokens": "API Tokens",
"copy-this-token-for-use-with-an-external-application-this-token-will-not-be-viewable-again": "Copy this token for use with an external application. This token will not be viewable again.",
"create-an-api-token": "Create an API Token",
"token-name": "Token Name"
},
"toolbox": { "toolbox": {
"assign-all": "Assign All", "assign-all": "Assign All",
"bulk-assign": "Bulk Assign", "bulk-assign": "Bulk Assign",
@ -319,7 +331,8 @@
"meal-planner-webhooks": "Meal Planner Webhooks", "meal-planner-webhooks": "Meal Planner Webhooks",
"test-webhooks": "Test Webhooks", "test-webhooks": "Test Webhooks",
"the-urls-listed-below-will-recieve-webhooks-containing-the-recipe-data-for-the-meal-plan-on-its-scheduled-day-currently-webhooks-will-execute-at": "The URLs listed below will receive webhooks containing the recipe data for the meal plan on it's scheduled day. Currently Webhooks will execute at", "the-urls-listed-below-will-recieve-webhooks-containing-the-recipe-data-for-the-meal-plan-on-its-scheduled-day-currently-webhooks-will-execute-at": "The URLs listed below will receive webhooks containing the recipe data for the meal plan on it's scheduled day. Currently Webhooks will execute at",
"webhook-url": "Webhook URL" "webhook-url": "Webhook URL",
"webhooks-caps": "WEBHOOKS"
} }
}, },
"signup": { "signup": {
@ -377,6 +390,7 @@
"total-users": "Total Users", "total-users": "Total Users",
"upload-photo": "Upload Photo", "upload-photo": "Upload Photo",
"use-8-characters-or-more-for-your-password": "Use 8 characters or more for your password", "use-8-characters-or-more-for-your-password": "Use 8 characters or more for your password",
"user": "User",
"user-created": "User created", "user-created": "User created",
"user-creation-failed": "User creation failed", "user-creation-failed": "User creation failed",
"user-deleted": "User deleted", "user-deleted": "User deleted",
@ -390,7 +404,6 @@
"webhook-time": "Webhook Time", "webhook-time": "Webhook Time",
"webhooks-enabled": "Webhooks Enabled", "webhooks-enabled": "Webhooks Enabled",
"you-are-not-allowed-to-create-a-user": "You are not allowed to create a user", "you-are-not-allowed-to-create-a-user": "You are not allowed to create a user",
"you-are-not-allowed-to-delete-this-user": "You are not allowed to delete this user", "you-are-not-allowed-to-delete-this-user": "You are not allowed to delete this user"
"user": "User"
} }
} }

View file

@ -2,14 +2,16 @@
<StatCard icon="mdi-api" color="accent"> <StatCard icon="mdi-api" color="accent">
<template v-slot:after-heading> <template v-slot:after-heading>
<div class="ml-auto text-right"> <div class="ml-auto text-right">
<div class="body-3 grey--text font-weight-light" v-text="'API Tokens'" /> <h2 class="body-3 grey--text font-weight-light">
{{$t('settings.token.api-tokens')}}
</h2>
<h3 class="display-2 font-weight-light text--primary"> <h3 class="display-2 font-weight-light text--primary">
<small> {{ user.tokens.length }} </small> <small> {{ user.tokens.length }} </small>
</h3> </h3>
</div> </div>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<v-subheader class="mb-n2">ACTIVE TOKENS</v-subheader> <v-subheader class="mb-n2">{{$t('settings.token.active-tokens')}}</v-subheader>
<v-virtual-scroll height="210" item-height="70" :items="user.tokens" class="mt-2"> <v-virtual-scroll height="210" item-height="70" :items="user.tokens" class="mt-2">
<template v-slot:default="{ item }"> <template v-slot:default="{ item }">
<v-divider></v-divider> <v-divider></v-divider>
@ -38,7 +40,7 @@
<v-card-actions class="pb-1 pt-3"> <v-card-actions class="pb-1 pt-3">
<v-spacer></v-spacer> <v-spacer></v-spacer>
<BaseDialog <BaseDialog
:title="'Create an API Token'" :title="$t('settings.token.create-an-api-token')"
title-icon="mdi-api" title-icon="mdi-api"
@submit="createToken" @submit="createToken"
:submit-text="buttonText" :submit-text="buttonText"
@ -46,13 +48,13 @@
> >
<v-card-text> <v-card-text>
<v-form ref="newTokenForm"> <v-form ref="newTokenForm">
<v-text-field v-model="name" label="Token Name" required> </v-text-field> <v-text-field v-model="name" :label="$t('settings.token.token-name')" required> </v-text-field>
</v-form> </v-form>
<div v-if="createdToken != ''"> <div v-if="createdToken != ''">
<v-textarea <v-textarea
class="mb-0 pb-0" class="mb-0 pb-0"
label="API Token" :label="$t('settings.token.api-token')"
readonly readonly
v-model="createdToken" v-model="createdToken"
append-outer-icon="mdi-content-copy" append-outer-icon="mdi-content-copy"
@ -60,7 +62,7 @@
> >
</v-textarea> </v-textarea>
<v-subheader class="text-center"> <v-subheader class="text-center">
Copy this token for use with an external application. This token will not be viewable again. {{$t('settings.token.copy-this-token-for-use-with-an-external-application-this-token-will-not-be-viewable-again')}}
</v-subheader> </v-subheader>
</div> </div>
</v-card-text> </v-card-text>
@ -107,9 +109,9 @@ export default {
}, },
buttonText() { buttonText() {
if (this.createdToken === "") { if (this.createdToken === "") {
return "Create"; return this.$t('general.create');
} else { } else {
return "Close"; return this.$t('general.close');
} }
}, },
}, },

View file

@ -11,7 +11,7 @@
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<div v-if="todaysMeal"> <div v-if="todaysMeal">
<v-subheader>DINNER TONIGHT</v-subheader> <v-subheader>{{$t('meal-plan.dinner-tonight')}}</v-subheader>
<MobileRecipeCard <MobileRecipeCard
:name="todaysMeal.name" :name="todaysMeal.name"
:slug="todaysMeal.slug" :slug="todaysMeal.slug"
@ -48,12 +48,12 @@
<v-icon x-large> <v-icon x-large>
mdi-food-variant mdi-food-variant
</v-icon> </v-icon>
<small> Mealplan Settings </small> <small> {{$t('meal-plan.mealplan-settings')}} </small>
</h3> </h3>
</div> </div>
<v-divider></v-divider> <v-divider></v-divider>
<v-subheader>MEALPLAN CATEGORIES</v-subheader> <v-subheader>{{$t('meal-plan.mealplan-categories')}}</v-subheader>
<v-card-text class="mt-0 pt-0"> <v-card-text class="mt-0 pt-0">
{{ $t("meal-plan.only-recipes-with-these-categories-will-be-used-in-meal-plans") }} {{ $t("meal-plan.only-recipes-with-these-categories-will-be-used-in-meal-plans") }}
</v-card-text> </v-card-text>
@ -66,7 +66,7 @@
/> />
<v-divider></v-divider> <v-divider></v-divider>
<v-subheader>WEBHOOKS</v-subheader> <v-subheader>{{$t('settings.webhooks.webhooks-caps')}}</v-subheader>
<v-card-text class="mt-0 pt-0"> <v-card-text class="mt-0 pt-0">
{{ {{
$t( $t(
@ -93,7 +93,7 @@
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn small color="success" @click="addWebhook"> <v-btn small color="success" @click="addWebhook">
<v-icon left> mdi-webhook </v-icon> <v-icon left> mdi-webhook </v-icon>
New {{$t('general.new')}}
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
</v-card-text> </v-card-text>