Revert "Task/refactor language in various components (#6078)" (#6081)

This reverts commit 80c278555c.
pull/6084/head
Thomas Kaul 5 months ago committed by GitHub
parent b41f382f81
commit 1dd5ff51ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -243,7 +243,7 @@ export class GfAppComponent implements OnDestroy, OnInit {
this.tokenStorageService.signOut();
this.userService.remove();
document.location.href = `/${$localize.locale}`;
document.location.href = `/${document.documentElement.lang}`;
}
public ngOnDestroy() {

@ -224,7 +224,7 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit {
this.tokenStorageService.signOut();
this.userService.remove();
document.location.href = `/${$localize.locale}`;
document.location.href = `/${document.documentElement.lang}`;
}
},
message: accessToken,

@ -335,7 +335,7 @@ export class GfHeaderComponent implements OnChanges {
.subscribe((user) => {
const userLanguage = user?.settings?.language;
if (userLanguage && $localize.locale !== userLanguage) {
if (userLanguage && document.documentElement.lang !== userLanguage) {
window.location.href = `../${userLanguage}`;
} else {
this.router.navigate(['/']);

@ -164,7 +164,7 @@ export class GfUserAccountAccessComponent implements OnDestroy, OnInit {
this.tokenStorageService.signOut();
this.userService.remove();
document.location.href = `/${$localize.locale}`;
document.location.href = `/${document.documentElement.lang}`;
},
message: accessToken,
title: $localize`Security token`

@ -78,8 +78,7 @@ export class GfUserAccountSettingsComponent implements OnDestroy, OnInit {
public isAccessTokenHidden = true;
public isFingerprintSupported = this.doesBrowserSupportAuthn();
public isWebAuthnEnabled: boolean;
public language = $localize.locale;
public language = document.documentElement.lang;
public locales = [
'ca',
'de',
@ -200,7 +199,7 @@ export class GfUserAccountSettingsComponent implements OnDestroy, OnInit {
this.tokenStorageService.signOut();
this.userService.remove();
document.location.href = `/${this.language}`;
document.location.href = `/${document.documentElement.lang}`;
});
},
confirmType: ConfirmationDialogType.Warn,

@ -64,9 +64,9 @@ export class AuthGuard {
.subscribe((user) => {
const userLanguage = user?.settings?.language;
if (userLanguage && $localize.locale !== userLanguage) {
if (userLanguage && document.documentElement.lang !== userLanguage) {
this.dataService
.putUserSetting({ language: $localize.locale })
.putUserSetting({ language: document.documentElement.lang })
.subscribe(() => {
this.userService.remove();

@ -22,7 +22,7 @@ import { Subject, takeUntil } from 'rxjs';
templateUrl: './faq-overview-page.html'
})
export class GfFaqOverviewPageComponent implements OnDestroy {
public pricingUrl = `https://ghostfol.io/${$localize.locale}/${publicRoutes.pricing.path}`;
public pricingUrl = `https://ghostfol.io/${document.documentElement.lang}/${publicRoutes.pricing.path}`;
public routerLinkFeatures = publicRoutes.features.routerLink;
public user: User;

@ -22,7 +22,7 @@ import { Subject, takeUntil } from 'rxjs';
templateUrl: './saas-page.html'
})
export class GfSaasPageComponent implements OnDestroy {
public pricingUrl = `https://ghostfol.io/${$localize.locale}/${publicRoutes.pricing.path}`;
public pricingUrl = `https://ghostfol.io/${document.documentElement.lang}/${publicRoutes.pricing.path}`;
public routerLinkAccount = internalRoutes.account.routerLink;
public routerLinkAccountMembership =
internalRoutes.account.subRoutes.membership.routerLink;

@ -15,7 +15,7 @@ import { Subject } from 'rxjs';
templateUrl: './self-hosting-page.html'
})
export class GfSelfHostingPageComponent implements OnDestroy {
public pricingUrl = `https://ghostfol.io/${$localize.locale}/${publicRoutes.pricing.path}`;
public pricingUrl = `https://ghostfol.io/${document.documentElement.lang}/${publicRoutes.pricing.path}`;
private unsubscribeSubject = new Subject<void>();

Loading…
Cancel
Save