summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleGroupList.vue
diff options
context:
space:
mode:
authorUdo Walter2018-08-03 05:23:18 +0200
committerUdo Walter2018-08-03 05:23:18 +0200
commita071feaf57284715bdf25d588ae9ba0ca424d6dd (patch)
tree088ea5de0a157070f3d08f639389d3b253c86bb9 /webapp/src/components/GroupModuleGroupList.vue
parent[webapp/external-backends] Language tags are now camelCase for consistency. G... (diff)
downloadbas-a071feaf57284715bdf25d588ae9ba0ca424d6dd.tar.gz
bas-a071feaf57284715bdf25d588ae9ba0ca424d6dd.tar.xz
bas-a071feaf57284715bdf25d588ae9ba0ca424d6dd.zip
[groups] add i18n
Diffstat (limited to 'webapp/src/components/GroupModuleGroupList.vue')
-rw-r--r--webapp/src/components/GroupModuleGroupList.vue46
1 files changed, 34 insertions, 12 deletions
diff --git a/webapp/src/components/GroupModuleGroupList.vue b/webapp/src/components/GroupModuleGroupList.vue
index f66bcbc..cb593df 100644
--- a/webapp/src/components/GroupModuleGroupList.vue
+++ b/webapp/src/components/GroupModuleGroupList.vue
@@ -1,8 +1,24 @@
<i18n>
{
"en": {
+ "id": "ID",
+ "name": "Name",
+ "description": "Description",
+ "search": "Search",
+ "removeSubgroups": "Remove one subgroup | Remove {0} subgroups",
+ "addSubgroups": "Add subgroups",
+ "deleteGroups": "Delete one group | Delete {0} groups",
+ "createGroup": "Create group"
},
"de": {
+ "id": "ID",
+ "name": "Name",
+ "description": "Beschreibung",
+ "search": "Suche",
+ "removeSubgroups": "Entferne eine Untergruppe | Entferne {0} Untergruppen",
+ "addSubgroups": "Füge Untergruppen hinzu",
+ "deleteGroups": "Lösche eine Gruppe | Lösche {0} Gruppen",
+ "createGroup": "Gruppe erstellen"
}
}
</i18n>
@@ -12,7 +28,7 @@
<v-card>
<v-card-title v-if="tabIndex === 0 && showAll" class="search-container">
<div>
- <v-text-field class="search-field" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
+ <v-text-field class="search-field" :placeholder="$t('search')" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
</div>
</v-card-title>
<v-divider></v-divider>
@@ -47,12 +63,16 @@
</v-data-table>
</v-card>
<div v-if="tabIndex === 0" class="text-xs-right">
- <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0"><v-icon left>delete</v-icon>Delete selected groups</v-btn>
- <v-btn flat color="success" @click="newGroup"><v-icon left>create</v-icon>Create group</v-btn>
+ <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0">
+ <v-icon left>delete</v-icon>{{ $tc('deleteGroups', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="newGroup"><v-icon left>create</v-icon>{{ $t('createGroup') }}</v-btn>
</div>
<div v-else class="text-xs-right">
- <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0"><v-icon left>remove_circle_outline</v-icon>Remove selected subgroups</v-btn>
- <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>Add subgroups</v-btn>
+ <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0">
+ <v-icon left>remove_circle_outline</v-icon>{{ $tc('removeSubgroups', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>{{ $t('addSubgroups') }}</v-btn>
</div>
</div>
</template>
@@ -65,18 +85,20 @@ export default {
props: ['tabIndex', 'groupId', 'groups'],
data () {
return {
- headers: [
- { text: 'ID', value: 'id' },
- { text: 'Name', value: 'name' },
- { text: 'Description', value: 'description', width: '100000px' },
- { sortable: false }
- ],
selected: [],
search: ''
}
},
computed: {
- ...mapState('groups', ['showAll'])
+ ...mapState('groups', ['showAll']),
+ headers () {
+ return [
+ { text: this.$t('id'), value: 'id' },
+ { text: this.$t('name'), value: 'name' },
+ { text: this.$t('description'), value: 'description', width: '100000px' },
+ { sortable: false }
+ ]
+ }
},
watch: {
showAll (value) {