+
It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers.
-
+
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.ts
index c296c8852..f197c1fe9 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.ts
+++ b/client/src/app/+admin/follows/following-add/following-add.component.ts
@@ -4,6 +4,7 @@ import { NotificationsService } from 'angular2-notifications'
import { ConfirmService } from '../../../core'
import { validateHost } from '../../../shared'
import { FollowService } from '../shared'
+import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
selector: 'my-following-add',
@@ -19,7 +20,8 @@ export class FollowingAddComponent {
private router: Router,
private notificationsService: NotificationsService,
private confirmService: ConfirmService,
- private followService: FollowService
+ private followService: FollowService,
+ private i18n: I18n
) {}
httpEnabled () {
@@ -34,7 +36,7 @@ export class FollowingAddComponent {
for (const host of hosts) {
if (validateHost(host) === false) {
- newHostsErrors.push(`${host} is not valid`)
+ newHostsErrors.push(this.i18n('{{ host }} is not valid', { host }))
}
}
@@ -48,26 +50,26 @@ export class FollowingAddComponent {
const hosts = this.getNotEmptyHosts()
if (hosts.length === 0) {
- this.error = 'You need to specify hosts to follow.'
+ this.error = this.i18n('You need to specify hosts to follow.')
}
if (!this.isHostsUnique(hosts)) {
- this.error = 'Hosts need to be unique.'
+ this.error = this.i18n('Hosts need to be unique.')
return
}
- const confirmMessage = 'If you confirm, you will send a follow request to:
- ' + hosts.join('
- ')
- const res = await this.confirmService.confirm(confirmMessage, 'Follow new server(s)')
+ const confirmMessage = this.i18n('If you confirm, you will send a follow request to:
- ') + hosts.join('
- ')
+ const res = await this.confirmService.confirm(confirmMessage, this.i18n('Follow new server(s)'))
if (res === false) return
this.followService.follow(hosts).subscribe(
() => {
- this.notificationsService.success('Success', 'Follow request(s) sent!')
+ this.notificationsService.success(this.i18n('Success'), this.i18n('Follow request(s) sent!'))
setTimeout(() => this.router.navigate([ '/admin/follows/following-list' ]), 500)
},
- err => this.notificationsService.error('Error', err.message)
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
)
}
@@ -76,10 +78,8 @@ export class FollowingAddComponent {
}
private getNotEmptyHosts () {
- const hosts = this.hostsString
+ return this.hostsString
.split('\n')
.filter(host => host && host.length !== 0) // Eject empty hosts
-
- return hosts
}
}
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html
index 24981d3e9..e4a45e88c 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.html
+++ b/client/src/app/+admin/follows/following-list/following-list.component.html
@@ -4,10 +4,10 @@
>
- ID |
- Host |
- State |
- Created |
+ ID |
+ Host |
+ State |
+ Created |
|
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index 873a5d965..2fb818c90 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -5,6 +5,7 @@ import { AccountFollow } from '../../../../../../shared/models/actors/follow.mod
import { ConfirmService } from '../../../core/confirm/confirm.service'
import { RestPagination, RestTable } from '../../../shared'
import { FollowService } from '../shared'
+import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
selector: 'my-followers-list',
@@ -20,7 +21,8 @@ export class FollowingListComponent extends RestTable implements OnInit {
constructor (
private notificationsService: NotificationsService,
private confirmService: ConfirmService,
- private followService: FollowService
+ private followService: FollowService,
+ private i18n: I18n
) {
super()
}
@@ -30,16 +32,22 @@ export class FollowingListComponent extends RestTable implements OnInit {
}
async removeFollowing (follow: AccountFollow) {
- const res = await this.confirmService.confirm(`Do you really want to unfollow ${follow.following.host}?`, 'Unfollow')
+ const res = await this.confirmService.confirm(
+ this.i18n('Do you really want to unfollow {{ host }}?', { host: follow.following.host }),
+ this.i18n('Unfollow')
+ )
if (res === false) return
this.followService.unfollow(follow).subscribe(
() => {
- this.notificationsService.success('Success', `You are not following ${follow.following.host} anymore.`)
+ this.notificationsService.success(
+ this.i18n('Success'),
+ this.i18n('You are not following {{ host }} anymore.', { host: follow.following.host })
+ )
this.loadData()
},
- err => this.notificationsService.error('Error', err.message)
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
)
}
@@ -51,7 +59,7 @@ export class FollowingListComponent extends RestTable implements OnInit {
this.totalRecords = resultList.total
},
- err => this.notificationsService.error('Error', err.message)
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
)
}
}
diff --git a/client/src/app/+admin/follows/follows.component.html b/client/src/app/+admin/follows/follows.component.html
index 71e82059c..a8258bf70 100644
--- a/client/src/app/+admin/follows/follows.component.html
+++ b/client/src/app/+admin/follows/follows.component.html
@@ -1,5 +1,5 @@