translation

This commit is contained in:
Hayden 2021-01-17 14:57:09 -09:00
commit 46cd62059a
3 changed files with 24 additions and 27 deletions

View file

@ -1,19 +1,25 @@
<template>
<v-card :loading="loading">
<v-card-title> Create a Backup </v-card-title>
<v-card-title> {{ $t("settings.backup.create-heading") }} </v-card-title>
<v-card-text class="mt-n3">
<v-text-field dense label="Backup Tag" v-model="tag"></v-text-field>
<v-text-field
dense
:label="$t('settings.backup.backup-tag')"
v-model="tag"
></v-text-field>
</v-card-text>
<v-card-actions class="mt-n9">
<v-switch v-model="fullBackup" :label="switchLabel"></v-switch>
<v-spacer></v-spacer>
<v-btn color="success" text @click="createBackup()"> Create </v-btn>
<v-btn color="success" text @click="createBackup()">
{{ $t("general.create") }}
</v-btn>
</v-card-actions>
<v-card-text v-if="!fullBackup" class="mt-n6">
<v-row>
<v-col sm="4">
<p>Options:</p>
<p>{{ $t("general.options") }}:</p>
<v-checkbox
v-for="option in options"
:key="option.text"
@ -24,7 +30,7 @@
></v-checkbox>
</v-col>
<v-col>
<p>Templates:</p>
<p>{{ $t("general.templates") }}:</p>
<v-checkbox
v-for="template in availableTemplates"
:key="template"
@ -50,15 +56,15 @@ export default {
options: {
recipes: {
value: true,
text: "Recipes",
text: this.$t("general.recipes"),
},
settings: {
value: true,
text: "Settings",
text: this.$t("general.settings"),
},
themes: {
value: true,
text: "Themes",
text: this.$t("general.themes"),
},
},
availableTemplates: [],

View file

@ -16,7 +16,7 @@
</p>
</v-col>
</v-row>
<v-divider class="mb-3"></v-divider>
<v-divider class="my-3"></v-divider>
<AvailableBackupCard
@loading="backupLoading = true"
@ -50,11 +50,7 @@ export default {
failedImports: [],
successfulImports: [],
backupLoading: false,
backupTag: null,
selectedBackup: null,
selectedTemplate: null,
availableBackups: [],
availableTemplates: [],
};
},
mounted() {
@ -77,17 +73,6 @@ export default {
this.backupLoading = false;
}
},
async createBackup() {
this.backupLoading = true;
let response = await api.backups.create(this.backupTag, this.templates);
if (response.status == 201) {
this.selectedBackup = null;
this.getAvailableBackups();
this.backupLoading = false;
}
},
processFinished(successful = null, failed = null) {
this.getAvailableBackups();
this.backupLoading = false;

View file

@ -29,7 +29,11 @@
"enabled": "Enabled",
"download": "Download",
"import": "Import",
"delete-data": "Delete Data"
"delete-data": "Delete Data",
"options": "Options",
"templates": "Templates",
"recipes": "Recipes",
"themes": "Themes"
},
"login": {
"stay-logged-in": "Stay logged in?",
@ -113,7 +117,9 @@
"backup": {
"import-recipes": "Import Recipes",
"import-themes": "Import Themes",
"import-settings": "Import Settings"
"import-settings": "Import Settings",
"create-heading": "Create a Backup",
"backup-tag": "Backup Tag"
}
},
"migration": {