1
0

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:
konrad
2021-06-23 23:24:57 +00:00
parent 5badb65037
commit f0498fd767
103 changed files with 2306 additions and 973 deletions

View File

@ -3,12 +3,12 @@
@close="$router.back()"
@submit="archiveList()"
>
<span slot="header">{{ list.isArchived ? 'Un-' : '' }}Archive this list</span>
<span slot="header">{{ list.isArchived ? $t('list.archive.unarchive') : $t('list.archive.archive') }}</span>
<p slot="text" v-if="list.isArchived">
You will be able to create new tasks or edit it.
{{ $t('list.archive.unarchiveText') }}
</p>
<p slot="text" v-else>
You won't be able to edit this list or create new tasks until you un-archive it.
{{ $t('list.archive.archiveText') }}
</p>
</modal>
</template>
@ -27,7 +27,7 @@ export default {
created() {
this.listService = new ListService()
this.list = this.$store.getters['lists/getListById'](this.$route.params.listId)
this.setTitle(`Archive "${this.list.title}"`)
this.setTitle(this.$t('list.archive.title', {list: this.list.title}))
},
methods: {
archiveList() {
@ -38,7 +38,7 @@ export default {
.then(r => {
this.$store.commit('currentList', r)
this.$store.commit('namespaces/setListInNamespaceById', r)
this.success({message: 'The list was successfully archived.'})
this.success({message: this.$t('list.archive.success')})
})
.catch(e => {
this.error(e)

View File

@ -1,12 +1,12 @@
<template>
<create-edit
title="Set list background"
:title="$t('list.background.title')"
primary-label=""
:loading="backgroundService.loading"
class="list-background-setting"
:wide="true"
v-if="uploadBackgroundEnabled || unsplashBackgroundEnabled"
:tertary="hasBackground ? 'Remove Background' : ''"
:tertary="hasBackground ? $t('list.background.remove') : ''"
@tertary="removeBackground()"
>
<div class="mb-4" v-if="uploadBackgroundEnabled">
@ -22,7 +22,7 @@
@click="$refs.backgroundUploadInput.click()"
type="primary"
>
Choose a background from your pc
{{ $t('list.background.upload') }}
</x-button>
</div>
<template v-if="unsplashBackgroundEnabled">
@ -30,11 +30,13 @@
:class="{'is-loading': backgroundService.loading}"
@keyup="() => newBackgroundSearch()"
class="input is-expanded"
placeholder="Search for a background..."
:placeholder="$t('list.background.searchPlaceholder')"
type="text"
v-model="backgroundSearchTerm"
/>
<p class="unsplash-link"><a href="https://unsplash.com" target="_blank">Powered by Unsplash</a></p>
<p class="unsplash-link">
<a href="https://unsplash.com" target="_blank">{{ $t('list.background.poweredByUnsplash') }}</a>
</p>
<div class="image-search-result">
<a
:key="im.id"
@ -55,7 +57,7 @@
type="secondary"
v-if="backgroundSearchResult.length > 0"
>
{{ backgroundService.loading ? 'Loading...' : 'Load more photos' }}
{{ backgroundService.loading ? $t('misc.loading') : $t('list.background.loadMore') }}
</x-button>
</template>
</create-edit>
@ -95,7 +97,7 @@ export default {
this.backgroundService = new BackgroundUnsplashService()
this.backgroundUploadService = new BackgroundUploadService()
this.listService = new ListService()
this.setTitle('Set a list background')
this.setTitle(this.$t('list.background.title'))
// Show the default collection of backgrounds
this.newBackgroundSearch()
},
@ -144,7 +146,7 @@ export default {
.then(l => {
this.$store.commit(CURRENT_LIST, l)
this.$store.commit('namespaces/setListInNamespaceById', l)
this.success({message: 'The background has been set successfully!'})
this.success({message: this.$t('list.background.success')})
})
.catch(e => {
this.error(e)
@ -159,7 +161,7 @@ export default {
.then(l => {
this.$store.commit(CURRENT_LIST, l)
this.$store.commit('namespaces/setListInNamespaceById', l)
this.success({message: 'The background has been set successfully!'})
this.success({message: this.$t('list.background.success')})
})
.catch(e => {
this.error(e)
@ -170,7 +172,7 @@ export default {
.then(l => {
this.$store.commit(CURRENT_LIST, l)
this.$store.commit('namespaces/setListInNamespaceById', l)
this.success({message: 'The background has been removed successfully!'})
this.success({message: this.$t('list.background.removeSuccess')})
this.$router.back()
})
.catch(e => {

View File

@ -3,9 +3,11 @@
@close="$router.back()"
@submit="deleteList()"
>
<span slot="header">Delete this list</span>
<p slot="text">Are you sure you want to delete this list and all of its contents?
<br/>This includes all tasks and <b>CANNOT BE UNDONE!</b></p>
<span slot="header">{{ $t('list.delete.header') }}</span>
<p slot="text">
{{ $t('list.delete.text1') }}<br/>
{{ $t('list.delete.text2') }}
</p>
</modal>
</template>
@ -22,7 +24,7 @@ export default {
created() {
this.listService = new ListService()
const list = this.$store.getters['lists/getListById'](this.$route.params.listId)
this.setTitle(`Delete "${list.title}"`)
this.setTitle(this.$t('list.delete.title', {list: list.title}))
},
methods: {
deleteList() {
@ -31,7 +33,7 @@ export default {
this.listService.delete(list)
.then(() => {
this.$store.commit('namespaces/removeListFromNamespaceById', list)
this.success({message: 'The list was successfully deleted.'})
this.success({message: this.$t('list.delete.success')})
this.$router.push({name: 'home'})
})
.catch(e => {

View File

@ -1,12 +1,14 @@
<template>
<create-edit
title="Duplicate this list"
:title="$t('list.duplicate.title')"
primary-icon="paste"
primary-label="Duplicate"
:primary-label="$t('list.duplicate.label')"
@primary="duplicateList"
:loading="listDuplicateService.loading"
>
<p>Select a namespace which should hold the duplicated list:</p>
<p>
{{ $t('list.duplicate.text') }}
</p>
<namespace-search @selected="selectNamespace"/>
</create-edit>
</template>
@ -31,7 +33,7 @@ export default {
},
created() {
this.listDuplicateService = new ListDuplicateService()
this.setTitle('Duplicate List')
this.setTitle(this.$t('list.duplicate.title'))
},
methods: {
selectNamespace(namespace) {
@ -46,7 +48,7 @@ export default {
.then(r => {
this.$store.commit('namespaces/addListToNamespace', r.list)
this.$store.commit('lists/setList', r.list)
this.success({message: 'The list was successfully duplicated.'})
this.success({message: this.$t('list.duplicate.success')})
this.$router.push({name: 'list.index', params: {listId: r.list.id}})
})
.catch(e => {

View File

@ -1,14 +1,14 @@
<template>
<create-edit
title="Edit This List"
:title="$t('list.edit.header')"
primary-icon=""
primary-label="Save"
:primary-label="$t('misc.save')"
@primary="save"
tertary="Delete"
:tertary="$t('misc.delete')"
@tertary="$router.push({ name: 'list.list.settings.delete', params: { id: $route.params.listId } })"
>
<div class="field">
<label class="label" for="listtext">List Name</label>
<label class="label" for="listtext">{{ $t('list.title') }}</label>
<div class="control">
<input
:class="{ 'disabled': listService.loading}"
@ -16,7 +16,7 @@
@keyup.enter="save"
class="input"
id="listtext"
placeholder="The list title goes here..."
:placeholder="$t('list.edit.titlePlaceholder')"
type="text"
v-focus
v-model="list.title"/>
@ -26,8 +26,8 @@
<label
class="label"
for="listtext"
v-tooltip="'The list identifier can be used to uniquely identify a task across lists. You can set it to empty to disable it.'">
List Identifier
v-tooltip="$t('list.edit.identifierTooltip')">
{{ $t('list.edit.identifier') }}
</label>
<div class="control">
<input
@ -36,27 +36,27 @@
@keyup.enter="save"
class="input"
id="listtext"
placeholder="The list identifier goes here..."
:placeholder="$t('list.edit.identifierPlaceholder')"
type="text"
v-focus
v-model="list.identifier"/>
</div>
</div>
<div class="field">
<label class="label" for="listdescription">Description</label>
<label class="label" for="listdescription">{{ $t('list.edit.description') }}</label>
<div class="control">
<editor
:class="{ 'disabled': listService.loading}"
:disabled="listService.loading"
:preview-is-default="false"
id="listdescription"
placeholder="The lists description goes here..."
:placeholder="$t('list.edit.descriptionPlaceholder')"
v-model="list.description"
/>
</div>
</div>
<div class="field">
<label class="label">Color</label>
<label class="label">{{ $t('list.edit.color') }}</label>
<div class="control">
<color-picker v-model="list.hexColor"/>
</div>
@ -106,7 +106,7 @@ export default {
.then(r => {
this.$set(this, 'list', r)
this.$store.commit(CURRENT_LIST, r)
this.setTitle(`Edit "${this.list.title}"`)
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
})
.catch(e => {
this.error(e)
@ -115,7 +115,7 @@ export default {
save() {
this.$store.dispatch('lists/updateList', this.list)
.then(() => {
this.success({message: 'The list was successfully updated.'})
this.success({message: this.$t('list.edit.success')})
this.$router.back()
})
.catch(e => {

View File

@ -1,6 +1,6 @@
<template>
<create-edit
title="Share this list"
:title="$t('list.share.header')"
primary-label=""
>
<component
@ -67,7 +67,7 @@ export default {
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
this.manageTeamsComponent = 'userTeam'
this.manageUsersComponent = 'userTeam'
this.setTitle(`Share "${this.list.title}"`)
this.setTitle(this.$t('list.share.title', {list: this.list.title}))
})
.catch(e => {
this.error(e)