i18n work in right drawer title
This commit is contained in:
parent
24c817be70
commit
6877134292
|
@ -1,5 +1,5 @@
|
|||
<div class="rightDrawer-title">
|
||||
<h3>{{ selectedRightDrawer }}</h3>
|
||||
<h3>{{ getTitle() }}</h3>
|
||||
<span>
|
||||
<button
|
||||
mat-button
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { RightDrawer } from '@app/types';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout-messenger-right-drawer',
|
||||
|
@ -19,7 +20,7 @@ export class RightDrawerComponent implements OnInit {
|
|||
|
||||
RightDrawer = RightDrawer;
|
||||
|
||||
constructor() {}
|
||||
constructor(private translateService: TranslateService) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
|
@ -30,4 +31,25 @@ export class RightDrawerComponent implements OnInit {
|
|||
onClickClose() {
|
||||
this.closeRightDrawer.emit();
|
||||
}
|
||||
|
||||
getTitle(): string {
|
||||
let rtnStr = '';
|
||||
|
||||
switch (this.selectedRightDrawer) {
|
||||
case RightDrawer.AlbumBox:
|
||||
rtnStr = this.translateService.instant('chat.albumBox.label');
|
||||
break;
|
||||
case RightDrawer.FileBox:
|
||||
rtnStr = this.translateService.instant('chat.fileBox.label');
|
||||
break;
|
||||
case RightDrawer.RoomUser:
|
||||
rtnStr = this.translateService.instant('chat.listOfRoomMember');
|
||||
break;
|
||||
case RightDrawer.Notice:
|
||||
rtnStr = this.translateService.instant('notice.label');
|
||||
break;
|
||||
}
|
||||
|
||||
return rtnStr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user