diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-04 16:21:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 08:43:01 +0200 |
commit | b1d40cff89f7cff565a98cdbcea9a624196a169a (patch) | |
tree | d24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/menu | |
parent | 989e526abf0c0dd7958deb630df009608561bb67 (diff) | |
download | PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip |
Add i18n attributes
Diffstat (limited to 'client/src/app/menu')
-rw-r--r-- | client/src/app/menu/menu.component.html | 20 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.ts | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index 1a95477b7..167729405 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html | |||
@@ -18,11 +18,11 @@ | |||
18 | My public profile | 18 | My public profile |
19 | </a> | 19 | </a> |
20 | 20 | ||
21 | <a routerLink="/my-account/settings" class="dropdown-item" title="My settings"> | 21 | <a i18n routerLink="/my-account/settings" class="dropdown-item" title="My settings"> |
22 | My settings | 22 | My settings |
23 | </a> | 23 | </a> |
24 | 24 | ||
25 | <a (click)="logout($event)" class="dropdown-item" title="Log out" href="#"> | 25 | <a i18n (click)="logout($event)" class="dropdown-item" title="Log out" href="#"> |
26 | Log out | 26 | Log out |
27 | </a> | 27 | </a> |
28 | </li> | 28 | </li> |
@@ -31,26 +31,26 @@ | |||
31 | </div> | 31 | </div> |
32 | 32 | ||
33 | <div *ngIf="!isLoggedIn" class="button-block"> | 33 | <div *ngIf="!isLoggedIn" class="button-block"> |
34 | <a routerLink="/login" class="login-button">Login</a> | 34 | <a i18n routerLink="/login" class="login-button">Login</a> |
35 | <a *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a> | 35 | <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a> |
36 | </div> | 36 | </div> |
37 | 37 | ||
38 | <div class="panel-block"> | 38 | <div class="panel-block"> |
39 | <div class="block-title">Videos</div> | 39 | <div i18n class="block-title">Videos</div> |
40 | 40 | ||
41 | <a routerLink="/videos/trending" routerLinkActive="active"> | 41 | <a routerLink="/videos/trending" routerLinkActive="active"> |
42 | <span class="icon icon-videos-trending"></span> | 42 | <span class="icon icon-videos-trending"></span> |
43 | Trending | 43 | <ng-container i18n>Trending</ng-container> |
44 | </a> | 44 | </a> |
45 | 45 | ||
46 | <a routerLink="/videos/recently-added" routerLinkActive="active"> | 46 | <a routerLink="/videos/recently-added" routerLinkActive="active"> |
47 | <span class="icon icon-videos-recently-added"></span> | 47 | <span class="icon icon-videos-recently-added"></span> |
48 | Recently added | 48 | <ng-container i18n>Recently added</ng-container> |
49 | </a> | 49 | </a> |
50 | 50 | ||
51 | <a routerLink="/videos/local" routerLinkActive="active"> | 51 | <a routerLink="/videos/local" routerLinkActive="active"> |
52 | <span class="icon icon-videos-local"></span> | 52 | <span class="icon icon-videos-local"></span> |
53 | Local | 53 | <ng-container i18n>Local</ng-container> |
54 | </a> | 54 | </a> |
55 | </div> | 55 | </div> |
56 | 56 | ||
@@ -59,12 +59,12 @@ | |||
59 | 59 | ||
60 | <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active"> | 60 | <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active"> |
61 | <span class="icon icon-administration"></span> | 61 | <span class="icon icon-administration"></span> |
62 | Administration | 62 | <ng-container i18n>Administration</ng-container> |
63 | </a> | 63 | </a> |
64 | 64 | ||
65 | <a routerLink="/about" routerLinkActive="active"> | 65 | <a routerLink="/about" routerLinkActive="active"> |
66 | <span class="icon icon-about"></span> | 66 | <span class="icon icon-about"></span> |
67 | About | 67 | <ng-container i18n>About</ng-container> |
68 | </a> | 68 | </a> |
69 | </div> | 69 | </div> |
70 | </menu> | 70 | </menu> |
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 69216e215..c0aea89b3 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { UserRight } from '../../../../shared/models/users/user-right.enum' | 3 | import { UserRight } from '../../../../shared/models/users/user-right.enum' |
4 | import { AuthService, AuthStatus, ServerService } from '../core' | 4 | import { AuthService, AuthStatus, RedirectService, ServerService } from '../core' |
5 | import { User } from '../shared/users/user.model' | 5 | import { User } from '../shared/users/user.model' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
@@ -24,7 +24,7 @@ export class MenuComponent implements OnInit { | |||
24 | constructor ( | 24 | constructor ( |
25 | private authService: AuthService, | 25 | private authService: AuthService, |
26 | private serverService: ServerService, | 26 | private serverService: ServerService, |
27 | private router: Router | 27 | private redirectService: RedirectService |
28 | ) {} | 28 | ) {} |
29 | 29 | ||
30 | ngOnInit () { | 30 | ngOnInit () { |
@@ -87,7 +87,7 @@ export class MenuComponent implements OnInit { | |||
87 | 87 | ||
88 | this.authService.logout() | 88 | this.authService.logout() |
89 | // Redirect to home page | 89 | // Redirect to home page |
90 | this.router.navigate(['/videos/list']) | 90 | this.redirectService.redirectToHomepage() |
91 | } | 91 | } |
92 | 92 | ||
93 | private computeIsUserHasAdminAccess () { | 93 | private computeIsUserHasAdminAccess () { |