Verified Commit 96124aaf authored by Eliot Berriot's avatar Eliot Berriot
Browse files

See #161: fixed weird extraction issues

parent 6afb0e5e
...@@ -180,12 +180,13 @@ export default { ...@@ -180,12 +180,13 @@ export default {
return return
} }
let self = this let self = this
let msg = this.$gettext('Queue shuffled!')
this.isShuffling = true this.isShuffling = true
setTimeout(() => { setTimeout(() => {
self.$store.dispatch('queue/shuffle', () => { self.$store.dispatch('queue/shuffle', () => {
self.isShuffling = false self.isShuffling = false
self.$store.commit('ui/addMessage', { self.$store.commit('ui/addMessage', {
content: self.$gettext('Queue shuffled!'), content: msg,
date: new Date() date: new Date()
}) })
}) })
......
...@@ -156,10 +156,11 @@ export default { ...@@ -156,10 +156,11 @@ export default {
} }
}, },
actions () { actions () {
let msg = this.$gettext('Import')
return [ return [
{ {
name: 'import', name: 'import',
label: this.$gettext('Import'), label: msg,
filterCheckable: (obj) => { return obj.status === 'not_imported' } filterCheckable: (obj) => { return obj.status === 'not_imported' }
} }
] ]
......
...@@ -181,10 +181,11 @@ export default { ...@@ -181,10 +181,11 @@ export default {
} }
}, },
actions () { actions () {
let msg = this.$gettext('Delete')
return [ return [
{ {
name: 'delete', name: 'delete',
label: this.$gettext('Delete'), label: msg,
isDangerous: true isDangerous: true
} }
] ]
......
...@@ -186,21 +186,25 @@ export default { ...@@ -186,21 +186,25 @@ export default {
} }
}, },
actions () { actions () {
// somehow, extraction fails otherwise
let deleteLabel = this.$gettext('Delete')
let markImportedLabel = this.$gettext('Mark as imported')
let markClosedLabel = this.$gettext('Mark as closed')
return [ return [
{ {
name: 'delete', name: 'delete',
label: this.$gettext('Delete'), label: deleteLabel,
isDangerous: true isDangerous: true
}, },
{ {
name: 'mark_imported', name: 'mark_imported',
label: this.$gettext('Mark as imported'), label: markImportedLabel,
filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 }, filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 },
isDangerous: true isDangerous: true
}, },
{ {
name: 'mark_closed', name: 'mark_closed',
label: this.$gettext('Mark as closed'), label: markClosedLabel,
filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 }, filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 },
isDangerous: true isDangerous: true
} }
......
...@@ -158,10 +158,11 @@ export default { ...@@ -158,10 +158,11 @@ export default {
} }
}, },
actions () { actions () {
let deleteLabel = this.$gettext('Delete')
return [ return [
{ {
name: 'delete', name: 'delete',
label: this.$gettext('Delete'), label: deleteLabel,
filterCheckable: (obj) => { filterCheckable: (obj) => {
return obj.users.length === 0 && moment().isBefore(obj.expiration_date) return obj.users.length === 0 && moment().isBefore(obj.expiration_date)
} }
......
...@@ -71,9 +71,18 @@ export default { ...@@ -71,9 +71,18 @@ export default {
}, },
computed: { computed: {
groups () { groups () {
// somehow, extraction fails if in the return block directly
let instanceLabel = this.$gettext('Instance information')
let usersLabel = this.$gettext('Users')
let importsLabel = this.$gettext('Imports')
let playlistsLabel = this.$gettext('Playlists')
let federationLabel = this.$gettext('Federation')
let subsonicLabel = this.$gettext('Subsonic')
let statisticsLabel = this.$gettext('Statistics')
let errorLabel = this.$gettext('Error reporting')
return [ return [
{ {
label: this.$gettext('Instance information'), label: instanceLabel,
id: 'instance', id: 'instance',
settings: [ settings: [
'instance__name', 'instance__name',
...@@ -82,7 +91,7 @@ export default { ...@@ -82,7 +91,7 @@ export default {
] ]
}, },
{ {
label: this.$gettext('Users'), label: usersLabel,
id: 'users', id: 'users',
settings: [ settings: [
'users__registration_enabled', 'users__registration_enabled',
...@@ -91,21 +100,21 @@ export default { ...@@ -91,21 +100,21 @@ export default {
] ]
}, },
{ {
label: this.$gettext('Imports'), label: importsLabel,
id: 'imports', id: 'imports',
settings: [ settings: [
'providers_youtube__api_key' 'providers_youtube__api_key'
] ]
}, },
{ {
label: this.$gettext('Playlists'), label: playlistsLabel,
id: 'playlists', id: 'playlists',
settings: [ settings: [
'playlists__max_tracks' 'playlists__max_tracks'
] ]
}, },
{ {
label: this.$gettext('Federation'), label: federationLabel,
id: 'federation', id: 'federation',
settings: [ settings: [
'federation__enabled', 'federation__enabled',
...@@ -116,14 +125,14 @@ export default { ...@@ -116,14 +125,14 @@ export default {
] ]
}, },
{ {
label: this.$gettext('Subsonic'), label: subsonicLabel,
id: 'subsonic', id: 'subsonic',
settings: [ settings: [
'subsonic__enabled' 'subsonic__enabled'
] ]
}, },
{ {
label: this.$gettext('Statistics'), label: statisticsLabel,
id: 'statistics', id: 'statistics',
settings: [ settings: [
'instance__nodeinfo_enabled', 'instance__nodeinfo_enabled',
...@@ -132,7 +141,7 @@ export default { ...@@ -132,7 +141,7 @@ export default {
] ]
}, },
{ {
label: this.$gettext('Error reporting'), label: errorLabel,
id: 'reporting', id: 'reporting',
settings: [ settings: [
'raven__front_enabled', 'raven__front_enabled',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment