More localization (#373)

* Translate missing string

* Display language in original language + English

* Translate assets

* Translate recipe settings
This commit is contained in:
sephrat 2021-04-30 18:44:03 +02:00 committed by GitHub
parent d2e56cf233
commit b302e0ffd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 21 deletions

View file

@ -38,7 +38,7 @@
<v-spacer></v-spacer> <v-spacer></v-spacer>
<base-dialog <base-dialog
@submit="addAsset" @submit="addAsset"
title="New Asset" :title="$t('recipe.new-asset')"
:title-icon="newAsset.icon" :title-icon="newAsset.icon"
> >
<template v-slot:open="{ open }"> <template v-slot:open="{ open }">

View file

@ -12,7 +12,7 @@
<v-card> <v-card>
<v-card-title class="py-2"> <v-card-title class="py-2">
<div> <div>
Recipe Settings {{$t('recipe.recipe-settings')}}
</div> </div>
</v-card-title> </v-card-title>
<v-divider class="mx-2"></v-divider> <v-divider class="mx-2"></v-divider>
@ -39,14 +39,18 @@ export default {
props: { props: {
value: Object, value: Object,
}, },
data: () => ({
labels: { computed: {
public: "Public Recipe", labels() {
showNutrition: "Show Nutrition Values", return {
showAssets: "Show Assets", public: this.$t('recipe.public-recipe'),
landscapeView: "Landscape View (Coming Soon)", showNutrition: this.$t('recipe.show-nutrition-values'),
}, showAssets: this.$t('recipe.show-assets'),
}), landscapeView: this.$t('recipe.landscape-view-coming-soon'),
};
}
},
methods: {}, methods: {},
}; };
</script> </script>

View file

@ -23,11 +23,11 @@
<v-card-actions> <v-card-actions>
<slot name="card-actions"> <slot name="card-actions">
<v-btn text color="grey" @click="dialog = false"> <v-btn text color="grey" @click="dialog = false">
Cancel {{$t('general.cancel')}}
</v-btn> </v-btn>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn color="success" @click="submitEvent"> <v-btn color="success" @click="submitEvent">
Submit {{$t('general.submit')}}
</v-btn> </v-btn>
</slot> </slot>
</v-card-actions> </v-card-actions>

View file

@ -49,7 +49,7 @@ export default {
return [ return [
{ {
icon: "mdi-account", icon: "mdi-account",
title: "Login", title: this.$t('user.login'),
restricted: false, restricted: false,
login: true, login: true,
}, },

View file

@ -180,7 +180,9 @@
"ingredients": "Ingredients", "ingredients": "Ingredients",
"instructions": "Instructions", "instructions": "Instructions",
"key-name-required": "Key Name Required", "key-name-required": "Key Name Required",
"landscape-view-coming-soon": "Landscape View (Coming Soon)",
"milligrams": "milligrams", "milligrams": "milligrams",
"new-asset": "New Asset",
"new-key-name": "New Key Name", "new-key-name": "New Key Name",
"no-white-space-allowed": "No White Space Allowed", "no-white-space-allowed": "No White Space Allowed",
"note": "Note", "note": "Note",
@ -192,15 +194,19 @@
"perform-time": "Cook Time", "perform-time": "Cook Time",
"prep-time": "Prep Time", "prep-time": "Prep Time",
"protein-content": "Protein", "protein-content": "Protein",
"public-recipe": "Public Recipe",
"recipe-created": "Recipe created", "recipe-created": "Recipe created",
"recipe-creation-failed": "Recipe creation failed", "recipe-creation-failed": "Recipe creation failed",
"recipe-deleted": "Recipe deleted", "recipe-deleted": "Recipe deleted",
"recipe-image": "Recipe Image", "recipe-image": "Recipe Image",
"recipe-image-updated": "Recipe image updated", "recipe-image-updated": "Recipe image updated",
"recipe-name": "Recipe Name", "recipe-name": "Recipe Name",
"recipe-settings": "Recipe Settings",
"recipe-update-failed": "Recipe update failed", "recipe-update-failed": "Recipe update failed",
"recipe-updated": "Recipe updated", "recipe-updated": "Recipe updated",
"servings": "Servings", "servings": "Servings",
"show-assets": "Show Assets",
"show-nutrition-values": "Show Nutrition Values",
"sodium-content": "Sodium", "sodium-content": "Sodium",
"step-index": "Step: {step}", "step-index": "Step: {step}",
"sugar-content": "Sugar", "sugar-content": "Sugar",

View file

@ -6,35 +6,35 @@ const state = {
value: "en-US", value: "en-US",
}, },
{ {
name: "Danish", name: "Dansk (Danish)",
value: "da-DK", value: "da-DK",
}, },
{ {
name: "French", name: "Français (French)",
value: "fr-FR", value: "fr-FR",
}, },
{ {
name: "Polish", name: "Polski (Polish)",
value: "pl-PL", value: "pl-PL",
}, },
{ {
name: "Swedish", name: "Svenska (Swedish)",
value: "sv-SE", value: "sv-SE",
}, },
{ {
name: "简体中文", name: "简体中文 (Chinese simplified)",
value: "zh-CN", value: "zh-CN",
}, },
{ {
name: "繁體中文", name: "繁體中文 (Chinese traditional)",
value: "zh-TW", value: "zh-TW",
}, },
{ {
name: "German", name: "Deutsch (German)",
value: "de-DE", value: "de-DE",
}, },
{ {
name: "Português", name: "Português (Portuguese)",
value: "pt-PT", value: "pt-PT",
}, },
], ],