From 02dc7c52b1773687b71f76867f68e49674513c28 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 20 Aug 2023 10:01:40 +0200 Subject: [PATCH] Localize routes (#2250) * Localize about path * Localize faq path * Localize features path * Localize markets path * Localize pricing path * Localize register path * Localize resources path * Extend sitemap --- apps/api/src/assets/sitemap.xml | 22 +- apps/client/src/app/app-routing.module.ts | 61 +- apps/client/src/app/app.component.html | 39 +- apps/client/src/app/app.component.ts | 27 + .../components/header/header.component.html | 56 +- .../app/components/header/header.component.ts | 11 + .../home-summary/home-summary.component.ts | 2 +- ...scription-interstitial-dialog.component.ts | 2 + .../subscription-interstitial-dialog.html | 2 +- apps/client/src/app/core/auth.guard.ts | 24 +- .../src/app/core/http-response.interceptor.ts | 2 +- .../pages/about/about-page-routing.module.ts | 32 +- .../app/pages/about/about-page.component.ts | 10 +- .../about/oss-friends/oss-friends-page.html | 2 +- .../overview/about-overview-page.component.ts | 2 + .../about/overview/about-overview-page.html | 4 +- apps/client/src/app/pages/about/routes.ts | 9 - .../hallo-ghostfolio-page.component.ts | 5 +- .../hallo-ghostfolio-page.html | 4 +- .../hello-ghostfolio-page.component.ts | 5 +- .../hello-ghostfolio-page.html | 4 +- ...st-months-in-open-source-page.component.ts | 4 +- .../first-months-in-open-source-page.html | 2 +- ...get-my-finances-in-order-page.component.ts | 4 +- ...ow-do-i-get-my-finances-in-order-page.html | 6 +- .../500-stars-on-github-page.component.ts | 5 +- .../500-stars-on-github-page.html | 8 +- .../black-friday-2022-page.component.ts | 3 +- .../black-friday-2022-page.html | 7 +- .../1000-stars-on-github-page.component.ts | 5 +- .../1000-stars-on-github-page.html | 8 +- ...otential-with-ghostfolio-page.component.ts | 5 +- ...ancial-potential-with-ghostfolio-page.html | 16 +- ...ploring-the-path-to-fire-page.component.ts | 4 +- .../exploring-the-path-to-fire-page.html | 8 +- .../src/app/pages/faq/faq-page.component.ts | 4 + apps/client/src/app/pages/faq/faq-page.html | 30 +- apps/client/src/app/pages/faq/routes.ts | 10 - .../pages/features/features-page.component.ts | 1 + .../src/app/pages/features/features-page.html | 4 +- apps/client/src/app/pages/features/routes.ts | 8 - .../pages/landing/landing-page.component.ts | 2 + .../src/app/pages/landing/landing-page.html | 16 +- apps/client/src/app/pages/markets/routes.ts | 9 - .../pages/pricing/pricing-page.component.ts | 2 + .../src/app/pages/pricing/pricing-page.html | 6 +- apps/client/src/app/pages/pricing/routes.ts | 10 - apps/client/src/app/pages/register/routes.ts | 10 - ...sonal-finance-tools-page-routing.module.ts | 2 +- .../personal-finance-tools-page.component.ts | 2 + .../personal-finance-tools-page.html | 10 +- .../product-page-template.html | 13 +- .../products/altoo-page.component.ts | 7 + .../products/copilot-money-page.component.ts | 7 + .../products/delta-page.component.ts | 7 + .../products/divvydiary-page.component.ts | 7 + .../products/exirio-page.component.ts | 7 + .../products/folishare-page.component.ts | 7 + .../products/getquin-page.component.ts | 7 + .../products/gospatz-page.component.ts | 7 + .../products/justetf-page.component.ts | 7 + .../products/kubera-page.component.ts | 7 + .../products/markets.sh-page.component.ts | 7 + .../products/maybe-finance-page.component.ts | 7 + .../products/monse-page.component.ts | 7 + .../products/parqet-page.component.ts | 7 + .../products/plannix-page.component.ts | 7 + ...rtfolio-dividend-tracker-page.component.ts | 7 + .../products/portseido-page.component.ts | 7 + .../products/projectionlab-page.component.ts | 7 + .../products/seeking-alpha-page.component.ts | 7 + .../products/sharesight-page.component.ts | 7 + .../simple-portfolio-page.component.ts | 7 + .../snowball-analytics-page.component.ts | 7 + .../products/sumio-page.component.ts | 7 + .../products/utluna-page.component.ts | 7 + .../products/yeekatee-page.component.ts | 7 + .../resources/resources-page.component.ts | 4 + .../app/pages/resources/resources-page.html | 2 +- apps/client/src/app/pages/resources/routes.ts | 9 - .../pages/user-account/user-account-page.html | 2 +- apps/client/src/locales/messages.de.xlf | 2232 ++++++++++------ apps/client/src/locales/messages.es.xlf | 2234 ++++++++++------ apps/client/src/locales/messages.fr.xlf | 2234 ++++++++++------ apps/client/src/locales/messages.it.xlf | 2236 +++++++++++------ apps/client/src/locales/messages.nl.xlf | 2234 ++++++++++------ apps/client/src/locales/messages.pt.xlf | 2234 ++++++++++------ apps/client/src/locales/messages.xlf | 2218 ++++++++++------ 88 files changed, 10932 insertions(+), 5431 deletions(-) delete mode 100644 apps/client/src/app/pages/about/routes.ts delete mode 100644 apps/client/src/app/pages/faq/routes.ts delete mode 100644 apps/client/src/app/pages/features/routes.ts delete mode 100644 apps/client/src/app/pages/markets/routes.ts delete mode 100644 apps/client/src/app/pages/pricing/routes.ts delete mode 100644 apps/client/src/app/pages/register/routes.ts delete mode 100644 apps/client/src/app/pages/resources/routes.ts diff --git a/apps/api/src/assets/sitemap.xml b/apps/api/src/assets/sitemap.xml index 74457def8..10f20ca46 100644 --- a/apps/api/src/assets/sitemap.xml +++ b/apps/api/src/assets/sitemap.xml @@ -322,6 +322,10 @@ https://ghostfol.io/es/sobre/licencia ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/es/sobre/oss-friends + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/es/sobre/politica-de-privacidad ${currentDate}T00:00:00+00:00 @@ -342,6 +346,10 @@ https://ghostfol.io/fr/a-propos/licence ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/fr/a-propos/oss-friends + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/fr/a-propos/politique-de-confidentialite ${currentDate}T00:00:00+00:00 @@ -396,12 +404,16 @@ https://ghostfol.io/it/informazioni-su/changelog ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/it/informazioni-su/informativa-sulla-privacy + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/it/informazioni-su/licenza ${currentDate}T00:00:00+00:00 - https://ghostfol.io/it/informazioni-su/informativa-sulla-privacy + https://ghostfol.io/it/informazioni-su/oss-friends ${currentDate}T00:00:00+00:00 @@ -460,6 +472,10 @@ https://ghostfol.io/nl/over/licentie ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/nl/over/oss-friends + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/nl/over/privacybeleid ${currentDate}T00:00:00+00:00 @@ -520,6 +536,10 @@ https://ghostfol.io/pt/sobre/licenca ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/pt/sobre/oss-friends + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/pt/sobre/politica-de-privacidade ${currentDate}T00:00:00+00:00 diff --git a/apps/client/src/app/app-routing.module.ts b/apps/client/src/app/app-routing.module.ts index b5548afd4..f82bad864 100644 --- a/apps/client/src/app/app-routing.module.ts +++ b/apps/client/src/app/app-routing.module.ts @@ -1,22 +1,27 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes, TitleStrategy } from '@angular/router'; -import { routes as aboutRoutes } from '@ghostfolio/client/pages/about/routes'; -import { routes as faqRoutes } from '@ghostfolio/client/pages/faq/routes'; -import { routes as featuresRoutes } from '@ghostfolio/client/pages/features/routes'; -import { routes as marketsRoutes } from '@ghostfolio/client/pages/markets/routes'; -import { routes as pricingRoutes } from '@ghostfolio/client/pages/pricing/routes'; -import { routes as registerRoutes } from '@ghostfolio/client/pages/register/routes'; -import { routes as resourcesRoutes } from '@ghostfolio/client/pages/resources/routes'; import { PageTitleStrategy } from '@ghostfolio/client/services/page-title.strategy'; import { ModulePreloadService } from './core/module-preload.service'; +export const paths = { + about: $localize`about`, + faq: $localize`faq`, + features: $localize`features`, + license: $localize`license`, + markets: $localize`markets`, + pricing: $localize`pricing`, + privacyPolicy: $localize`privacy-policy`, + register: $localize`register`, + resources: $localize`resources` +}; + const routes: Routes = [ - ...aboutRoutes.map((path) => ({ - path, + { + path: paths.about, loadChildren: () => import('./pages/about/about-page.module').then((m) => m.AboutPageModule) - })), + }, { path: 'account', loadChildren: () => @@ -51,30 +56,30 @@ const routes: Routes = [ loadChildren: () => import('./pages/demo/demo-page.module').then((m) => m.DemoPageModule) }, - ...faqRoutes.map((path) => ({ - path, + { + path: paths.faq, loadChildren: () => import('./pages/faq/faq-page.module').then((m) => m.FaqPageModule) - })), - ...featuresRoutes.map((path) => ({ - path, + }, + { + path: paths.features, loadChildren: () => import('./pages/features/features-page.module').then( (m) => m.FeaturesPageModule ) - })), + }, { path: 'home', loadChildren: () => import('./pages/home/home-page.module').then((m) => m.HomePageModule) }, - ...marketsRoutes.map((path) => ({ - path, + { + path: paths.markets, loadChildren: () => import('./pages/markets/markets-page.module').then( (m) => m.MarketsPageModule ) - })), + }, { path: 'open', loadChildren: () => @@ -94,27 +99,27 @@ const routes: Routes = [ (m) => m.PortfolioPageModule ) }, - ...pricingRoutes.map((path) => ({ - path, + { + path: paths.pricing, loadChildren: () => import('./pages/pricing/pricing-page.module').then( (m) => m.PricingPageModule ) - })), - ...registerRoutes.map((path) => ({ - path, + }, + { + path: paths.register, loadChildren: () => import('./pages/register/register-page.module').then( (m) => m.RegisterPageModule ) - })), - ...resourcesRoutes.map((path) => ({ - path, + }, + { + path: paths.resources, loadChildren: () => import('./pages/resources/resources-page.module').then( (m) => m.ResourcesPageModule ) - })), + }, { path: 'start', loadChildren: () => diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index af40ec4fb..c9457cfc0 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -19,7 +19,7 @@
-