diff --git a/apps/client/src/app/core/paths.ts b/apps/client/src/app/core/paths.ts index fbcc7386f..b1255c848 100644 --- a/apps/client/src/app/core/paths.ts +++ b/apps/client/src/app/core/paths.ts @@ -19,6 +19,7 @@ export const paths = { membership: 'membership', open: 'open', p: 'p', + personalFinanceTools: 'personal-finance-tools', portfolio: 'portfolio', settings: 'settings', start: 'start', diff --git a/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts b/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts index ddafa5730..c91c79e09 100644 --- a/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts +++ b/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { User } from '@ghostfolio/common/interfaces'; @@ -13,9 +14,8 @@ import { Subject, takeUntil } from 'rxjs'; }) export class FaqOverviewPageComponent implements OnDestroy { public pricingUrl = - `https://ghostfol.io/${document.documentElement.lang}/` + - $localize`:snake-case:pricing`; - public routerLinkFeatures = ['/' + $localize`:snake-case:features`]; + `https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing; + public routerLinkFeatures = ['/' + paths.features]; public user: User; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/faq/saas/saas-page.component.ts b/apps/client/src/app/pages/faq/saas/saas-page.component.ts index d7ea6cd82..2c85c9e7d 100644 --- a/apps/client/src/app/pages/faq/saas/saas-page.component.ts +++ b/apps/client/src/app/pages/faq/saas/saas-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { User } from '@ghostfolio/common/interfaces'; @@ -13,10 +14,9 @@ import { Subject, takeUntil } from 'rxjs'; }) export class SaasPageComponent implements OnDestroy { public pricingUrl = - `https://ghostfol.io/${document.documentElement.lang}/` + - $localize`:snake-case:pricing`; - public routerLinkMarkets = ['/' + $localize`:snake-case:markets`]; - public routerLinkRegister = ['/' + $localize`:snake-case:register`]; + `https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing; + public routerLinkMarkets = ['/' + paths.markets]; + public routerLinkRegister = ['/' + paths.register]; public user: User; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts b/apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts index f0ff7dbc3..d2f269db1 100644 --- a/apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts +++ b/apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts @@ -1,3 +1,5 @@ +import { paths } from '@ghostfolio/client/core/paths'; + import { Component, OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; @@ -10,8 +12,7 @@ import { Subject } from 'rxjs'; }) export class SelfHostingPageComponent implements OnDestroy { public pricingUrl = - `https://ghostfol.io/${document.documentElement.lang}/` + - $localize`:snake-case:pricing`; + `https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/features/features-page.component.ts b/apps/client/src/app/pages/features/features-page.component.ts index c33f1e99b..7ddcab9f6 100644 --- a/apps/client/src/app/pages/features/features-page.component.ts +++ b/apps/client/src/app/pages/features/features-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { InfoItem, User } from '@ghostfolio/common/interfaces'; @@ -25,8 +26,8 @@ import { Subject, takeUntil } from 'rxjs'; export class GfFeaturesPageComponent implements OnDestroy { public hasPermissionForSubscription: boolean; public info: InfoItem; - public routerLinkRegister = ['/' + $localize`:snake-case:register`]; - public routerLinkResources = ['/' + $localize`:snake-case:resources`]; + public routerLinkRegister = ['/' + paths.register]; + public routerLinkResources = ['/' + paths.resources]; public user: User; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/landing/landing-page.component.ts b/apps/client/src/app/pages/landing/landing-page.component.ts index 4adcbe00a..a60f2f13e 100644 --- a/apps/client/src/app/pages/landing/landing-page.component.ts +++ b/apps/client/src/app/pages/landing/landing-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { Statistics } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; @@ -24,8 +25,8 @@ export class LandingPageComponent implements OnDestroy, OnInit { public hasPermissionForStatistics: boolean; public hasPermissionForSubscription: boolean; public hasPermissionToCreateUser: boolean; - public routerLinkAbout = ['/' + $localize`:snake-case:about`]; - public routerLinkRegister = ['/' + $localize`:snake-case:register`]; + public routerLinkAbout = ['/' + paths.about]; + public routerLinkRegister = ['/' + paths.register]; public statistics: Statistics; public testimonials = [ { diff --git a/apps/client/src/app/pages/pricing/pricing-page.component.ts b/apps/client/src/app/pages/pricing/pricing-page.component.ts index cadc3a48c..16bf56b33 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.component.ts +++ b/apps/client/src/app/pages/pricing/pricing-page.component.ts @@ -1,4 +1,5 @@ import { NotificationService } from '@ghostfolio/client/core/notification/notification.service'; +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { User } from '@ghostfolio/common/interfaces'; @@ -40,8 +41,8 @@ export class PricingPageComponent implements OnDestroy, OnInit { public professionalDataProviderTooltipPremium = translate( 'PROFESSIONAL_DATA_PROVIDER_TOOLTIP_PREMIUM' ); - public routerLinkFeatures = ['/' + $localize`:snake-case:features`]; - public routerLinkRegister = ['/' + $localize`:snake-case:register`]; + public routerLinkFeatures = ['/' + paths.features]; + public routerLinkRegister = ['/' + paths.register]; public user: User; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts index 6dd15045b..c116e301c 100644 --- a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts +++ b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { @@ -30,8 +31,8 @@ export class ShowAccessTokenDialog { public isDisclaimerChecked = false; public role: string; public routerLinkAboutTermsOfService = [ - '/' + $localize`:snake-case:about`, - $localize`:snake-case:terms-of-service` + '/' + paths.about, + paths.termsOfService ]; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts index b6749b5cd..6848af9cd 100644 --- a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts +++ b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { InfoItem } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; @@ -14,8 +15,8 @@ export class ResourcesGlossaryPageComponent implements OnInit { public hasPermissionForSubscription: boolean; public info: InfoItem; public routerLinkResourcesPersonalFinanceTools = [ - '/' + $localize`:snake-case:resources`, - 'personal-finance-tools' + '/' + paths.resources, + paths.personalFinanceTools ]; public constructor(private dataService: DataService) { diff --git a/apps/client/src/app/pages/resources/overview/resources-overview.component.ts b/apps/client/src/app/pages/resources/overview/resources-overview.component.ts index f95e78a26..28fa4c0e5 100644 --- a/apps/client/src/app/pages/resources/overview/resources-overview.component.ts +++ b/apps/client/src/app/pages/resources/overview/resources-overview.component.ts @@ -1,3 +1,5 @@ +import { paths } from '@ghostfolio/client/core/paths'; + import { Component } from '@angular/core'; @Component({ @@ -12,34 +14,25 @@ export class ResourcesOverviewComponent { title: 'Frequently Asked Questions (FAQ)', description: 'Find quick answers to commonly asked questions about Ghostfolio in our Frequently Asked Questions (FAQ) section.', - link: ['/' + $localize`:snake-case:faq`] + link: ['/' + paths.faq] }, { title: 'Guides', description: 'Explore our guides to help you get started with investing and managing your finances.', - link: [ - '/' + $localize`:snake-case:resources`, - $localize`:snake-case:guides` - ] + link: ['/' + paths.resources, paths.guides] }, { title: 'Markets', description: 'Access various market resources and tools to stay informed about financial markets.', - link: [ - '/' + $localize`:snake-case:resources`, - $localize`:snake-case:markets` - ] + link: ['/' + paths.resources, paths.markets] }, { title: 'Glossary', description: 'Learn key financial terms and concepts in our comprehensive glossary.', - link: [ - '/' + $localize`:snake-case:resources`, - $localize`:snake-case:glossary` - ] + link: ['/' + paths.resources, paths.glossary] } ]; } diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts b/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts index c9c0aa044..ffb919611 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts +++ b/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools'; import { Component, OnDestroy } from '@angular/core'; @@ -16,7 +17,7 @@ export class PersonalFinanceToolsPageComponent implements OnDestroy { public personalFinanceTools = personalFinanceTools.sort((a, b) => { return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }); }); - public routerLinkAbout = ['/' + $localize`:snake-case:about`]; + public routerLinkAbout = ['/' + paths.about]; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts index bee5cb642..2bab5124a 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts +++ b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { Product } from '@ghostfolio/common/interfaces'; import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools'; @@ -19,11 +20,11 @@ export class GfProductPageComponent implements OnInit { public price: number; public product1: Product; public product2: Product; - public routerLinkAbout = ['/' + $localize`:snake-case:about`]; - public routerLinkFeatures = ['/' + $localize`:snake-case:features`]; + public routerLinkAbout = ['/' + paths.about]; + public routerLinkFeatures = ['/' + paths.features]; public routerLinkResourcesPersonalFinanceTools = [ - '/' + $localize`:snake-case:resources`, - 'personal-finance-tools' + '/' + paths.resources, + paths.personalFinanceTools ]; public tags: string[]; diff --git a/apps/client/src/app/pages/resources/resources-page-routing.module.ts b/apps/client/src/app/pages/resources/resources-page-routing.module.ts index 753541b7c..97da00292 100644 --- a/apps/client/src/app/pages/resources/resources-page-routing.module.ts +++ b/apps/client/src/app/pages/resources/resources-page-routing.module.ts @@ -39,7 +39,7 @@ const routes: Routes = [ (m) => m.ResourcesMarketsModule ) }, - ...['personal-finance-tools'].map((path) => ({ + ...[paths.personalFinanceTools].map((path) => ({ path, loadChildren: () => import(