From 1215803a40400f54a908ee6c2747e244759197b2 Mon Sep 17 00:00:00 2001 From: andiz2 Date: Fri, 9 May 2025 11:48:43 +0300 Subject: [PATCH 1/3] Bugfix/fix ApiKeyStrategy error (#4682) * Fix ApiKeyStrategy error --- apps/api/src/app/auth/api-key.strategy.ts | 45 ++++++++++------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/apps/api/src/app/auth/api-key.strategy.ts b/apps/api/src/app/auth/api-key.strategy.ts index e1e067ab..e99d6aed 100644 --- a/apps/api/src/app/auth/api-key.strategy.ts +++ b/apps/api/src/app/auth/api-key.strategy.ts @@ -21,38 +21,31 @@ export class ApiKeyStrategy extends PassportStrategy( private readonly prismaService: PrismaService, private readonly userService: UserService ) { - super({ header: HEADER_KEY_TOKEN, prefix: 'Api-Key ' }, true); + super({ header: HEADER_KEY_TOKEN, prefix: 'Api-Key ' }, false); } - public async validate( - apiKey: string, - done: (error: any, user?: any) => void - ) { - try { - const user = await this.validateApiKey(apiKey); + public async validate(apiKey: string) { + const user = await this.validateApiKey(apiKey); - if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { - if (hasRole(user, 'INACTIVE')) { - throw new HttpException( - getReasonPhrase(StatusCodes.TOO_MANY_REQUESTS), - StatusCodes.TOO_MANY_REQUESTS - ); - } - - await this.prismaService.analytics.upsert({ - create: { User: { connect: { id: user.id } } }, - update: { - activityCount: { increment: 1 }, - lastRequestAt: new Date() - }, - where: { userId: user.id } - }); + if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { + if (hasRole(user, 'INACTIVE')) { + throw new HttpException( + getReasonPhrase(StatusCodes.TOO_MANY_REQUESTS), + StatusCodes.TOO_MANY_REQUESTS + ); } - done(null, user); - } catch (error) { - done(error, null); + await this.prismaService.analytics.upsert({ + create: { User: { connect: { id: user.id } } }, + update: { + activityCount: { increment: 1 }, + lastRequestAt: new Date() + }, + where: { userId: user.id } + }); } + + return user; } private async validateApiKey(apiKey: string) { From c81d3ced750db394d67f46eaab1efc0388292b7a Mon Sep 17 00:00:00 2001 From: Georgine Forner Date: Fri, 9 May 2025 16:03:47 +0600 Subject: [PATCH 2/3] Feature/improve language localization for IT 20250509 (#4681) * Improve language localization for IT 20250509 * Update changelog --- CHANGELOG.md | 1 + apps/client/src/locales/messages.it.xlf | 164 ++++++++++++------------ 2 files changed, 83 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd31d81..5a7e9eab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Improved the language localization for Catalan (`ca`) +- Improved the language localization for Italian (`it`) - Upgraded `nestjs` from version `10.4.15` to `11.0.12` ## 2.161.0 - 2025-05-06 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index a942ebd7..3b6b222c 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1268,7 +1268,7 @@ Please set the amount of your emergency fund. - Inserisci l’importo del tuo fondo di emergenza: + Inserisci l’importo del tuo fondo di emergenza: apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts 64 @@ -1616,7 +1616,7 @@ Please enter your coupon code. - Inserisci il tuo codice del buono: + Inserisci il tuo codice del buono: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts 201 @@ -2824,7 +2824,7 @@ Hello, has shared a Portfolio with you! - Salve, ha condiviso un Portafoglio con te! + Salve, ha condiviso un Portafoglio con te! apps/client/src/app/pages/public/public-page.html 4 @@ -7037,7 +7037,7 @@ Change with currency effect Change - Cambio con effetto valuta Cambia + Cambio con effetto valuta Cambia apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html 50 @@ -7045,7 +7045,7 @@ Performance with currency effect Performance - Prestazioni con effetto valuta Prestazioni + Prestazioni con effetto valuta Prestazioni apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html 69 @@ -7277,7 +7277,7 @@ Set API key - Imposta API Key + Imposta API Key apps/client/src/app/components/admin-settings/admin-settings.component.html 83 @@ -7285,7 +7285,7 @@ Get access to 80’000+ tickers from over 50 exchanges - Ottieni accesso a oltre 100’000+ titoli da oltre 50 borse + Ottieni accesso a oltre 80’000+ titoli da oltre 50 borse libs/ui/src/lib/i18n.ts 24 @@ -7359,7 +7359,7 @@ Threshold range - Threshold range + Range soglia apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html 9 @@ -7367,7 +7367,7 @@ Ghostfolio X-ray uses static analysis to uncover potential issues and risks in your portfolio. Adjust the rules below and set custom thresholds to align with your personal investment strategy. - Ghostfolio X-ray uses static analysis to uncover potential issues and risks in your portfolio. Adjust the rules below and set custom thresholds to align with your personal investment strategy. + Ghostfolio X-ray utilizza l’analisi statica per scoprire potenziali problemi e rischi nel tuo portafoglio. Modifica le regole qui sotto e imposta soglie personalizzate per allinearti alla tua strategia di investimento personale. apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 5 @@ -7375,7 +7375,7 @@ Economic Market Cluster Risks - Economic Market Cluster Risks + Rischi del cluster di mercato economico apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 165 @@ -7383,7 +7383,7 @@ of - of + di apps/client/src/app/components/admin-settings/admin-settings.component.html 52 @@ -7391,7 +7391,7 @@ daily requests - daily requests + richieste giornaliere apps/client/src/app/components/admin-settings/admin-settings.component.html 54 @@ -7399,7 +7399,7 @@ Remove API key - Remove API key + Rimuovi API key apps/client/src/app/components/admin-settings/admin-settings.component.html 71 @@ -7407,7 +7407,7 @@ Do you really want to delete the API key? - Do you really want to delete the API key? + Vuoi davvero eliminare l’API key? apps/client/src/app/components/admin-settings/admin-settings.component.ts 96 @@ -7415,7 +7415,7 @@ Please enter your Ghostfolio API key: - Please enter your Ghostfolio API key: + Inserisci la tua API key di Ghostfolio: apps/client/src/app/pages/api/api-page.component.ts 41 @@ -7423,7 +7423,7 @@ I have an API key - I have an API key + Ho un API key apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html 39 @@ -7431,7 +7431,7 @@ API Requests Today - API Requests Today + Richieste API oggi apps/client/src/app/components/admin-users/admin-users.html 178 @@ -7439,7 +7439,7 @@ Could not generate an API key - Could not generate an API key + Non è stato possibile generare un API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts 127 @@ -7447,7 +7447,7 @@ Set this API key in your self-hosted environment: - Set this API key in your self-hosted environment: + Imposta questa API key nel tuo ambiente self-hosted: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts 142 @@ -7455,7 +7455,7 @@ Ghostfolio Premium Data Provider API Key - Ghostfolio Premium Data Provider API Key + API Key for Ghostfolio Premium Data Provider apps/client/src/app/components/user-account-membership/user-account-membership.component.ts 145 @@ -7463,7 +7463,7 @@ Do you really want to generate a new API key? - Do you really want to generate a new API key? + Vuoi davvero generare una nuova API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts 150 @@ -7471,7 +7471,7 @@ Tag - Tag + Tag libs/ui/src/lib/assistant/assistant.html 157 @@ -7479,7 +7479,7 @@ API Key - API Key + API Key libs/ui/src/lib/membership-card/membership-card.component.html 18 @@ -7487,7 +7487,7 @@ Generate Ghostfolio Premium Data Provider API key for self-hosted environments... - Generate Ghostfolio Premium Data Provider API key for self-hosted environments... + Genera API key per Ghostfolio Premium Data Provider per ambienti self-hosted... libs/ui/src/lib/membership-card/membership-card.component.html 26 @@ -7495,7 +7495,7 @@ out of - out of + fuori apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 56 @@ -7503,7 +7503,7 @@ rules align with your portfolio. - rules align with your portfolio. + le regole si allineano con il tuo portafoglio. apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 58 @@ -7511,7 +7511,7 @@ Save - Save + Salva apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts 62 @@ -7519,7 +7519,7 @@ Asset Class Cluster Risks - Asset Class Cluster Risks + Rischi del cluster di classi di asset apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 117 @@ -7527,7 +7527,7 @@ Me - Me + Me apps/client/src/app/components/user-account-access/user-account-access.component.ts 135 @@ -7535,7 +7535,7 @@ Received Access - Received Access + Accesso ricevuto apps/client/src/app/components/user-account-access/user-account-access.html 3 @@ -7543,7 +7543,7 @@ Please enter your Ghostfolio API key. - Please enter your Ghostfolio API key. + Inserisci la tua API key di Ghostfolio. apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.component.ts 57 @@ -7551,7 +7551,7 @@ AI prompt has been copied to the clipboard - AI prompt has been copied to the clipboard + L’AI prompt è stato copiato negli appunti apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts 173 @@ -7559,7 +7559,7 @@ Link has been copied to the clipboard - Link has been copied to the clipboard + Il link è stato copiato negli appunti apps/client/src/app/components/access-table/access-table.component.ts 65 @@ -7567,7 +7567,7 @@ Early Access - Early Access + Accesso anticipato apps/client/src/app/components/admin-settings/admin-settings.component.html 29 @@ -7575,7 +7575,7 @@ Regional Market Cluster Risks - Regional Market Cluster Risks + Rischi del cluster di mercato regionale apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html 189 @@ -7583,7 +7583,7 @@ Lazy - Lazy + Pigro apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 138 @@ -7591,7 +7591,7 @@ Instant - Instant + Istantaneo apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 142 @@ -7599,7 +7599,7 @@ Default Market Price - Default Market Price + Prezzo di mercato predefinito apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 386 @@ -7607,7 +7607,7 @@ Mode - Mode + Modalità apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 423 @@ -7615,7 +7615,7 @@ Selector - Selector + Selettore apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 439 @@ -7623,7 +7623,7 @@ HTTP Request Headers - HTTP Request Headers + Intestazioni della richiesta HTTP apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 399 @@ -7631,7 +7631,7 @@ end of day - end of day + fine giornata apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 138 @@ -7639,7 +7639,7 @@ real-time - real-time + in tempo reale apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 142 @@ -7647,7 +7647,7 @@ Open Duck.ai - Open Duck.ai + Apri Duck.ai apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts 174 @@ -7655,7 +7655,7 @@ Create - Create + Creare libs/ui/src/lib/tags-selector/tags-selector.component.html 50 @@ -7663,7 +7663,7 @@ Market Data - Market Data + Dati di mercato apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html 374 @@ -7671,7 +7671,7 @@ Change - Change + Cambia libs/ui/src/lib/treemap-chart/treemap-chart.component.ts 365 @@ -7679,7 +7679,7 @@ Performance - Performance + Prestazione libs/ui/src/lib/treemap-chart/treemap-chart.component.ts 365 @@ -7691,7 +7691,7 @@ Copy portfolio data to clipboard for AI prompt - Copy portfolio data to clipboard for AI prompt + Copia i dati del portafoglio negli appunti per l’AI prompt apps/client/src/app/pages/portfolio/analysis/analysis-page.html 42 @@ -7699,7 +7699,7 @@ Copy AI prompt to clipboard for analysis - Copy AI prompt to clipboard for analysis + Copia l’AI prompt negli appunti per l’analisi apps/client/src/app/pages/portfolio/analysis/analysis-page.html 67 @@ -7707,7 +7707,7 @@ Armenia - Armenia + Armenia libs/ui/src/lib/i18n.ts 73 @@ -7715,7 +7715,7 @@ British Virgin Islands - British Virgin Islands + Isole Vergini Britanniche libs/ui/src/lib/i18n.ts 77 @@ -7723,7 +7723,7 @@ Singapore - Singapore + Singapore libs/ui/src/lib/i18n.ts 91 @@ -7731,7 +7731,7 @@ Terms and Conditions - Terms and Conditions + Termini e condizioni apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 15 @@ -7739,7 +7739,7 @@ Please keep your security token safe. If you lose it, you will not be able to recover your account. - Please keep your security token safe. If you lose it, you will not be able to recover your account. + Ti preghiamo di conservare il tuo token di sicurezza in un luogo sicuro. Se lo perdi, non sarai in grado di recuperare il tuo account. apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 18 @@ -7747,7 +7747,7 @@ I understand that if I lose my security token, I cannot recover my account - I understand that if I lose my security token, I cannot recover my account + Capisco che se perdo il mio token di sicurezza, non posso recuperare il mio account apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 28 @@ -7755,7 +7755,7 @@ Continue - Continue + Continua apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 57 @@ -7763,7 +7763,7 @@ Here is your security token. It is only visible once, please store and keep it in a safe place. - Here is your security token. It is only visible once, please store and keep it in a safe place. + Ecco il tuo token di sicurezza. È visibile solo una volta, per favore memorizzalo e conserva in un luogo sicuro. apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 67 @@ -7771,7 +7771,7 @@ Security token - Security token + Token di sicurezza apps/client/src/app/components/admin-users/admin-users.component.ts 163 @@ -7779,7 +7779,7 @@ Do you really want to generate a new security token for this user? - Do you really want to generate a new security token for this user? + Vuoi davvero generare un nuovo token di sicurezza per questo utente? apps/client/src/app/components/admin-users/admin-users.component.ts 168 @@ -7787,7 +7787,7 @@ Generate Security Token - Generate Security Token + Genera Token di Sicurezza apps/client/src/app/components/admin-users/admin-users.html 249 @@ -7795,7 +7795,7 @@ United Kingdom - United Kingdom + United Kingdom libs/ui/src/lib/i18n.ts 96 @@ -7803,7 +7803,7 @@ Terms of Service - Terms of Service + Termini e condizioni apps/client/src/app/app.component.html 112 @@ -7811,7 +7811,7 @@ terms-of-service - terms-of-service + termini-e-condizioni snake-case apps/client/src/app/app.component.ts @@ -7832,7 +7832,7 @@ Terms of Service - Terms of Service + Termini e condizioni apps/client/src/app/pages/about/about-page.component.ts 71 @@ -7844,7 +7844,7 @@ Terms of Service - Terms of Service + Termini e condizioni apps/client/src/app/pages/about/terms-of-service/terms-of-service-page.html 4 @@ -7852,7 +7852,7 @@ and I agree to the Terms of Service. - and I agree to the Terms of Service. + e io accetto i Termini e condizioni. apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html 34 @@ -7860,7 +7860,7 @@ () is already in use. - () is already in use. + () e gia in uso. apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 462 @@ -7868,7 +7868,7 @@ An error occurred while updating to (). - An error occurred while updating to (). + Si è verificato un errore durante l’aggiornamento di (). apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts 470 @@ -7876,7 +7876,7 @@ Apply - Apply + Applica apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 138 @@ -7884,7 +7884,7 @@ with API access for - with API access for + con accesso API per apps/client/src/app/pages/pricing/pricing-page.html 266 @@ -7892,7 +7892,7 @@ Gather Recent Historical Market Data - Gather Recent Historical Market Data + Raccogli dati storici di mercato recenti apps/client/src/app/components/admin-market-data/admin-market-data.html 226 @@ -7900,7 +7900,7 @@ Gather All Historical Market Data - Gather All Historical Market Data + Raccogli tutti i dati storici di mercato apps/client/src/app/components/admin-market-data/admin-market-data.html 231 @@ -7908,7 +7908,7 @@ Gather Historical Market Data - Gather Historical Market Data + Raccogli dati storici di mercato apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 29 @@ -7916,7 +7916,7 @@ Data Gathering is off - Data Gathering is off + La raccolta dei dati è disattivata apps/client/src/app/components/admin-market-data/admin-market-data.html 38 @@ -7924,7 +7924,7 @@ Performance Calculation - Performance Calculation + Calcolo delle prestazioni apps/client/src/app/components/user-account-settings/user-account-settings.html 31 @@ -7932,7 +7932,7 @@ someone - someone + qualcuno apps/client/src/app/pages/public/public-page.component.ts 33 @@ -7940,7 +7940,7 @@ Add asset to watchlist - Add asset to watchlist + Aggiungi asset alla watchlist apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.html 7 @@ -7948,7 +7948,7 @@ Watchlist - Watchlist + Watchlist apps/client/src/app/components/home-watchlist/home-watchlist.html 4 @@ -7960,7 +7960,7 @@ Watchlist - Watchlist + Watchlist apps/client/src/app/pages/home/home-page-routing.module.ts 44 @@ -7972,7 +7972,7 @@ Get Early Access - Get Early Access + Ottieni accesso anticipato apps/client/src/app/components/admin-settings/ghostfolio-premium-api-dialog/ghostfolio-premium-api-dialog.html 29 @@ -7980,7 +7980,7 @@ Do you really want to delete this item? - Do you really want to delete this item? + Vuoi davvero eliminare questo elemento? libs/ui/src/lib/benchmark/benchmark.component.ts 122 From 72ccf475267a6be32d72a9441b00aa8929b19f16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 12:32:23 +0200 Subject: [PATCH 3/3] Feature/update locales (#4678) * Update locales * Clean up --------- Co-authored-by: github-actions[bot] Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> --- apps/client/src/locales/messages.ca.xlf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 6d9e77f4..fd7387a0 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -2716,8 +2716,8 @@ Get a comprehensive financial overview by adding your bank and brokerage accounts. - Obtingueu una visió financera completa afegint els vostres comptes bancaris i de corredoria. - + Obtingueu una visió financera completa afegint els vostres comptes bancaris i de corredoria. + apps/client/src/app/components/home-overview/home-overview.html 17 @@ -2732,8 +2732,8 @@ Record your investment activities to keep your portfolio up to date. - Registra les teves activitats d’inversió per mantenir la teva cartera actualitzada. - + Registra les teves activitats d’inversió per mantenir la teva cartera actualitzada. + apps/client/src/app/components/home-overview/home-overview.html 26 @@ -3004,7 +3004,7 @@ Excluded from Analysis - Exclòs de l'anàlisi + Exclòs de l’anàlisi apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html 240