More localization (#348)

* Translate about page

* Sort messages by keys

* Remove unused strings

* Localize date in meal planner

* Fix quick week not starting on Monday for UTC+x
This commit is contained in:
sephrat 2021-04-24 22:16:07 +02:00 committed by GitHub
parent 21d2fb4b93
commit cfbf51072b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 236 additions and 249 deletions

View File

@ -143,10 +143,10 @@ export default {
return dateDif;
},
startComputedDateFormatted() {
return this.formatDate(this.startDate);
return this.formatDate(this.actualStartDate);
},
endComputedDateFormatted() {
return this.formatDate(this.endDate);
return this.formatDate(this.actualEndDate);
},
filteredRecipes() {
const recipes = this.items.filter(x => !this.usedRecipes.includes(x));
@ -210,14 +210,7 @@ export default {
formatDate(date) {
if (!date) return null;
const [year, month, day] = date.split("-");
return `${month}/${day}/${year}`;
},
parseDate(date) {
if (!date) return null;
const [month, day, year] = date.split("/");
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
return this.$d(date);
},
getNextDayOfTheWeek(dayName, excludeToday = true, refDate = new Date()) {
const dayOfWeek = [
@ -230,7 +223,7 @@ export default {
"sat",
].indexOf(dayName.slice(0, 3).toLowerCase());
if (dayOfWeek < 0) return;
refDate.setHours(0, 0, 0, 0);
refDate.setUTCHours(0, 0, 0, 0);
refDate.setDate(
refDate.getDate() +
+!!excludeToday +

View File

@ -3,273 +3,267 @@
"page-not-found": "404 Page Not Found",
"take-me-home": "Take me Home"
},
"new-recipe": {
"from-url": "Import a Recipe",
"recipe-url": "Recipe URL",
"url-form-hint": "Copy and paste a link from your favorite recipe website",
"error-message": "Looks like there was an error parsing the URL. Check the log and debug/last_recipe.json to see what went wrong.",
"bulk-add": "Bulk Add",
"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"
"about": {
"about-mealie": "About Mealie",
"api-docs": "API Docs",
"api-port": "API Port",
"application-mode": "Application Mode",
"database-type": "Database Type",
"default-group": "Default Group",
"demo": "Demo",
"demo-status": "Demo Status",
"development": "Development",
"not-demo": "Not Demo",
"production": "Production",
"sqlite-file": "SQLite File",
"version": "Version"
},
"general": {
"upload": "Upload",
"submit": "Submit",
"name": "Name",
"settings": "Settings",
"close": "Close",
"save": "Save",
"image-file": "Image File",
"update": "Update",
"edit": "Edit",
"delete": "Delete",
"select": "Select",
"random": "Random",
"new": "New",
"create": "Create",
"cancel": "Cancel",
"ok": "OK",
"enabled": "Enabled",
"download": "Download",
"import": "Import",
"options": "Options",
"templates": "Templates",
"recipes": "Recipes",
"themes": "Themes",
"confirm": "Confirm",
"sort": "Sort",
"recent": "Recent",
"sort-alphabetically": "A-Z",
"reset": "Reset",
"filter": "Filter",
"yes": "Yes",
"no": "No",
"token": "Token",
"field-required": "Field Required",
"apply": "Apply",
"cancel": "Cancel",
"close": "Close",
"confirm": "Confirm",
"create": "Create",
"current-parenthesis": "(Current)",
"users": "Users",
"groups": "Groups",
"sunday": "Sunday",
"monday": "Monday",
"tuesday": "Tuesday",
"wednesday": "Wednesday",
"thursday": "Thursday",
"delete": "Delete",
"disabled": "Disabled",
"download": "Download",
"edit": "Edit",
"enabled": "Enabled",
"field-required": "Field Required",
"filter": "Filter",
"friday": "Friday",
"saturday": "Saturday",
"about": "About",
"get": "Get",
"url": "URL"
},
"page": {
"home-page": "Home Page",
"all-recipes": "All Recipes",
"recent": "Recent"
},
"user": {
"stay-logged-in": "Stay logged in?",
"email": "Email",
"password": "Password",
"sign-in": "Sign in",
"sign-up": "Sign up",
"logout": "Logout",
"full-name": "Full Name",
"user-group": "User Group",
"user-password": "User Password",
"admin": "Admin",
"user-id": "User ID",
"user-id-with-value": "User ID: {id}",
"group": "Group",
"new-user": "New User",
"edit-user": "Edit User",
"create-user": "Create User",
"confirm-user-deletion": "Confirm User Deletion",
"are-you-sure-you-want-to-delete-the-user": "Are you sure you want to delete the user <b>{activeName} ID: {activeId}<b/>?",
"confirm-group-deletion": "Confirm Group Deletion",
"total-users": "Total Users",
"total-mealplans": "Total MealPlans",
"webhooks-enabled": "Webhooks Enabled",
"webhook-time": "Webhook Time",
"create-group": "Create Group",
"sign-up-links": "Sign Up Links",
"create-link": "Create Link",
"link-name": "Link Name",
"group-id-with-value": "Group ID: {groupID}",
"are-you-sure-you-want-to-delete-the-group": "Are you sure you want to delete <b>{groupName}<b/>?",
"group-name": "Group Name",
"confirm-link-deletion": "Confirm Link Deletion",
"are-you-sure-you-want-to-delete-the-link": "Are you sure you want to delete the link <b>{link}<b/>?",
"link-id": "Link ID",
"users": "Users",
"groups": "Groups",
"could-not-validate-credentials": "Could Not Validate Credentials",
"login": "Login",
"groups-can-only-be-set-by-administrators": "Groups can only be set by administrators",
"upload-photo": "Upload Photo",
"reset-password": "Reset Password",
"current-password": "Current Password",
"new-password": "New Password",
"confirm-password": "Confirm Password",
"password-must-match": "Password must match",
"e-mail-must-be-valid": "E-mail must be valid",
"use-8-characters-or-more-for-your-password": "Use 8 characters or more for your password"
"import": "Import",
"monday": "Monday",
"name": "Name",
"no": "No",
"ok": "OK",
"options": "Options",
"random": "Random",
"recent": "Recent",
"recipes": "Recipes",
"reset": "Reset",
"saturday": "Saturday",
"save": "Save",
"settings": "Settings",
"sort": "Sort",
"sort-alphabetically": "A-Z",
"submit": "Submit",
"sunday": "Sunday",
"templates": "Templates",
"themes": "Themes",
"thursday": "Thursday",
"token": "Token",
"tuesday": "Tuesday",
"update": "Update",
"upload": "Upload",
"url": "URL",
"users": "Users",
"wednesday": "Wednesday",
"yes": "Yes"
},
"meal-plan": {
"shopping-list": "Shopping List",
"dinner-this-week": "Dinner This Week",
"meal-planner": "Meal Planner",
"dinner-today": "Dinner Today",
"planner": "Planner",
"edit-meal-plan": "Edit Meal Plan",
"meal-plans": "Meal Plans",
"create-a-new-meal-plan": "Create a New Meal Plan",
"start-date": "Start Date",
"dinner-this-week": "Dinner This Week",
"dinner-today": "Dinner Today",
"edit-meal-plan": "Edit Meal Plan",
"end-date": "End Date",
"group": "Group (Beta)",
"meal-planner": "Meal Planner",
"meal-plans": "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",
"quick-week": "Quick Week",
"group": "Group (Beta)"
"shopping-list": "Shopping List",
"start-date": "Start Date"
},
"migration": {
"chowdown": {
"description": "Migrate data from Chowdown",
"title": "Chowdown"
},
"nextcloud": {
"description": "Migrate data from a Nextcloud Cookbook intance",
"title": "Nextcloud Cookbook"
},
"no-migration-data-available": "No Migration Data Avaiable",
"recipe-migration": "Recipe Migration"
},
"new-recipe": {
"bulk-add": "Bulk Add",
"error-message": "Looks like there was an error parsing the URL. Check the log and debug/last_recipe.json to see what went wrong.",
"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",
"recipe-url": "Recipe URL",
"url-form-hint": "Copy and paste a link from your favorite recipe website"
},
"page": {
"all-recipes": "All Recipes",
"home-page": "Home Page",
"recent": "Recent"
},
"recipe": {
"description": "Description",
"ingredients": "Ingredients",
"categories": "Categories",
"tags": "Tags",
"instructions": "Instructions",
"step-index": "Step: {step}",
"recipe-name": "Recipe Name",
"servings": "Servings",
"ingredient": "Ingredient",
"notes": "Notes",
"note": "Note",
"original-url": "Original URL",
"view-recipe": "View Recipe",
"title": "Title",
"total-time": "Total Time",
"prep-time": "Prep Time",
"perform-time": "Cook Time",
"api-extras": "API Extras",
"object-key": "Object Key",
"object-value": "Object Value",
"new-key-name": "New Key Name",
"add-key": "Add Key",
"key-name-required": "Key Name Required",
"no-white-space-allowed": "No White Space Allowed",
"delete-recipe": "Delete Recipe",
"delete-confirmation": "Are you sure you want to delete this recipe?",
"nutrition": "Nutrition",
"api-extras": "API Extras",
"calories": "Calories",
"calories-suffix": "calories",
"categories": "Categories",
"delete-confirmation": "Are you sure you want to delete this recipe?",
"delete-recipe": "Delete Recipe",
"description": "Description",
"fat-content": "Fat Content",
"fiber-content": "Fiber Content",
"protein-content": "Protein Content",
"sodium-content": "Sodium Content",
"sugar-content": "Sugar Content",
"grams": "grams",
"image": "Image",
"ingredient": "Ingredient",
"ingredients": "Ingredients",
"instructions": "Instructions",
"key-name-required": "Key Name Required",
"milligrams": "milligrams",
"new-key-name": "New Key Name",
"no-white-space-allowed": "No White Space Allowed",
"note": "Note",
"notes": "Notes",
"nutrition": "Nutrition",
"object-key": "Object Key",
"object-value": "Object Value",
"original-url": "Original URL",
"perform-time": "Cook Time",
"prep-time": "Prep Time",
"protein-content": "Protein Content",
"recipe-image": "Recipe Image",
"image": "Image"
"recipe-name": "Recipe Name",
"servings": "Servings",
"sodium-content": "Sodium Content",
"step-index": "Step: {step}",
"sugar-content": "Sugar Content",
"tags": "Tags",
"title": "Title",
"total-time": "Total Time",
"view-recipe": "View Recipe"
},
"search": {
"and": "And",
"category-filter": "Category Filter",
"exclude": "Exclude",
"include": "Include",
"max-results": "Max Results",
"or": "Or",
"search": "Search",
"search-mealie": "Search Mealie",
"search-placeholder": "Search...",
"max-results": "Max Results",
"category-filter": "Category Filter",
"tag-filter": "Tag Filter",
"include": "Include",
"exclude": "Exclude",
"and": "And",
"or": "Or",
"search": "Search"
"tag-filter": "Tag Filter"
},
"settings": {
"general-settings": "General Settings",
"change-password": "Change Password",
"admin-settings": "Admin Settings",
"local-api": "Local API",
"language": "Language",
"add-a-new-theme": "Add a New Theme",
"set-new-time": "Set New Time",
"current": "Version:",
"latest": "Latest",
"explore-the-docs": "Explore the Docs",
"contribute": "Contribute",
"admin-settings": "Admin Settings",
"available-backups": "Available Backups",
"backup": {
"backup-tag": "Backup Tag",
"create-heading": "Create a Backup",
"full-backup": "Full Backup",
"partial-backup": "Partial Backup"
},
"backup-and-exports": "Backups",
"backup-info": "Backups are exported in standard JSON format along with all the images stored on the file system. In your backup folder you'll find a .zip file that contains all of the recipe JSON and images from the database. Additionally, if you selected a markdown file, those will also be stored in the .zip file. To import a backup, it must be located in your backups folder. Automated backups are done each day at 3:00 AM.",
"available-backups": "Available Backups",
"change-password": "Change Password",
"current": "Version:",
"custom-pages": "Custom Pages",
"edit-page": "Edit Page",
"first-day-of-week": "First day of the week",
"homepage": {
"all-categories": "All Categories",
"card-per-section": "Card Per Section",
"home-page": "Home Page",
"home-page-sections": "Home Page Sections",
"show-recent": "Show Recent"
},
"language": "Language",
"latest": "Latest",
"local-api": "Local API",
"locale-settings": "Locale settings",
"manage-users": "Manage Users",
"migrations": "Migrations",
"new-page": "New Page",
"page-name": "Page Name",
"profile": "Profile",
"remove-existing-entries-matching-imported-entries": "Remove existing entries matching imported entries",
"set-new-time": "Set New Time",
"site-settings": "Site Settings",
"theme": {
"theme-name": "Theme Name",
"theme-settings": "Theme Settings",
"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.",
"dark-mode": "Dark Mode",
"theme-is-required": "Theme is required",
"primary": "Primary",
"secondary": "Secondary",
"accent": "Accent",
"success": "Success",
"info": "Info",
"warning": "Warning",
"error": "Error",
"default-to-system": "Default to system",
"light": "Light",
"dark": "Dark",
"theme": "Theme",
"saved-color-theme": "Saved Color Theme",
"delete-theme": "Delete Theme",
"are-you-sure-you-want-to-delete-this-theme": "Are you sure you want to delete this theme?",
"choose-how-mealie-looks-to-you-set-your-theme-preference-to-follow-your-system-settings-or-choose-to-use-the-light-or-dark-theme": "Choose how Mealie looks to you. Set your theme preference to follow your system settings, or choose to use the light or dark theme.",
"theme-name-is-required": "Theme Name is required."
"dark": "Dark",
"dark-mode": "Dark Mode",
"default-to-system": "Default to system",
"delete-theme": "Delete Theme",
"error": "Error",
"info": "Info",
"light": "Light",
"primary": "Primary",
"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.",
"success": "Success",
"theme": "Theme",
"theme-name": "Theme Name",
"theme-name-is-required": "Theme Name is required.",
"theme-settings": "Theme Settings",
"warning": "Warning"
},
"webhooks": {
"meal-planner-webhooks": "Meal Planner 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",
"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",
"webhook-url": "Webhook URL"
},
"new-version-available": "A New Version of Mealie is Available, <a {aContents}> Visit the Repo </a>",
"backup": {
"import-recipes": "Import Recipes",
"import-themes": "Import Themes",
"import-settings": "Import Settings",
"create-heading": "Create a Backup",
"backup-tag": "Backup Tag",
"full-backup": "Full Backup",
"partial-backup": "Partial Backup",
"backup-restore-report": "Backup Restore Report",
"successfully-imported": "Successfully Imported",
"failed-imports": "Failed Imports"
},
"homepage": {
"card-per-section": "Card Per Section",
"homepage-categories": "Homepage Categories",
"home-page": "Home Page",
"all-categories": "All Categories",
"show-recent": "Show Recent",
"home-page-sections": "Home Page Sections"
},
"site-settings": "Site Settings",
"manage-users": "Manage Users",
"migrations": "Migrations",
"profile": "Profile",
"locale-settings": "Locale settings",
"first-day-of-week": "First day of the week",
"custom-pages": "Custom Pages",
"new-page": "New Page",
"edit-page": "Edit Page",
"page-name": "Page Name",
"remove-existing-entries-matching-imported-entries": "Remove existing entries matching imported entries"
},
"migration": {
"recipe-migration": "Recipe Migration",
"failed-imports": "Failed Imports",
"migration-report": "Migration Report",
"successful-imports": "Successful Imports",
"no-migration-data-available": "No Migration Data Avaiable",
"nextcloud": {
"title": "Nextcloud Cookbook",
"description": "Migrate data from a Nextcloud Cookbook intance"
},
"chowdown": {
"title": "Chowdown",
"description": "Migrate data from Chowdown"
}
},
"user": {
"admin": "Admin",
"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-link": "Are you sure you want to delete the link <b>{link}<b/>?",
"are-you-sure-you-want-to-delete-the-user": "Are you sure you want to delete the user <b>{activeName} ID: {activeId}<b/>?",
"confirm-group-deletion": "Confirm Group Deletion",
"confirm-link-deletion": "Confirm Link Deletion",
"confirm-password": "Confirm Password",
"confirm-user-deletion": "Confirm User Deletion",
"could-not-validate-credentials": "Could Not Validate Credentials",
"create-group": "Create Group",
"create-link": "Create Link",
"create-user": "Create User",
"current-password": "Current Password",
"e-mail-must-be-valid": "E-mail must be valid",
"edit-user": "Edit User",
"email": "Email",
"full-name": "Full Name",
"group": "Group",
"group-id-with-value": "Group ID: {groupID}",
"group-name": "Group Name",
"groups": "Groups",
"groups-can-only-be-set-by-administrators": "Groups can only be set by administrators",
"link-id": "Link ID",
"link-name": "Link Name",
"login": "Login",
"logout": "Logout",
"new-password": "New Password",
"new-user": "New User",
"password": "Password",
"password-must-match": "Password must match",
"reset-password": "Reset Password",
"sign-in": "Sign in",
"sign-up-links": "Sign Up Links",
"total-mealplans": "Total MealPlans",
"total-users": "Total Users",
"upload-photo": "Upload Photo",
"use-8-characters-or-more-for-your-password": "Use 8 characters or more for your password",
"user-group": "User Group",
"user-id": "User ID",
"user-id-with-value": "User ID: {id}",
"user-password": "User Password",
"users": "Users",
"webhook-time": "Webhook Time",
"webhooks-enabled": "Webhooks Enabled"
}
}

View File

@ -2,7 +2,7 @@
<div>
<v-card class="mt-3">
<v-card-title class="headline">
About Mealie
{{$t('about.about-mealie')}}
</v-card-title>
<v-divider></v-divider>
<v-card-text>
@ -55,42 +55,42 @@ export default {
this.prettyInfo = [
{
name: "Version",
name: this.$t('about.version'),
icon: "mdi-information",
value: debugInfo.version,
},
{
name: "Application Mode",
name: this.$t('about.application-mode'),
icon: "mdi-dev-to",
value: debugInfo.production ? "Production" : "Development",
value: debugInfo.production ? this.$t('about.production') : this.$t('about.development'),
},
{
name: "Demo Status",
name: this.$t('about.demo-status'),
icon: "mdi-test-tube",
value: debugInfo.demoStatus ? "Demo" : "Not Demo",
value: debugInfo.demoStatus ? this.$t('about.demo') : this.$t('about.not-demo'),
},
{
name: "API Port",
name: this.$t('about.api-port'),
icon: "mdi-api",
value: debugInfo.apiPort,
},
{
name: "API Docs",
name: this.$t('about.api-docs'),
icon: "mdi-file-document",
value: debugInfo.apiDocs ? "Enabled" : "Disabled",
value: debugInfo.apiDocs ? this.$t('general.enabled') : this.$t('general.disabled'),
},
{
name: "Database Type",
name: this.$t('about.database-type'),
icon: "mdi-database",
value: debugInfo.dbType,
},
{
name: "SQLite File",
name: this.$t('about.sqlite-file'),
icon: "mdi-file-cabinet",
value: debugInfo.sqliteFile,
},
{
name: "Default Group",
name: this.$t('about.default-group'),
icon: "mdi-account-group",
value: debugInfo.defaultGroup,
},