Browse Source

Merge branch 'ghostfolio:main' into ca-translations

pull/5308/head
Elisa Falk 3 weeks ago
committed by GitHub
parent
commit
31cadc868b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 52
      apps/api/src/app/endpoints/sitemap/sitemap.service.ts
  3. 5
      apps/api/src/app/user/user.service.ts
  4. 10
      apps/api/src/middlewares/html-template.middleware.ts
  5. 4
      apps/api/src/services/tag/tag.service.ts
  6. 34
      apps/client/src/locales/messages.es.xlf
  7. 4
      package-lock.json
  8. 2
      package.json

4
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

52
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 [
' <url>',
` <loc>${location}</loc>`,
` <lastmod>${currentDate}T00:00:00+00:00</lastmod>`,
' </url>'
].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 [
' <url>',

5
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;

10
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;
}

4
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
}));
}

34
apps/client/src/locales/messages.es.xlf

@ -2236,7 +2236,7 @@
</trans-unit>
<trans-unit id="79310201207169632" datatype="html">
<source>Exclude from Analysis</source>
<target state="new">Exclude from Analysis</target>
<target state="translated">Excluir del análisis</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html</context>
<context context-type="linenumber">90</context>
@ -7154,7 +7154,7 @@
</trans-unit>
<trans-unit id="2937898953036699236" datatype="html">
<source>and I agree to the <x id="START_LINK" ctype="x-a" equiv-text="&lt;a class=&quot;font-weight-bold&quot; target=&quot;_blank&quot; [routerLink]=&quot;routerLinkAboutTermsOfService&quot; &gt;"/>Terms of Service<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a &gt;"/>.</source>
<target state="new">and I agree to the <x id="START_LINK" ctype="x-a" equiv-text="&lt;a class=&quot;font-weight-bold&quot; target=&quot;_blank&quot; [routerLink]=&quot;routerLinkAboutTermsOfService&quot; &gt;"/>Terms of Service<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a &gt;"/>.</target>
<target state="translated">y acepto los <x id="START_LINK" ctype="x-a" equiv-text="&lt;a class=&quot;font-weight-bold&quot; target=&quot;_blank&quot; [routerLink]=&quot;routerLinkAboutTermsOfService&quot; &gt;"/>Términos del servicio<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a&gt;"/>.</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html</context>
<context context-type="linenumber">34</context>
@ -7162,7 +7162,7 @@
</trans-unit>
<trans-unit id="3606972039333274390" datatype="html">
<source><x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>) is already in use.</source>
<target state="new"><x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>) is already in use.</target>
<target state="translated"><x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>) ya está en uso.</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts</context>
<context context-type="linenumber">563</context>
@ -7170,7 +7170,7 @@
</trans-unit>
<trans-unit id="5612909502553004436" datatype="html">
<source>An error occurred while updating to <x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>).</source>
<target state="new">An error occurred while updating to <x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>).</target>
<target state="translated">Ocurrió un error al actualizar a <x id="PH" equiv-text="assetProfileIdentifier.symbol"/> (<x id="PH_1" equiv-text="assetProfileIdentifier.dataSource"/>).</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts</context>
<context context-type="linenumber">571</context>
@ -7468,7 +7468,7 @@
</trans-unit>
<trans-unit id="routes.resources.markets" datatype="html">
<source>markets</source>
<target state="new">markets</target>
<target state="translated">mercados</target>
<note priority="1" from="description">kebab-case</note>
<context-group purpose="location">
<context context-type="sourcefile">libs/common/src/lib/routes/routes.ts</context>
@ -7481,7 +7481,7 @@
</trans-unit>
<trans-unit id="2813275520458225294" datatype="html">
<source> Fuel your <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>self-hosted Ghostfolio<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> with a <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>powerful data provider<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> to access <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>80,000+ tickers<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> from over <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>50 exchanges<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> worldwide. </source>
<target state="new"> Fuel your <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>self-hosted Ghostfolio<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> with a <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>powerful data provider<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> to access <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>80,000+ tickers<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> from over <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>50 exchanges<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> worldwide. </target>
<target state="translated">Alimenta tu <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>Ghostfolio autoalojado<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> con un <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>proveedor de datos potente<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> para acceder a más de <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>80.000 tickers<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> de más de <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>50 intercambios<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> a nivel mundial.</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-settings/admin-settings.component.html</context>
<context context-type="linenumber">16</context>
@ -7489,7 +7489,7 @@
</trans-unit>
<trans-unit id="4579866450954197004" datatype="html">
<source>Get Access</source>
<target state="new">Get Access</target>
<target state="translated">Obtener acceso</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-settings/admin-settings.component.html</context>
<context context-type="linenumber">27</context>
@ -7497,7 +7497,7 @@
</trans-unit>
<trans-unit id="819996403327805209" datatype="html">
<source>Learn more</source>
<target state="new">Learn more</target>
<target state="translated">Aprender más</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-settings/admin-settings.component.html</context>
<context context-type="linenumber">38</context>
@ -7505,7 +7505,7 @@
</trans-unit>
<trans-unit id="5743832581969115624" datatype="html">
<source>Limited Offer!</source>
<target state="new">Limited Offer!</target>
<target state="translated">¡Oferta limitada!</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/pricing/pricing-page.html</context>
<context context-type="linenumber">312</context>
@ -7513,7 +7513,7 @@
</trans-unit>
<trans-unit id="2415916442984615985" datatype="html">
<source>Get <x id="INTERPOLATION" equiv-text="{{ durationExtension }}"/> extra</source>
<target state="new">Get <x id="INTERPOLATION" equiv-text="{{ durationExtension }}"/> extra</target>
<target state="translated">Obtén <x id="INTERPOLATION" equiv-text="{{ durationExtension }}"/> extra</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/pricing/pricing-page.html</context>
<context context-type="linenumber">314</context>
@ -7521,7 +7521,7 @@
</trans-unit>
<trans-unit id="3955868613858648955" datatype="html">
<source>Available</source>
<target state="new">Available</target>
<target state="translated">Disponible</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/data-provider-status/data-provider-status.component.html</context>
<context context-type="linenumber">3</context>
@ -7529,7 +7529,7 @@
</trans-unit>
<trans-unit id="5643561794785412000" datatype="html">
<source>Unavailable</source>
<target state="new">Unavailable</target>
<target state="translated">No disponible</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/data-provider-status/data-provider-status.component.html</context>
<context context-type="linenumber">5</context>
@ -7537,7 +7537,7 @@
</trans-unit>
<trans-unit id="7387635272539030076" datatype="html">
<source>new</source>
<target state="new">new</target>
<target state="translated">nuevo</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/components/admin-settings/admin-settings.component.html</context>
<context context-type="linenumber">67</context>
@ -7549,7 +7549,7 @@
</trans-unit>
<trans-unit id="rule.accountClusterRiskCurrentInvestment" datatype="html">
<source>Investment</source>
<target state="new">Investment</target>
<target state="translated">Inversión</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">15</context>
@ -7557,7 +7557,7 @@
</trans-unit>
<trans-unit id="rule.accountClusterRiskCurrentInvestment.false" datatype="html">
<source> Over ${thresholdMax}% of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) </source>
<target state="new"> Over ${thresholdMax}% of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) </target>
<target state="translated">Más del ${thresholdMax}% de tu inversión actual está en ${maxAccountName} (${maxInvestmentRatio}%)</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">17</context>
@ -7565,7 +7565,7 @@
</trans-unit>
<trans-unit id="rule.accountClusterRiskCurrentInvestment.true" datatype="html">
<source> The major part of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) and does not exceed ${thresholdMax}% </source>
<target state="new"> The major part of your current investment is at ${maxAccountName} (${maxInvestmentRatio}%) and does not exceed ${thresholdMax}% </target>
<target state="translated">La mayor parte de tu inversión actual está en ${maxAccountName} (${maxInvestmentRatio}%) y no excede el ${thresholdMax}%</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">24</context>
@ -7573,7 +7573,7 @@
</trans-unit>
<trans-unit id="rule.assetClassClusterRiskEquity" datatype="html">
<source>Equity</source>
<target state="new">Equity</target>
<target state="translated">Acciones</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/i18n/i18n-page.html</context>
<context context-type="linenumber">41</context>

4
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": {

2
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",

Loading…
Cancel
Save