diff --git a/CHANGELOG.md b/CHANGELOG.md index 799b92ff9..0db3b4f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 2.188.0 - 2025-08-02 ### Changed +- Enhanced the performance of the dynamically composed sitemap - Improved the language localization for Polish (`pl`) +- Improved the language localization for Spanish (`es`) ## 2.187.0 - 2025-08-02 diff --git a/apps/api/src/app/endpoints/sitemap/sitemap.service.ts b/apps/api/src/app/endpoints/sitemap/sitemap.service.ts index d18fe884a..3774d2274 100644 --- a/apps/api/src/app/endpoints/sitemap/sitemap.service.ts +++ b/apps/api/src/app/endpoints/sitemap/sitemap.service.ts @@ -21,18 +21,42 @@ export class SitemapService { const rootUrl = this.configurationService.get('ROOT_URL'); return SUPPORTED_LANGUAGE_CODES.flatMap((languageCode) => { + const resourcesPath = this.i18nService.getTranslation({ + languageCode, + id: publicRoutes.resources.path.match( + SitemapService.TRANSLATION_TAGGED_MESSAGE_REGEX + ).groups.id + }); + + const personalFinanceToolsPath = this.i18nService.getTranslation({ + languageCode, + id: publicRoutes.resources.subRoutes.personalFinanceTools.path.match( + SitemapService.TRANSLATION_TAGGED_MESSAGE_REGEX + ).groups.id + }); + + const productPath = this.i18nService.getTranslation({ + languageCode, + id: publicRoutes.resources.subRoutes.personalFinanceTools.subRoutes.product.path.match( + SitemapService.TRANSLATION_TAGGED_MESSAGE_REGEX + ).groups.id + }); + return personalFinanceTools.map(({ alias, key }) => { - const route = - publicRoutes.resources.subRoutes.personalFinanceTools.subRoutes - .product; - const params = { - currentDate, - languageCode, + const location = [ rootUrl, - urlPostfix: alias ?? key - }; - - return this.createRouteSitemapUrl({ ...params, route }); + languageCode, + resourcesPath, + personalFinanceToolsPath, + `${productPath}-${alias ?? key}` + ].join('/'); + + return [ + ' ', + ` ${location}`, + ` ${currentDate}T00:00:00+00:00`, + ' ' + ].join('\n'); }); }).join('\n'); } @@ -58,14 +82,12 @@ export class SitemapService { currentDate, languageCode, rootUrl, - route, - urlPostfix + route }: { currentDate: string; languageCode: string; rootUrl: string; route?: PublicRoute; - urlPostfix?: string; }): string { const segments = route?.routerLink.map((link) => { @@ -83,9 +105,7 @@ export class SitemapService { return segment.replace(/^\/+|\/+$/, ''); }) ?? []; - const location = - [rootUrl, languageCode, ...segments].join('/') + - (urlPostfix ? `-${urlPostfix}` : ''); + const location = [rootUrl, languageCode, ...segments].join('/'); return [ ' ', diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index a043761fa..405c4c0b0 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -28,6 +28,7 @@ import { DEFAULT_LANGUAGE_CODE, PROPERTY_IS_READ_ONLY_MODE, PROPERTY_SYSTEM_MESSAGE, + TAG_ID_EXCLUDE_FROM_ANALYSIS, locale } from '@ghostfolio/common/config'; import { @@ -121,7 +122,9 @@ export class UserService { const access = userData[0]; const activitiesCount = userData[1]; const firstActivity = userData[2]; - let tags = userData[3]; + let tags = userData[3].filter((tag) => { + return tag.id !== TAG_ID_EXCLUDE_FROM_ANALYSIS; + }); let systemMessage: SystemMessage; diff --git a/apps/api/src/middlewares/html-template.middleware.ts b/apps/api/src/middlewares/html-template.middleware.ts index 5cf353e9a..75ec37480 100644 --- a/apps/api/src/middlewares/html-template.middleware.ts +++ b/apps/api/src/middlewares/html-template.middleware.ts @@ -154,13 +154,9 @@ export class HtmlTemplateMiddleware implements NestMiddleware { if (filename === '/assets/LICENSE') { return true; } else if ( - filename.includes('auth/ey') || - filename.includes( - 'personal-finance-tools/open-source-alternative-to-de.fi' - ) || - filename.includes( - 'personal-finance-tools/open-source-alternative-to-markets.sh' - ) + filename.endsWith('-de.fi') || + filename.endsWith('-markets.sh') || + filename.includes('auth/ey') ) { return false; } diff --git a/apps/api/src/services/tag/tag.service.ts b/apps/api/src/services/tag/tag.service.ts index c38abe592..eb2d7bfef 100644 --- a/apps/api/src/services/tag/tag.service.ts +++ b/apps/api/src/services/tag/tag.service.ts @@ -1,5 +1,4 @@ import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; -import { TAG_ID_EXCLUDE_FROM_ANALYSIS } from '@ghostfolio/common/config'; import { Injectable } from '@nestjs/common'; import { Prisma, Tag } from '@prisma/client'; @@ -80,8 +79,7 @@ export class TagService { id, name, userId, - isUsed: - _count.activities > 0 && ![TAG_ID_EXCLUDE_FROM_ANALYSIS].includes(id) + isUsed: _count.activities > 0 })); } diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index eea43de11..47ced2075 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -2236,7 +2236,7 @@ Exclude from Analysis - Exclude from Analysis + Excluir del análisis apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html 90 @@ -7154,7 +7154,7 @@ and I agree to the Terms of Service. - and I agree to the Terms of Service. + y acepto los Términos del servicio. apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 34 @@ -7162,7 +7162,7 @@ () is already in use. - () is already in use. + () ya está en uso. apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 563 @@ -7170,7 +7170,7 @@ An error occurred while updating to (). - An error occurred while updating to (). + Ocurrió un error al actualizar a (). apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 571 @@ -7468,7 +7468,7 @@ markets - markets + mercados kebab-case libs/common/src/lib/routes/routes.ts @@ -7481,7 +7481,7 @@ Fuel your self-hosted Ghostfolio with a powerful data provider to access 80,000+ tickers from over 50 exchanges worldwide. - Fuel your self-hosted Ghostfolio with a powerful data provider to access 80,000+ tickers from over 50 exchanges worldwide. + Alimenta tu Ghostfolio autoalojado con un proveedor de datos potente para acceder a más de 80.000 tickers de más de 50 intercambios a nivel mundial. apps/client/src/app/components/admin-settings/admin-settings.component.html 16 @@ -7489,7 +7489,7 @@ Get Access - Get Access + Obtener acceso apps/client/src/app/components/admin-settings/admin-settings.component.html 27 @@ -7497,7 +7497,7 @@ Learn more - Learn more + Aprender más apps/client/src/app/components/admin-settings/admin-settings.component.html 38 @@ -7505,7 +7505,7 @@ Limited Offer! - Limited Offer! + ¡Oferta limitada! apps/client/src/app/pages/pricing/pricing-page.html 312 @@ -7513,7 +7513,7 @@ Get extra - Get extra + Obtén extra apps/client/src/app/pages/pricing/pricing-page.html 314 @@ -7521,7 +7521,7 @@ Available - Available + Disponible apps/client/src/app/components/data-provider-status/data-provider-status.component.html 3 @@ -7529,7 +7529,7 @@ Unavailable - Unavailable + No disponible apps/client/src/app/components/data-provider-status/data-provider-status.component.html 5 @@ -7537,7 +7537,7 @@ new - new + nuevo apps/client/src/app/components/admin-settings/admin-settings.component.html 67 @@ -7549,7 +7549,7 @@ Investment - Investment + Inversión apps/client/src/app/pages/i18n/i18n-page.html 15 @@ -7557,7 +7557,7 @@ Over ${thresholdMax}% of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) - Over ${thresholdMax}% of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) + Más del ${thresholdMax}% de tu inversión actual está en ${maxAccountName} (${maxInvestmentRatio}%) apps/client/src/app/pages/i18n/i18n-page.html 17 @@ -7565,7 +7565,7 @@ The major part of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) and does not exceed ${thresholdMax}% - The major part of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) and does not exceed ${thresholdMax}% + La mayor parte de tu inversión actual está en ${maxAccountName} (${maxInvestmentRatio}%) y no excede el ${thresholdMax}% apps/client/src/app/pages/i18n/i18n-page.html 24 @@ -7573,7 +7573,7 @@ Equity - Equity + Acciones apps/client/src/app/pages/i18n/i18n-page.html 41 diff --git a/package-lock.json b/package-lock.json index 7092c3dfa..a3e675fa6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "2.187.0", + "version": "2.188.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "2.187.0", + "version": "2.188.0", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index accf4ae35..396a9cfd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.187.0", + "version": "2.188.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio",