diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:40:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 10:28:30 +0200 |
commit | 66357162f8e1227495f09bd4f68446aad7071c6d (patch) | |
tree | 7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/shared/shared-moderation/account-blocklist.component.ts | |
parent | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff) | |
download | PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip |
Migrate to $localize
* Remove i18n polyfill to translate things in components
* Reduce bundle sizes
* Improve runtime perf
* Reduce a lot the time to make a full client build
* Reduce client build complexity
* We don't need a service to translate things anymore (so we will be able to translate title pages etc)
Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
Diffstat (limited to 'client/src/app/shared/shared-moderation/account-blocklist.component.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/account-blocklist.component.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.ts b/client/src/app/shared/shared-moderation/account-blocklist.component.ts index a5a3c27cd..68928a2c2 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { OnInit, Directive } from '@angular/core' | 2 | import { Directive, OnInit } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { Actor } from '@app/shared/shared-main' | 4 | import { Actor } from '@app/shared/shared-main' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { AccountBlock } from './account-block.model' | 5 | import { AccountBlock } from './account-block.model' |
7 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' | 6 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' |
8 | 7 | ||
@@ -19,8 +18,7 @@ export class GenericAccountBlocklistComponent extends RestTable implements OnIni | |||
19 | 18 | ||
20 | constructor ( | 19 | constructor ( |
21 | private notifier: Notifier, | 20 | private notifier: Notifier, |
22 | private blocklistService: BlocklistService, | 21 | private blocklistService: BlocklistService |
23 | private i18n: I18n | ||
24 | ) { | 22 | ) { |
25 | super() | 23 | super() |
26 | } | 24 | } |
@@ -46,8 +44,8 @@ export class GenericAccountBlocklistComponent extends RestTable implements OnIni | |||
46 | () => { | 44 | () => { |
47 | this.notifier.success( | 45 | this.notifier.success( |
48 | this.mode === BlocklistComponentType.Account | 46 | this.mode === BlocklistComponentType.Account |
49 | ? this.i18n('Account {{nameWithHost}} unmuted.', { nameWithHost: blockedAccount.nameWithHost }) | 47 | ? $localize`Account ${blockedAccount.nameWithHost} unmuted.` |
50 | : this.i18n('Account {{nameWithHost}} unmuted by your instance.', { nameWithHost: blockedAccount.nameWithHost }) | 48 | : $localize`Account ${blockedAccount.nameWithHost} unmuted by your instance.` |
51 | ) | 49 | ) |
52 | 50 | ||
53 | this.loadData() | 51 | this.loadData() |