aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts')
-rw-r--r--client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
index 662143abc..729b7f599 100644
--- a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
+++ b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
@@ -1,7 +1,6 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { Notifier } from '@app/core' 2import { Notifier } from '@app/core'
3import { RedundancyService } from '@app/shared/shared-main' 3import { RedundancyService } from '@app/shared/shared-main'
4import { I18n } from '@ngx-translate/i18n-polyfill'
5 4
6@Component({ 5@Component({
7 selector: 'my-redundancy-checkbox', 6 selector: 'my-redundancy-checkbox',
@@ -14,17 +13,16 @@ export class RedundancyCheckboxComponent {
14 13
15 constructor ( 14 constructor (
16 private notifier: Notifier, 15 private notifier: Notifier,
17 private redundancyService: RedundancyService, 16 private redundancyService: RedundancyService
18 private i18n: I18n 17 ) { }
19 ) { }
20 18
21 updateRedundancyState () { 19 updateRedundancyState () {
22 this.redundancyService.updateRedundancy(this.host, this.redundancyAllowed) 20 this.redundancyService.updateRedundancy(this.host, this.redundancyAllowed)
23 .subscribe( 21 .subscribe(
24 () => { 22 () => {
25 const stateLabel = this.redundancyAllowed ? this.i18n('enabled') : this.i18n('disabled') 23 const stateLabel = this.redundancyAllowed ? $localize`enabled` : $localize`disabled`
26 24
27 this.notifier.success(this.i18n('Redundancy for {{host}} is {{stateLabel}}', { host: this.host, stateLabel })) 25 this.notifier.success($localize`Redundancy for ${this.host} is ${stateLabel}`)
28 }, 26 },
29 27
30 err => this.notifier.error(err.message) 28 err => this.notifier.error(err.message)