diff options
Diffstat (limited to 'client/src/app/+my-account/my-account.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account.component.ts | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index 56373e5f1..d3bf8d143 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService, ScreenService, ServerService, AuthUser } from '@app/core' | 2 | import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
4 | import { ServerConfig } from '@shared/models' | 3 | import { ServerConfig } from '@shared/models' |
5 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' | 4 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' |
6 | 5 | ||
@@ -18,9 +17,8 @@ export class MyAccountComponent implements OnInit { | |||
18 | constructor ( | 17 | constructor ( |
19 | private serverService: ServerService, | 18 | private serverService: ServerService, |
20 | private authService: AuthService, | 19 | private authService: AuthService, |
21 | private screenService: ScreenService, | 20 | private screenService: ScreenService |
22 | private i18n: I18n | 21 | ) { } |
23 | ) { } | ||
24 | 22 | ||
25 | get isBroadcastMessageDisplayed () { | 23 | get isBroadcastMessageDisplayed () { |
26 | return this.screenService.isBroadcastMessageDisplayed | 24 | return this.screenService.isBroadcastMessageDisplayed |
@@ -46,31 +44,31 @@ export class MyAccountComponent implements OnInit { | |||
46 | 44 | ||
47 | private buildMenu () { | 45 | private buildMenu () { |
48 | const libraryEntries: TopMenuDropdownParam = { | 46 | const libraryEntries: TopMenuDropdownParam = { |
49 | label: this.i18n('My library'), | 47 | label: $localize`My library`, |
50 | children: [ | 48 | children: [ |
51 | { | 49 | { |
52 | label: this.i18n('My channels'), | 50 | label: $localize`My channels`, |
53 | routerLink: '/my-account/video-channels', | 51 | routerLink: '/my-account/video-channels', |
54 | iconName: 'channel' | 52 | iconName: 'channel' |
55 | }, | 53 | }, |
56 | { | 54 | { |
57 | label: this.i18n('My videos'), | 55 | label: $localize`My videos`, |
58 | routerLink: '/my-account/videos', | 56 | routerLink: '/my-account/videos', |
59 | iconName: 'videos', | 57 | iconName: 'videos', |
60 | isDisplayed: () => this.user.canSeeVideosLink | 58 | isDisplayed: () => this.user.canSeeVideosLink |
61 | }, | 59 | }, |
62 | { | 60 | { |
63 | label: this.i18n('My playlists'), | 61 | label: $localize`My playlists`, |
64 | routerLink: '/my-account/video-playlists', | 62 | routerLink: '/my-account/video-playlists', |
65 | iconName: 'playlists' | 63 | iconName: 'playlists' |
66 | }, | 64 | }, |
67 | { | 65 | { |
68 | label: this.i18n('My subscriptions'), | 66 | label: $localize`My subscriptions`, |
69 | routerLink: '/my-account/subscriptions', | 67 | routerLink: '/my-account/subscriptions', |
70 | iconName: 'subscriptions' | 68 | iconName: 'subscriptions' |
71 | }, | 69 | }, |
72 | { | 70 | { |
73 | label: this.i18n('My history'), | 71 | label: $localize`My history`, |
74 | routerLink: '/my-account/history/videos', | 72 | routerLink: '/my-account/history/videos', |
75 | iconName: 'history' | 73 | iconName: 'history' |
76 | } | 74 | } |
@@ -87,25 +85,25 @@ export class MyAccountComponent implements OnInit { | |||
87 | } | 85 | } |
88 | 86 | ||
89 | const miscEntries: TopMenuDropdownParam = { | 87 | const miscEntries: TopMenuDropdownParam = { |
90 | label: this.i18n('Misc'), | 88 | label: $localize`Misc`, |
91 | children: [ | 89 | children: [ |
92 | { | 90 | { |
93 | label: this.i18n('Muted accounts'), | 91 | label: $localize`Muted accounts`, |
94 | routerLink: '/my-account/blocklist/accounts', | 92 | routerLink: '/my-account/blocklist/accounts', |
95 | iconName: 'user-x' | 93 | iconName: 'user-x' |
96 | }, | 94 | }, |
97 | { | 95 | { |
98 | label: this.i18n('Muted servers'), | 96 | label: $localize`Muted servers`, |
99 | routerLink: '/my-account/blocklist/servers', | 97 | routerLink: '/my-account/blocklist/servers', |
100 | iconName: 'peertube-x' | 98 | iconName: 'peertube-x' |
101 | }, | 99 | }, |
102 | { | 100 | { |
103 | label: this.i18n('My abuse reports'), | 101 | label: $localize`My abuse reports`, |
104 | routerLink: '/my-account/abuses', | 102 | routerLink: '/my-account/abuses', |
105 | iconName: 'flag' | 103 | iconName: 'flag' |
106 | }, | 104 | }, |
107 | { | 105 | { |
108 | label: this.i18n('Ownership changes'), | 106 | label: $localize`Ownership changes`, |
109 | routerLink: '/my-account/ownership', | 107 | routerLink: '/my-account/ownership', |
110 | iconName: 'download' | 108 | iconName: 'download' |
111 | } | 109 | } |
@@ -114,11 +112,11 @@ export class MyAccountComponent implements OnInit { | |||
114 | 112 | ||
115 | this.menuEntries = [ | 113 | this.menuEntries = [ |
116 | { | 114 | { |
117 | label: this.i18n('My settings'), | 115 | label: $localize`My settings`, |
118 | routerLink: '/my-account/settings' | 116 | routerLink: '/my-account/settings' |
119 | }, | 117 | }, |
120 | { | 118 | { |
121 | label: this.i18n('My notifications'), | 119 | label: $localize`My notifications`, |
122 | routerLink: '/my-account/notifications' | 120 | routerLink: '/my-account/notifications' |
123 | }, | 121 | }, |
124 | libraryEntries, | 122 | libraryEntries, |