From d90d975a344200cb61f423ac76b407e0c26d0633 Mon Sep 17 00:00:00 2001 From: raniamorheg <45526523+raniamorheg@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:17:48 +0100 Subject: [PATCH] fix menu translation (#530) --- src/app/layout/components/header/header.component.ts | 2 ++ src/app/user-settings/components/info/info.component.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/app/layout/components/header/header.component.ts b/src/app/layout/components/header/header.component.ts index 59b284361..38689b369 100755 --- a/src/app/layout/components/header/header.component.ts +++ b/src/app/layout/components/header/header.component.ts @@ -267,10 +267,12 @@ export class HeaderComponent implements OnInit, OnDestroy, AfterViewInit { // @ts-ignore this.languageSelected = this.tokenStorageService.getLocale(); translate.setDefaultLang(this.languageSelected); + this.fixMenuItemsWidth() } else { this.tokenStorageService.setLocalLang('en'); this.languageSelected = 'en'; translate.setDefaultLang('en'); + this.fixMenuItemsWidth() } // translate.onLangChange // .pipe(takeUntil(this.isDestroyed$)) diff --git a/src/app/user-settings/components/info/info.component.ts b/src/app/user-settings/components/info/info.component.ts index 5d4f49c82..d81820e9a 100755 --- a/src/app/user-settings/components/info/info.component.ts +++ b/src/app/user-settings/components/info/info.component.ts @@ -46,6 +46,7 @@ import { AccountFacadeService } from '@app/core/facades/account-facade/account-f import { DOCUMENT, isPlatformBrowser } from '@angular/common'; import { TokenStorageService } from '@app/core/services/tokenStorage/token-storage-service.service'; import { HttpErrorResponse } from '@angular/common/http'; +import { environment } from '@environments/environment'; declare var $: any; export class MyErrorStateMatcher implements ErrorStateMatcher { isErrorState( @@ -235,6 +236,11 @@ export class InfoComponent implements OnInit, OnDestroy { this.translate.use(lang); this.langSwiched = true; this.langchoosen = lang; + if (isPlatformBrowser(this.platformId)) + window.open( environment.domainName + '/settings/edit', '_self'); + + + } selectedGender(gender: any) { this.isDirty = true;