diff --git a/CHANGELOG.md b/CHANGELOG.md index f43a3a121..da7d611cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the handling of the numerical precision in the value component - Improved the account selector of the create or update activity dialog +- Improved the language localization for Spanish (`es`) - Upgraded `angular` from version `18.0.4` to `18.1.1` - Upgraded `Nx` from version `19.4.3` to `19.5.1` +### Fixed + +- Fixed an issue in the public page related to a non-existent access + ## 2.97.0 - 2024-07-20 ### Added diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 19f48fa86..84d4ef532 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -496,9 +496,6 @@ export class PortfolioController { @Param('accessId') accessId ): Promise { const access = await this.accessService.access({ id: accessId }); - const user = await this.userService.user({ - id: access.userId - }); if (!access) { throw new HttpException( @@ -508,6 +505,11 @@ export class PortfolioController { } let hasDetails = true; + + const user = await this.userService.user({ + id: access.userId + }); + if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { hasDetails = user.subscription.type === 'Premium'; } 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 3004a3ec4..76fe7eb97 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,6 +1,7 @@ import { DataService } from '@ghostfolio/client/services/data.service'; import { Product } from '@ghostfolio/common/interfaces'; import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools'; +import { translate } from '@ghostfolio/ui/i18n'; import { CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; @@ -26,6 +27,7 @@ export class GfProductPageComponent implements OnInit { '/' + $localize`resources`, 'personal-finance-tools' ]; + public tags: string[]; public constructor( private dataService: DataService, @@ -56,7 +58,7 @@ export class GfProductPageComponent implements OnInit { ], name: 'Ghostfolio', origin: $localize`Switzerland`, - region: $localize`Global`, + regions: [$localize`Global`], slogan: 'Open Source Wealth Management', useAnonymously: true }; @@ -64,5 +66,41 @@ export class GfProductPageComponent implements OnInit { this.product2 = personalFinanceTools.find(({ key }) => { return key === this.route.snapshot.data['key']; }); + + if (this.product2.origin) { + this.product2.origin = translate(this.product2.origin); + } + + if (this.product2.regions) { + this.product2.regions = this.product2.regions.map((region) => { + return translate(region); + }); + } + + this.tags = [ + this.product1.name, + this.product2.name, + $localize`Alternative`, + $localize`App`, + $localize`Budgeting`, + $localize`Community`, + $localize`Family Office`, + `Fintech`, + $localize`Investment`, + $localize`Investor`, + $localize`Open Source`, + `OSS`, + $localize`Personal Finance`, + $localize`Privacy`, + $localize`Portfolio`, + $localize`Software`, + $localize`Tool`, + $localize`User Experience`, + $localize`Wealth`, + $localize`Wealth Management`, + `WealthTech` + ].sort((a, b) => { + return a.localeCompare(b, undefined, { sensitivity: 'base' }); + }); } } diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html index a8bc1d197..1c7102ed9 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html +++ b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -80,8 +80,24 @@ Region - {{ product1.region }} - {{ product2.region }} + + @for ( + region of product1.regions; + track region; + let isLast = $last + ) { + {{ region }}{{ isLast ? '' : ', ' }} + } + + + @for ( + region of product2.regions; + track region; + let isLast = $last + ) { + {{ region }}{{ isLast ? '' : ', ' }} + } + @@ -236,69 +252,11 @@