Feature/add snake-case hint to localized routes (#3783)

* Add snake-case hint to localized routes
This commit is contained in:
Thomas Kaul
2024-09-19 20:54:00 +02:00
committed by GitHub
parent cb472c0884
commit f0df8a5254
28 changed files with 81 additions and 69 deletions

View File

@@ -57,19 +57,25 @@ export class AppComponent implements OnDestroy, OnInit {
public hasTabs = false; public hasTabs = false;
public info: InfoItem; public info: InfoItem;
public pageTitle: string; public pageTitle: string;
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkAboutChangelog = ['/' + $localize`about`, 'changelog']; public routerLinkAboutChangelog = [
public routerLinkAboutLicense = ['/' + $localize`about`, $localize`license`]; '/' + $localize`:snake-case:about`,
public routerLinkAboutPrivacyPolicy = [ 'changelog'
'/' + $localize`about`,
$localize`privacy-policy`
]; ];
public routerLinkFaq = ['/' + $localize`faq`]; public routerLinkAboutLicense = [
public routerLinkFeatures = ['/' + $localize`features`]; '/' + $localize`:snake-case:about`,
public routerLinkMarkets = ['/' + $localize`markets`]; $localize`:snake-case:license`
public routerLinkPricing = ['/' + $localize`pricing`]; ];
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkAboutPrivacyPolicy = [
public routerLinkResources = ['/' + $localize`resources`]; '/' + $localize`:snake-case:about`,
$localize`:snake-case:privacy-policy`
];
public routerLinkFaq = ['/' + $localize`:snake-case:faq`];
public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkResources = ['/' + $localize`:snake-case:resources`];
public showFooter = false; public showFooter = false;
public user: User; public user: User;

View File

@@ -75,17 +75,17 @@ export class HeaderComponent implements OnChanges {
public hasPermissionToCreateUser: boolean; public hasPermissionToCreateUser: boolean;
public impersonationId: string; public impersonationId: string;
public isMenuOpen: boolean; public isMenuOpen: boolean;
public routeAbout = $localize`about`; public routeAbout = $localize`:snake-case:about`;
public routeFeatures = $localize`features`; public routeFeatures = $localize`:snake-case:features`;
public routeMarkets = $localize`markets`; public routeMarkets = $localize`:snake-case:markets`;
public routePricing = $localize`pricing`; public routePricing = $localize`:snake-case:pricing`;
public routeResources = $localize`resources`; public routeResources = $localize`:snake-case:resources`;
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkMarkets = ['/' + $localize`markets`]; public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -11,7 +11,7 @@ import { SubscriptionInterstitialDialogParams } from './interfaces/interfaces';
templateUrl: 'subscription-interstitial-dialog.html' templateUrl: 'subscription-interstitial-dialog.html'
}) })
export class SubscriptionInterstitialDialog { export class SubscriptionInterstitialDialog {
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public constructor( public constructor(
@Inject(MAT_DIALOG_DATA) public data: SubscriptionInterstitialDialogParams, @Inject(MAT_DIALOG_DATA) public data: SubscriptionInterstitialDialogParams,

View File

@@ -36,7 +36,7 @@ export class UserAccountMembershipComponent implements OnDestroy, OnInit {
public hasPermissionToUpdateUserSettings: boolean; public hasPermissionToUpdateUserSettings: boolean;
public price: number; public price: number;
public priceId: string; public priceId: string;
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public snackBarRef: MatSnackBarRef<TextOnlySnackBar>; public snackBarRef: MatSnackBarRef<TextOnlySnackBar>;
public trySubscriptionMail = public trySubscriptionMail =
'mailto:hi@ghostfol.io?Subject=Ghostfolio Premium Trial&body=Hello%0D%0DI am interested in Ghostfolio Premium. Can you please send me a coupon code to try it for some time?%0D%0DKind regards'; 'mailto:hi@ghostfol.io?Subject=Ghostfolio Premium Trial&body=Hello%0D%0DI am interested in Ghostfolio Premium. Can you please send me a coupon code to try it for some time?%0D%0DKind regards';

View File

@@ -16,8 +16,8 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit {
public hasPermissionForStatistics: boolean; public hasPermissionForStatistics: boolean;
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public isLoggedIn: boolean; public isLoggedIn: boolean;
public routerLinkFaq = ['/' + $localize`faq`]; public routerLinkFaq = ['/' + $localize`:snake-case:faq`];
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public user: User; public user: User;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './hallo-ghostfolio-page.html' templateUrl: './hallo-ghostfolio-page.html'
}) })
export class HalloGhostfolioPageComponent { export class HalloGhostfolioPageComponent {
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
} }

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './hello-ghostfolio-page.html' templateUrl: './hello-ghostfolio-page.html'
}) })
export class HelloGhostfolioPageComponent { export class HelloGhostfolioPageComponent {
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
} }

View File

@@ -10,5 +10,5 @@ import { RouterModule } from '@angular/router';
templateUrl: './first-months-in-open-source-page.html' templateUrl: './first-months-in-open-source-page.html'
}) })
export class FirstMonthsInOpenSourcePageComponent { export class FirstMonthsInOpenSourcePageComponent {
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }

View File

@@ -10,5 +10,5 @@ import { RouterModule } from '@angular/router';
templateUrl: './how-do-i-get-my-finances-in-order-page.html' templateUrl: './how-do-i-get-my-finances-in-order-page.html'
}) })
export class HowDoIGetMyFinancesInOrderPageComponent { export class HowDoIGetMyFinancesInOrderPageComponent {
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
} }

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './500-stars-on-github-page.html' templateUrl: './500-stars-on-github-page.html'
}) })
export class FiveHundredStarsOnGitHubPageComponent { export class FiveHundredStarsOnGitHubPageComponent {
public routerLinkMarkets = ['/' + $localize`markets`]; public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }

View File

@@ -12,6 +12,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './black-friday-2022-page.html' templateUrl: './black-friday-2022-page.html'
}) })
export class BlackFriday2022PageComponent { export class BlackFriday2022PageComponent {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './1000-stars-on-github-page.html' templateUrl: './1000-stars-on-github-page.html'
}) })
export class ThousandStarsOnGitHubPageComponent { export class ThousandStarsOnGitHubPageComponent {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './unlock-your-financial-potential-with-ghostfolio-page.html' templateUrl: './unlock-your-financial-potential-with-ghostfolio-page.html'
}) })
export class UnlockYourFinancialPotentialWithGhostfolioPageComponent { export class UnlockYourFinancialPotentialWithGhostfolioPageComponent {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
} }

View File

@@ -10,5 +10,5 @@ import { RouterModule } from '@angular/router';
templateUrl: './exploring-the-path-to-fire-page.html' templateUrl: './exploring-the-path-to-fire-page.html'
}) })
export class ExploringThePathToFirePageComponent { export class ExploringThePathToFirePageComponent {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
} }

View File

@@ -10,5 +10,8 @@ import { RouterModule } from '@angular/router';
templateUrl: './ghostfolio-joins-oss-friends-page.html' templateUrl: './ghostfolio-joins-oss-friends-page.html'
}) })
export class GhostfolioJoinsOssFriendsPageComponent { export class GhostfolioJoinsOssFriendsPageComponent {
public routerLinkAboutOssFriends = ['/' + $localize`about`, 'oss-friends']; public routerLinkAboutOssFriends = [
'/' + $localize`:snake-case:about`,
'oss-friends'
];
} }

View File

@@ -10,8 +10,11 @@ import { RouterModule } from '@angular/router';
templateUrl: './ghostfolio-2-page.html' templateUrl: './ghostfolio-2-page.html'
}) })
export class Ghostfolio2PageComponent { export class Ghostfolio2PageComponent {
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkAboutChangelog = ['/' + $localize`about`, 'changelog']; public routerLinkAboutChangelog = [
public routerLinkFeatures = ['/' + $localize`features`]; '/' + $localize`:snake-case:about`,
public routerLinkMarkets = ['/' + $localize`markets`]; 'changelog'
];
public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
} }

View File

@@ -10,5 +10,5 @@ import { RouterModule } from '@angular/router';
templateUrl: './hacktoberfest-2023-page.html' templateUrl: './hacktoberfest-2023-page.html'
}) })
export class Hacktoberfest2023PageComponent { export class Hacktoberfest2023PageComponent {
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
} }

View File

@@ -12,6 +12,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './black-week-2023-page.html' templateUrl: './black-week-2023-page.html'
}) })
export class BlackWeek2023PageComponent { export class BlackWeek2023PageComponent {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }

View File

@@ -10,6 +10,6 @@ import { RouterModule } from '@angular/router';
templateUrl: './hacktoberfest-2023-debriefing-page.html' templateUrl: './hacktoberfest-2023-debriefing-page.html'
}) })
export class Hacktoberfest2023DebriefingPageComponent { export class Hacktoberfest2023DebriefingPageComponent {
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
} }

View File

@@ -11,7 +11,7 @@ import { Subject, takeUntil } from 'rxjs';
templateUrl: './faq-overview-page.html' templateUrl: './faq-overview-page.html'
}) })
export class FaqOverviewPageComponent implements OnDestroy { export class FaqOverviewPageComponent implements OnDestroy {
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public user: User; public user: User;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -11,9 +11,9 @@ import { Subject, takeUntil } from 'rxjs';
templateUrl: './saas-page.html' templateUrl: './saas-page.html'
}) })
export class SaasPageComponent implements OnDestroy { export class SaasPageComponent implements OnDestroy {
public routerLinkMarkets = ['/' + $localize`markets`]; public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public user: User; public user: User;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -26,8 +26,8 @@ import { Subject, takeUntil } from 'rxjs';
export class GfFeaturesPageComponent implements OnDestroy { export class GfFeaturesPageComponent implements OnDestroy {
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public info: InfoItem; public info: InfoItem;
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkResources = ['/' + $localize`resources`]; public routerLinkResources = ['/' + $localize`:snake-case:resources`];
public user: User; public user: User;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -23,8 +23,8 @@ export class LandingPageComponent implements OnDestroy, OnInit {
public hasPermissionForStatistics: boolean; public hasPermissionForStatistics: boolean;
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public hasPermissionToCreateUser: boolean; public hasPermissionToCreateUser: boolean;
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public statistics: Statistics; public statistics: Statistics;
public testimonials = [ public testimonials = [
{ {

View File

@@ -33,8 +33,8 @@ export class PricingPageComponent implements OnDestroy, OnInit {
public isLoggedIn: boolean; public isLoggedIn: boolean;
public price: number; public price: number;
public priceId: string; public priceId: string;
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkRegister = ['/' + $localize`register`]; public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public user: User; public user: User;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -15,7 +15,7 @@ export class PersonalFinanceToolsPageComponent implements OnDestroy {
public personalFinanceTools = personalFinanceTools.sort((a, b) => { public personalFinanceTools = personalFinanceTools.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }); return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });
}); });
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();

View File

@@ -21,10 +21,10 @@ export class GfProductPageComponent implements OnInit {
public price: number; public price: number;
public product1: Product; public product1: Product;
public product2: Product; public product2: Product;
public routerLinkAbout = ['/' + $localize`about`]; public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkFeatures = ['/' + $localize`features`]; public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkResourcesPersonalFinanceTools = [ public routerLinkResourcesPersonalFinanceTools = [
'/' + $localize`resources`, '/' + $localize`:snake-case:resources`,
'personal-finance-tools' 'personal-finance-tools'
]; ];
public tags: string[]; public tags: string[];

View File

@@ -14,9 +14,9 @@ import { Subject } from 'rxjs';
export class ResourcesPageComponent implements OnInit { export class ResourcesPageComponent implements OnInit {
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public info: InfoItem; public info: InfoItem;
public routerLinkFaq = ['/' + $localize`faq`]; public routerLinkFaq = ['/' + $localize`:snake-case:faq`];
public routerLinkResourcesPersonalFinanceTools = [ public routerLinkResourcesPersonalFinanceTools = [
'/' + $localize`resources`, '/' + $localize`:snake-case:resources`,
'personal-finance-tools' 'personal-finance-tools'
]; ];

View File

@@ -22,5 +22,5 @@ export class GfMembershipCardComponent {
@Input() public expiresAt: string; @Input() public expiresAt: string;
@Input() public name: string; @Input() public name: string;
public routerLinkPricing = ['/' + $localize`pricing`]; public routerLinkPricing = ['/' + $localize`:snake-case:pricing`];
} }