Feature/localize meta description (#2019)

* Add localized meta description

* Update changelog
pull/2021/head
Thomas Kaul 1 year ago committed by GitHub
parent d7e682b65a
commit 26b1fd6572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Extended the testimonial section on the landing page - Extended the testimonial section on the landing page
- Added localized meta descriptions
- Added support for localized routes in Spanish (`es`) - Added support for localized routes in Spanish (`es`)
### Changed ### Changed

@ -19,6 +19,9 @@ export class FrontendMiddleware implements NestMiddleware {
public indexHtmlNl = ''; public indexHtmlNl = '';
public indexHtmlPt = ''; public indexHtmlPt = '';
private static readonly DEFAULT_DESCRIPTION =
'Ghostfolio is a personal finance dashboard to keep track of your assets like stocks, ETFs or cryptocurrencies across multiple platforms.';
public constructor( public constructor(
private readonly configurationService: ConfigurationService private readonly configurationService: ConfigurationService
) { ) {
@ -116,6 +119,8 @@ export class FrontendMiddleware implements NestMiddleware {
currentDate, currentDate,
featureGraphicPath, featureGraphicPath,
title, title,
description:
'Mit dem Finanz-Dashboard Ghostfolio können Sie Ihr Vermögen in Form von Aktien, ETFs oder Kryptowährungen verteilt über mehrere Finanzinstitute überwachen.',
languageCode: 'de', languageCode: 'de',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -127,6 +132,8 @@ export class FrontendMiddleware implements NestMiddleware {
currentDate, currentDate,
featureGraphicPath, featureGraphicPath,
title, title,
description:
'Ghostfolio es un dashboard de finanzas personales para hacer un seguimiento de tus activos como acciones, ETFs o criptodivisas a través de múltiples plataformas.',
languageCode: 'es', languageCode: 'es',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -135,7 +142,11 @@ export class FrontendMiddleware implements NestMiddleware {
} else if (request.path === '/fr' || request.path.startsWith('/fr/')) { } else if (request.path === '/fr' || request.path.startsWith('/fr/')) {
response.send( response.send(
this.interpolate(this.indexHtmlFr, { this.interpolate(this.indexHtmlFr, {
currentDate,
featureGraphicPath, featureGraphicPath,
title,
description:
'Ghostfolio est un dashboard de finances personnelles qui permet de suivre vos actifs comme les actions, les ETF ou les crypto-monnaies sur plusieurs plateformes.',
languageCode: 'fr', languageCode: 'fr',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -147,6 +158,8 @@ export class FrontendMiddleware implements NestMiddleware {
currentDate, currentDate,
featureGraphicPath, featureGraphicPath,
title, title,
description:
'Ghostfolio è un dashboard di finanza personale per tenere traccia delle vostre attività come azioni, ETF o criptovalute su più piattaforme.',
languageCode: 'it', languageCode: 'it',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -158,6 +171,8 @@ export class FrontendMiddleware implements NestMiddleware {
currentDate, currentDate,
featureGraphicPath, featureGraphicPath,
title, title,
description:
'Ghostfolio is een persoonlijk financieel dashboard om uw activa zoals aandelen, ETFs of cryptocurrencies over meerdere platforms bij te houden.',
languageCode: 'nl', languageCode: 'nl',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -166,7 +181,11 @@ export class FrontendMiddleware implements NestMiddleware {
} else if (request.path === '/pt' || request.path.startsWith('/pt/')) { } else if (request.path === '/pt' || request.path.startsWith('/pt/')) {
response.send( response.send(
this.interpolate(this.indexHtmlPt, { this.interpolate(this.indexHtmlPt, {
currentDate,
featureGraphicPath, featureGraphicPath,
title,
description:
'Ghostfolio é um dashboard de finanças pessoais para acompanhar os seus activos como acções, ETFs ou criptomoedas em múltiplas plataformas.',
languageCode: 'pt', languageCode: 'pt',
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')
@ -178,6 +197,7 @@ export class FrontendMiddleware implements NestMiddleware {
currentDate, currentDate,
featureGraphicPath, featureGraphicPath,
title, title,
description: FrontendMiddleware.DEFAULT_DESCRIPTION,
languageCode: DEFAULT_LANGUAGE_CODE, languageCode: DEFAULT_LANGUAGE_CODE,
path: request.path, path: request.path,
rootUrl: this.configurationService.get('ROOT_URL') rootUrl: this.configurationService.get('ROOT_URL')

@ -5,10 +5,7 @@
<base href="/" /> <base href="/" />
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta content="yes" name="apple-mobile-web-app-capable" /> <meta content="yes" name="apple-mobile-web-app-capable" />
<meta <meta content="${description}" name="description" />
content="Ghostfolio is a personal finance dashboard to keep track of your assets like stocks, ETFs or cryptocurrencies across multiple platforms."
name="description"
/>
<meta <meta
content="app, asset, cryptocurrency, dashboard, etf, finance, management, performance, portfolio, software, stock, trading, wealth, web3" content="app, asset, cryptocurrency, dashboard, etf, finance, management, performance, portfolio, software, stock, trading, wealth, web3"
name="keywords" name="keywords"

Loading…
Cancel
Save