Fix Locale and messaging issues

This commit is contained in:
Preston 2020-09-16 08:51:24 -04:00
parent 2c9832d90e
commit 35b35b2525
4 changed files with 17 additions and 12 deletions

View File

@ -128,12 +128,12 @@ export default Vue.extend({
return index === -1 return index === -1
}) })
this.updateProfile(profile) this.updateProfile(profile)
this.showToast({
message: this.$t('Profile.Profile has been updated')
})
this.selectNone()
}) })
this.showToast({
message: this.$t('Profile.Profile has been updated')
})
this.selectNone()
} else { } else {
const profile = JSON.parse(JSON.stringify(this.profile)) const profile = JSON.parse(JSON.stringify(this.profile))

View File

@ -158,7 +158,7 @@ export default Vue.extend({
this.updateProfile(currentProfile) this.updateProfile(currentProfile)
this.showToast({ this.showToast({
message: 'Channel has been removed from your subscriptions' message: this.$t('Channel.Channel has been removed from your subscriptions')
}) })
if (this.activeProfile === 0) { if (this.activeProfile === 0) {
@ -187,8 +187,9 @@ export default Vue.extend({
}) })
if (duplicateSubscriptions > 0) { if (duplicateSubscriptions > 0) {
const message = this.$t('Channel.Removed subscription from $ other channel(s)')
this.showToast({ this.showToast({
message: `Removed subscription from ${duplicateSubscriptions} other channel(s)` message: message.replace('$', duplicateSubscriptions)
}) })
} }
} }
@ -202,7 +203,7 @@ export default Vue.extend({
this.updateProfile(currentProfile) this.updateProfile(currentProfile)
this.showToast({ this.showToast({
message: 'Added channel to your subscriptions' message: this.$t('Channel.Added channel to your subscriptions')
}) })
if (this.activeProfile !== 0) { if (this.activeProfile !== 0) {

View File

@ -473,7 +473,7 @@ export default Vue.extend({
this.updateProfile(currentProfile) this.updateProfile(currentProfile)
this.showToast({ this.showToast({
message: 'Channel has been removed from your subscriptions' message: this.$t('Channel.Channel has been removed from your subscriptions')
}) })
if (this.activeProfile === 0) { if (this.activeProfile === 0) {
@ -494,7 +494,7 @@ export default Vue.extend({
duplicateSubscriptions++ duplicateSubscriptions++
parsedProfile.subscriptions = parsedProfile.subscriptions.filter((x) => { parsedProfile.subscriptions = parsedProfile.subscriptions.filter((x) => {
return x.id !== this.channelId return x.id !== this.id
}) })
this.updateProfile(parsedProfile) this.updateProfile(parsedProfile)
@ -502,8 +502,9 @@ export default Vue.extend({
}) })
if (duplicateSubscriptions > 0) { if (duplicateSubscriptions > 0) {
const message = this.$t('Channel.Removed subscription from $ other channel(s)')
this.showToast({ this.showToast({
message: `Removed subscription from ${duplicateSubscriptions} other channel(s)` message: message.replace('$', duplicateSubscriptions)
}) })
} }
} }
@ -517,7 +518,7 @@ export default Vue.extend({
this.updateProfile(currentProfile) this.updateProfile(currentProfile)
this.showToast({ this.showToast({
message: 'Added channel to your subscriptions' message: this.$t('Channel.Added channel to your subscriptions')
}) })
if (this.activeProfile !== 0) { if (this.activeProfile !== 0) {

View File

@ -322,6 +322,9 @@ Channel:
Subscribers: Subscribers Subscribers: Subscribers
Subscribe: Subscribe Subscribe: Subscribe
Unsubscribe: Unsubscribe Unsubscribe: Unsubscribe
Channel has been removed from your subscriptions: Channel has been removed from your subscriptions
Removed subscription from $ other channel(s): Removed subscription from $ other channel(s)
Added channel to your subscriptions: Added channel to your subscriptions
Search Channel: Search Channel Search Channel: Search Channel
Your search results have returned 0 results: Your search results have returned 0 Your search results have returned 0 results: Your search results have returned 0
results results