Provide translations for filter menu

This commit is contained in:
Robert Schäfer 2019-05-29 00:38:30 +02:00
parent f3b088f862
commit ad48264a64
3 changed files with 40 additions and 9 deletions

View File

@ -1,21 +1,38 @@
<template> <template>
<ds-card> <ds-card>
<ds-form> <ds-radio
<ds-radio buttons v-model="filter" label="Filter" :options="['friends', 'friends-of-a-friend', 'all']" /> v-model="filter"
</ds-form> buttons
label="Filter"
label-prop="text"
@input="handleInput"
:options="options"
/>
</ds-card> </ds-card>
</template> </template>
<script> <script>
import Dropdown from '~/components/Dropdown'
export default { export default {
components: {
Dropdown
},
data() { data() {
// We have to fix styleguide here. It uses .includes wich will always be
// false for arrays of objects.
return { return {
filter: 'all' filter: { value: 'all', text: this.$t('filter-menu.options.all') },
} }
} },
computed: {
options() {
return [
{ value: 'friends', text: this.$t('filter-menu.options.friends') },
{ value: 'friends-of-a-friend', text: this.$t('filter-menu.options.friends-of-a-friend') },
{ value: 'all', text: this.$t('filter-menu.options.all') },
]
},
},
methods: {
handleInput(e) {
// console.log('handleInput', e)
},
},
} }
</script> </script>

View File

@ -1,4 +1,11 @@
{ {
"filter-menu": {
"options": {
"friends": "Nur Freunde",
"friends-of-a-friend": "Freunde von Freunden",
"all": "Alle"
}
},
"login": { "login": {
"copy": "Wenn Du bereits ein Konto bei Human Connection hast, melde Dich bitte hier an.", "copy": "Wenn Du bereits ein Konto bei Human Connection hast, melde Dich bitte hier an.",
"login": "Einloggen", "login": "Einloggen",

View File

@ -1,4 +1,11 @@
{ {
"filter-menu": {
"options": {
"friends": "Only friends",
"friends-of-a-friend": "Friends of a friend",
"all": "All"
}
},
"login": { "login": {
"copy": "If you already have a human-connection account, login here.", "copy": "If you already have a human-connection account, login here.",
"login": "Login", "login": "Login",