Add translations (#562)
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/562 Co-authored-by: konrad <konrad@kola-entertainments.de> Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -3,13 +3,12 @@
|
||||
@close="$router.back()"
|
||||
@submit="archiveNamespace()"
|
||||
>
|
||||
<span slot="header">{{ namespace.isArchived ? 'Un-' : '' }}Archive this namespace</span>
|
||||
<span slot="header">{{ title }}</span>
|
||||
<p slot="text" v-if="namespace.isArchived">
|
||||
You will be able to create new lists or edit it.
|
||||
{{ $t('namespace.archive.unarchiveText') }}
|
||||
</p>
|
||||
<p slot="text" v-else>
|
||||
You won't be able to edit this namespace or create new list until you un-archive it.<br/>
|
||||
This will also archive all lists in this namespace.
|
||||
{{ $t('namespace.archive.archiveText') }}
|
||||
</p>
|
||||
</modal>
|
||||
</template>
|
||||
@ -23,12 +22,16 @@ export default {
|
||||
return {
|
||||
namespaceService: NamespaceService,
|
||||
namespace: null,
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.namespaceService = new NamespaceService()
|
||||
this.namespace = this.$store.getters['namespaces/getNamespaceById'](this.$route.params.id)
|
||||
this.setTitle(`Archive "${this.namespace.title}"`)
|
||||
this.title = this.namespace.isArchived ?
|
||||
this.$t('namespace.archive.titleUnarchive', { namespace: this.namespace.title }) :
|
||||
this.$t('namespace.archive.titleArchive', { namespace: this.namespace.title })
|
||||
this.setTitle(this.title)
|
||||
},
|
||||
methods: {
|
||||
archiveNamespace() {
|
||||
@ -38,7 +41,7 @@ export default {
|
||||
this.namespaceService.update(this.namespace)
|
||||
.then(r => {
|
||||
this.$store.commit('namespaces/setNamespaceById', r)
|
||||
this.success({message: 'The namespace was successfully archived.'})
|
||||
this.success({message: this.$t('namespace.archive.success')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
|
@ -3,9 +3,11 @@
|
||||
@close="$router.back()"
|
||||
@submit="deleteNamespace()"
|
||||
>
|
||||
<span slot="header">Delete this namespace</span>
|
||||
<p slot="text">Are you sure you want to delete this namespace and all of its contents?
|
||||
<br/>This includes all tasks and <b>CANNOT BE UNDONE!</b></p>
|
||||
<span slot="header">{{ title }}</span>
|
||||
<p slot="text">
|
||||
{{ $t('namespace.delete.text1') }}<br/>
|
||||
{{ $t('namespace.delete.text2') }}
|
||||
</p>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
@ -17,13 +19,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
namespaceService: NamespaceService,
|
||||
title: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.namespaceService = new NamespaceService()
|
||||
|
||||
const namespace = this.$store.getters['namespaces/getNamespaceById'](this.$route.params.id)
|
||||
this.setTitle(`Delete "${namespace.title}"`)
|
||||
this.title = this.$t('namespace.delete.title', {namespace: namespace.title})
|
||||
this.setTitle(this.title)
|
||||
},
|
||||
methods: {
|
||||
deleteNamespace() {
|
||||
@ -31,7 +35,7 @@ export default {
|
||||
|
||||
this.$store.dispatch('namespaces/deleteNamespace', namespace)
|
||||
.then(() => {
|
||||
this.success({message: 'The namespace was successfully deleted.'})
|
||||
this.success({message: this.$t('namespace.delete.success')})
|
||||
this.$router.push({name: 'home'})
|
||||
})
|
||||
.catch(e => {
|
||||
|
@ -1,53 +1,53 @@
|
||||
<template>
|
||||
<create-edit
|
||||
title="Edit This Namespace"
|
||||
:title="title"
|
||||
primary-icon=""
|
||||
primary-label="Save"
|
||||
:primary-label="$t('misc.save')"
|
||||
@primary="save"
|
||||
tertary="Delete"
|
||||
:tertary="$t('misc.delete')"
|
||||
@tertary="$router.push({ name: 'namespace.settings.delete', params: { id: $route.params.id } })"
|
||||
>
|
||||
<form @submit.prevent="save()">
|
||||
<div class="field">
|
||||
<label class="label" for="namespacetext">Namespace Name</label>
|
||||
<label class="label" for="namespacetext">{{ $t('namespace.attributes.title') }}</label>
|
||||
<div class="control">
|
||||
<input
|
||||
:class="{ 'disabled': namespaceService.loading}"
|
||||
:disabled="namespaceService.loading"
|
||||
class="input"
|
||||
id="namespacetext"
|
||||
placeholder="The namespace text is here..."
|
||||
:placeholder="$t('namespace.attributes.titlePlaceholder')"
|
||||
type="text"
|
||||
v-focus
|
||||
v-model="namespace.title"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="namespacedescription">Description</label>
|
||||
<label class="label" for="namespacedescription">{{ $t('namespace.attributes.description') }}</label>
|
||||
<div class="control">
|
||||
<editor
|
||||
:class="{ 'disabled': namespaceService.loading}"
|
||||
:disabled="namespaceService.loading"
|
||||
:preview-is-default="false"
|
||||
id="namespacedescription"
|
||||
placeholder="The namespaces description goes here..."
|
||||
:placeholder="$t('namespace.attributes.descriptionPlaceholder')"
|
||||
v-if="editorActive"
|
||||
v-model="namespace.description"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="isArchivedCheck">Is Archived</label>
|
||||
<label class="label" for="isArchivedCheck">{{ $t('namespace.attributes.archived') }}</label>
|
||||
<div class="control">
|
||||
<fancycheckbox
|
||||
v-model="namespace.isArchived"
|
||||
v-tooltip="'If a namespace is archived, you cannot create new lists or edit it.'">
|
||||
This namespace is archived
|
||||
v-tooltip="$t('namespace.archive.description')">
|
||||
{{ $t('namespace.attributes.isArchived') }}
|
||||
</fancycheckbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Color</label>
|
||||
<label class="label">{{ $t('namespace.attributes.color') }}</label>
|
||||
<div class="control">
|
||||
<color-picker v-model="namespace.hexColor"/>
|
||||
</div>
|
||||
@ -70,9 +70,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
namespaceService: NamespaceService,
|
||||
|
||||
namespace: NamespaceModel,
|
||||
editorActive: false,
|
||||
title: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -115,7 +115,8 @@ export default {
|
||||
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
||||
this.manageTeamsComponent = 'manageSharing'
|
||||
this.manageUsersComponent = 'manageSharing'
|
||||
this.setTitle(`Edit "${r.title}"`)
|
||||
this.title = this.$t('namespace.edit.title', {namespace: r.title})
|
||||
this.setTitle(this.title)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
@ -126,7 +127,7 @@ export default {
|
||||
.then(r => {
|
||||
// Update the namespace in the parent
|
||||
this.$store.commit('namespaces/setNamespaceById', r)
|
||||
this.success({message: 'The namespace was successfully updated.'})
|
||||
this.success({message: this.$t('namespace.edit.success')})
|
||||
this.$router.back()
|
||||
})
|
||||
.catch(e => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<create-edit
|
||||
title="Share this Namespace"
|
||||
:title="title"
|
||||
primary-label=""
|
||||
>
|
||||
<component
|
||||
@ -30,10 +30,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
namespaceService: NamespaceService,
|
||||
namespace: NamespaceModel,
|
||||
manageUsersComponent: '',
|
||||
manageTeamsComponent: '',
|
||||
|
||||
namespace: NamespaceModel,
|
||||
title: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -66,7 +66,8 @@ export default {
|
||||
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
||||
this.manageTeamsComponent = 'manageSharing'
|
||||
this.manageUsersComponent = 'manageSharing'
|
||||
this.setTitle(`Share "${this.namespace.title}"`)
|
||||
this.title = this.$t('namespace.share.title', { namespace: this.namespace.title })
|
||||
this.setTitle(this.title)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
|
Reference in New Issue
Block a user