summaryrefslogtreecommitdiffstats
path: root/portal-FE-common/src/app/layout/components/tabbar
diff options
context:
space:
mode:
authorSri Balaji Marripud <sri.balaji.marripud@att.com>2020-08-11 17:09:19 -0400
committerSri Balaji Marripud <sri.balaji.marripud@att.com>2020-08-11 17:09:29 -0400
commitb2b4c24300ae6c929ee1996b23b1277fc66498cf (patch)
treeacd786174fab52e70b227e8b5b94588008a0f77e /portal-FE-common/src/app/layout/components/tabbar
parent560c13ca93cafcc163c5c139bc1324212c2dd54f (diff)
Internationalization code
Issue-ID: PORTAL-975 Change-Id: I4d4e25b883f36ee6ee1e16d98e75773636b1ee5b Signed-off-by: Sri Balaji Marripud <sri.balaji.marripud@att.com>
Diffstat (limited to 'portal-FE-common/src/app/layout/components/tabbar')
-rw-r--r--portal-FE-common/src/app/layout/components/tabbar/tabbar.component.html2
-rw-r--r--portal-FE-common/src/app/layout/components/tabbar/tabbar.component.spec.ts4
-rw-r--r--portal-FE-common/src/app/layout/components/tabbar/tabbar.component.ts13
3 files changed, 15 insertions, 4 deletions
diff --git a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.html b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.html
index db0b6afd..a12a8df5 100644
--- a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.html
+++ b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.html
@@ -68,7 +68,7 @@
<div style="display: flex; flex-direction:column; overflow-y: scroll; height: calc(100vh - 100px)">
<div style="display: flex; flex-direction:row;">
- <app-sidebar (collapsedEvent)="receiveCollapsed($event)"></app-sidebar>
+ <app-sidebar (collapsedEvent)="receiveCollapsed($event)" [langFromTab]="inputedLanguage"></app-sidebar>
<app-userbar></app-userbar>
<div class="container" [ngStyle]="setStyle()">
<router-outlet></router-outlet>
diff --git a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.spec.ts b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.spec.ts
index 066d73ff..37a7e912 100644
--- a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.spec.ts
+++ b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.spec.ts
@@ -40,7 +40,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TabbarComponent } from './tabbar.component';
import { NgMaterialModule } from 'src/app/ng-material-module';
-import { Component } from '@angular/core';
+import { Component, Input } from '@angular/core';
import { ElipsisPipe } from 'src/app/shared/pipes/elipsis/elipsis.pipe';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientTestingModule} from '@angular/common/http/testing';
@@ -69,7 +69,7 @@ describe('TabbarComponent', () => {
});
@Component({selector: 'app-sidebar', template: ''})
-class AppSideBarStubComponent {}
+class AppSideBarStubComponent {@Input() langFromTab:string;}
@Component({selector: 'router-outlet', template: ''})
class RouterOutletStubComponent { }
diff --git a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.ts b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.ts
index 86f76595..f44b4ef3 100644
--- a/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.ts
+++ b/portal-FE-common/src/app/layout/components/tabbar/tabbar.component.ts
@@ -35,7 +35,7 @@
*
*
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Input, OnChanges } from '@angular/core';
import { FormControl } from '@angular/forms';
import { DomSanitizer } from '@angular/platform-browser';
import { Tab } from './tab';
@@ -54,6 +54,10 @@ export class TabbarComponent implements OnInit {
mainTab = 'Home';
selected = new FormControl(0);
collapedSideBar: boolean;
+ inputedLanguage: string;
+
+ @Input() language:string;
+
constructor(private sanitizer: DomSanitizer, private addTabFuntionService: AddTabFunctionService, private auditLogService: AuditLogService) {
@@ -68,6 +72,13 @@ export class TabbarComponent implements OnInit {
})
}
+
+ ngOnChanges() {
+ this.changeLang(this.language);
+ }
+ changeLang(lang){
+ this.inputedLanguage=lang;
+ }
addTab(selectAfterAdding: boolean, label: string, url: string) {
const tab = new Tab(label);