Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/tag route titles with template literal strings (#1155)

Thomas Kaule22b8b78b8a2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80932f7286..f330c53f6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Tagged template literal strings in components for localization with `$localize`
+### Changed
+
+- Tagged template literal strings in components for localization with `$localize`
+
## 1.179.5 - 15.08.2022
### Added
diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts
index 4e3611cb44..9e17b59adb 100644
--- a/apps/client/src/app/components/header/header.component.ts
+++ b/apps/client/src/app/components/header/header.component.ts
@@ -109,7 +109,7 @@ export class HeaderComponent implements OnChanges {
data: {
accessToken: '',
hasPermissionToUseSocialLogin: this.hasPermissionForSocialLogin,
- title: 'Sign in'
+ title: $localize`Sign in`
},
width: '30rem'
});
diff --git a/apps/client/src/app/pages/about/about-page-routing.module.ts b/apps/client/src/app/pages/about/about-page-routing.module.ts
index 441d130dab..33a303a5b0 100644
--- a/apps/client/src/app/pages/about/about-page-routing.module.ts
+++ b/apps/client/src/app/pages/about/about-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: AboutPageComponent,
path: '',
- title: 'About'
+ title: $localize`About`
}
];
diff --git a/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts b/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
index f92cb12efa..45e921f10e 100644
--- a/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
+++ b/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: ChangelogPageComponent,
path: '',
- title: 'Changelog & License'
+ title: $localize`Changelog & License`
}
];
diff --git a/apps/client/src/app/pages/about/privacy-policy/privacy-policy-page-routing.module.ts b/apps/client/src/app/pages/about/privacy-policy/privacy-policy-page-routing.module.ts
index 7cbeeb247f..8eaa963293 100644
--- a/apps/client/src/app/pages/about/privacy-policy/privacy-policy-page-routing.module.ts
+++ b/apps/client/src/app/pages/about/privacy-policy/privacy-policy-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: PrivacyPolicyPageComponent,
path: '',
- title: 'Privacy Policy'
+ title: $localize`Privacy Policy`
}
];
diff --git a/apps/client/src/app/pages/account/account-page-routing.module.ts b/apps/client/src/app/pages/account/account-page-routing.module.ts
index 1e5e6f00a3..e9d07bd77d 100644
--- a/apps/client/src/app/pages/account/account-page-routing.module.ts
+++ b/apps/client/src/app/pages/account/account-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: AccountPageComponent,
path: '',
- title: 'My Ghostfolio'
+ title: $localize`My Ghostfolio`
}
];
diff --git a/apps/client/src/app/pages/accounts/accounts-page-routing.module.ts b/apps/client/src/app/pages/accounts/accounts-page-routing.module.ts
index 74f5ea0509..705c4449c1 100644
--- a/apps/client/src/app/pages/accounts/accounts-page-routing.module.ts
+++ b/apps/client/src/app/pages/accounts/accounts-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: AccountsPageComponent,
path: '',
- title: 'Accounts'
+ title: $localize`Accounts`
}
];
diff --git a/apps/client/src/app/pages/admin/admin-page-routing.module.ts b/apps/client/src/app/pages/admin/admin-page-routing.module.ts
index 48cf239bad..76fde55619 100644
--- a/apps/client/src/app/pages/admin/admin-page-routing.module.ts
+++ b/apps/client/src/app/pages/admin/admin-page-routing.module.ts
@@ -20,7 +20,7 @@ const routes: Routes = [
],
component: AdminPageComponent,
path: '',
- title: 'Admin Control'
+ title: $localize`Admin Control`
}
];
diff --git a/apps/client/src/app/pages/blog/blog-page-routing.module.ts b/apps/client/src/app/pages/blog/blog-page-routing.module.ts
index 44f02178cb..b65a7bd8c6 100644
--- a/apps/client/src/app/pages/blog/blog-page-routing.module.ts
+++ b/apps/client/src/app/pages/blog/blog-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: BlogPageComponent,
path: '',
- title: 'Blog'
+ title: $localize`Blog`
}
];
diff --git a/apps/client/src/app/pages/faq/faq-page-routing.module.ts b/apps/client/src/app/pages/faq/faq-page-routing.module.ts
index 66b522e86c..52deddb27a 100644
--- a/apps/client/src/app/pages/faq/faq-page-routing.module.ts
+++ b/apps/client/src/app/pages/faq/faq-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: FaqPageComponent,
path: '',
- title: 'FAQ'
+ title: $localize`FAQ`
}
];
diff --git a/apps/client/src/app/pages/features/features-page-routing.module.ts b/apps/client/src/app/pages/features/features-page-routing.module.ts
index ffaed244b3..1723fd4e79 100644
--- a/apps/client/src/app/pages/features/features-page-routing.module.ts
+++ b/apps/client/src/app/pages/features/features-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: FeaturesPageComponent,
path: '',
- title: 'Features'
+ title: $localize`Features`
}
];
diff --git a/apps/client/src/app/pages/home/home-page-routing.module.ts b/apps/client/src/app/pages/home/home-page-routing.module.ts
index 80c5a141bc..c0e64715d7 100644
--- a/apps/client/src/app/pages/home/home-page-routing.module.ts
+++ b/apps/client/src/app/pages/home/home-page-routing.module.ts
@@ -20,7 +20,7 @@ const routes: Routes = [
],
component: HomePageComponent,
path: '',
- title: 'Overview'
+ title: $localize`Overview`
}
];
diff --git a/apps/client/src/app/pages/markets/markets-page-routing.module.ts b/apps/client/src/app/pages/markets/markets-page-routing.module.ts
index 47a10820fc..ba6b6bb828 100644
--- a/apps/client/src/app/pages/markets/markets-page-routing.module.ts
+++ b/apps/client/src/app/pages/markets/markets-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: MarketsPageComponent,
path: '',
- title: 'Markets'
+ title: $localize`Markets`
}
];
diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts
index f402823ccd..e5dfd6a2a5 100644
--- a/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: AllocationsPageComponent,
path: '',
- title: 'Allocations'
+ title: $localize`Allocations`
}
];
diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts
index c2f15863d4..b9b8fd712b 100644
--- a/apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts
+++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: AnalysisPageComponent,
path: '',
- title: 'Analysis'
+ title: $localize`Analysis`
}
];
diff --git a/apps/client/src/app/pages/portfolio/fire/fire-page-routing.module.ts b/apps/client/src/app/pages/portfolio/fire/fire-page-routing.module.ts
index 50be75498b..7ca0c8d205 100644
--- a/apps/client/src/app/pages/portfolio/fire/fire-page-routing.module.ts
+++ b/apps/client/src/app/pages/portfolio/fire/fire-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: FirePageComponent,
path: '',
- title: 'FIRE'
+ title: $localize`FIRE`
}
];
diff --git a/apps/client/src/app/pages/portfolio/holdings/holdings-page-routing.module.ts b/apps/client/src/app/pages/portfolio/holdings/holdings-page-routing.module.ts
index 208248bcf3..76adcd35db 100644
--- a/apps/client/src/app/pages/portfolio/holdings/holdings-page-routing.module.ts
+++ b/apps/client/src/app/pages/portfolio/holdings/holdings-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: HoldingsPageComponent,
path: '',
- title: 'Holdings'
+ title: $localize`Holdings`
}
];
diff --git a/apps/client/src/app/pages/portfolio/transactions/transactions-page-routing.module.ts b/apps/client/src/app/pages/portfolio/transactions/transactions-page-routing.module.ts
index 17feefa27d..70dc226f52 100644
--- a/apps/client/src/app/pages/portfolio/transactions/transactions-page-routing.module.ts
+++ b/apps/client/src/app/pages/portfolio/transactions/transactions-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: TransactionsPageComponent,
path: '',
- title: 'Activities'
+ title: $localize`Activities`
}
];
diff --git a/apps/client/src/app/pages/pricing/pricing-page-routing.module.ts b/apps/client/src/app/pages/pricing/pricing-page-routing.module.ts
index 3380ccdab0..0e4af3df38 100644
--- a/apps/client/src/app/pages/pricing/pricing-page-routing.module.ts
+++ b/apps/client/src/app/pages/pricing/pricing-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: PricingPageComponent,
path: '',
- title: 'Pricing'
+ title: $localize`Pricing`
}
];
diff --git a/apps/client/src/app/pages/public/public-page-routing.module.ts b/apps/client/src/app/pages/public/public-page-routing.module.ts
index b303d499fd..a648bed2ac 100644
--- a/apps/client/src/app/pages/public/public-page-routing.module.ts
+++ b/apps/client/src/app/pages/public/public-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: PublicPageComponent,
path: ':id',
- title: 'Portfolio'
+ title: $localize`Portfolio`
}
];
diff --git a/apps/client/src/app/pages/register/register-page-routing.module.ts b/apps/client/src/app/pages/register/register-page-routing.module.ts
index b41e9365fa..71401852da 100644
--- a/apps/client/src/app/pages/register/register-page-routing.module.ts
+++ b/apps/client/src/app/pages/register/register-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: RegisterPageComponent,
path: '',
- title: 'Registration'
+ title: $localize`Registration`
}
];
diff --git a/apps/client/src/app/pages/resources/resources-page-routing.module.ts b/apps/client/src/app/pages/resources/resources-page-routing.module.ts
index d6ff024962..d0f385e103 100644
--- a/apps/client/src/app/pages/resources/resources-page-routing.module.ts
+++ b/apps/client/src/app/pages/resources/resources-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: ResourcesPageComponent,
path: '',
- title: 'Resources'
+ title: $localize`Resources`
}
];
diff --git a/apps/client/src/app/pages/webauthn/webauthn-page-routing.module.ts b/apps/client/src/app/pages/webauthn/webauthn-page-routing.module.ts
index 0297c10d90..163ec24af8 100644
--- a/apps/client/src/app/pages/webauthn/webauthn-page-routing.module.ts
+++ b/apps/client/src/app/pages/webauthn/webauthn-page-routing.module.ts
@@ -3,7 +3,7 @@ import { RouterModule, Routes } from '@angular/router';
import { WebauthnPageComponent } from '@ghostfolio/client/pages/webauthn/webauthn-page.component';
const routes: Routes = [
- { component: WebauthnPageComponent, path: '', title: 'Login' }
+ { component: WebauthnPageComponent, path: '', title: $localize`Login` }
];
@NgModule({
diff --git a/apps/client/src/app/pages/zen/zen-page-routing.module.ts b/apps/client/src/app/pages/zen/zen-page-routing.module.ts
index 77e8a21699..70cf4e84db 100644
--- a/apps/client/src/app/pages/zen/zen-page-routing.module.ts
+++ b/apps/client/src/app/pages/zen/zen-page-routing.module.ts
@@ -16,7 +16,7 @@ const routes: Routes = [
],
component: ZenPageComponent,
path: '',
- title: 'Overview'
+ title: $localize`Overview`
}
];
diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf
index c472a52c71..1920cc2650 100644
--- a/apps/client/src/locales/messages.xlf
+++ b/apps/client/src/locales/messages.xlf
@@ -2453,4 +2453,4 @@
</trans-unit>
</body>
</file>
-</xliff>
\ No newline at end of file
+</xliff>