diff --git a/src/renderer/components/ft-profile-channel-list/ft-profile-channel-list.js b/src/renderer/components/ft-profile-channel-list/ft-profile-channel-list.js index 7b2e2a54..93bb47cd 100644 --- a/src/renderer/components/ft-profile-channel-list/ft-profile-channel-list.js +++ b/src/renderer/components/ft-profile-channel-list/ft-profile-channel-list.js @@ -128,12 +128,12 @@ export default Vue.extend({ return index === -1 }) 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 { const profile = JSON.parse(JSON.stringify(this.profile)) diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 09bd8b61..fc1f5a73 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -158,7 +158,7 @@ export default Vue.extend({ this.updateProfile(currentProfile) 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) { @@ -187,8 +187,9 @@ export default Vue.extend({ }) if (duplicateSubscriptions > 0) { + const message = this.$t('Channel.Removed subscription from $ other channel(s)') 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.showToast({ - message: 'Added channel to your subscriptions' + message: this.$t('Channel.Added channel to your subscriptions') }) if (this.activeProfile !== 0) { diff --git a/src/renderer/views/Channel/Channel.js b/src/renderer/views/Channel/Channel.js index 1018915c..906cf1e4 100644 --- a/src/renderer/views/Channel/Channel.js +++ b/src/renderer/views/Channel/Channel.js @@ -473,7 +473,7 @@ export default Vue.extend({ this.updateProfile(currentProfile) 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) { @@ -494,7 +494,7 @@ export default Vue.extend({ duplicateSubscriptions++ parsedProfile.subscriptions = parsedProfile.subscriptions.filter((x) => { - return x.id !== this.channelId + return x.id !== this.id }) this.updateProfile(parsedProfile) @@ -502,8 +502,9 @@ export default Vue.extend({ }) if (duplicateSubscriptions > 0) { + const message = this.$t('Channel.Removed subscription from $ other channel(s)') 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.showToast({ - message: 'Added channel to your subscriptions' + message: this.$t('Channel.Added channel to your subscriptions') }) if (this.activeProfile !== 0) { diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 62c8be96..369813c9 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -322,6 +322,9 @@ Channel: Subscribers: Subscribers Subscribe: Subscribe 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 Your search results have returned 0 results: Your search results have returned 0 results