From b6f395fd3b0b58107a8cea43ff26c098955640bd Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 22 Aug 2022 19:57:48 +0200 Subject: [PATCH] Feature/improve i18n (#1183) * Improve i18n * Update changelog --- CHANGELOG.md | 6 ++ .../investment-chart.component.ts | 2 +- .../allocations/allocations-page.component.ts | 4 +- .../analysis/analysis-page.component.ts | 4 +- .../portfolio/analysis/analysis-page.html | 4 +- apps/client/src/locales/messages.de.xlf | 76 ++++++++++++++++++- apps/client/src/locales/messages.xlf | 68 ++++++++++++++++- .../fire-calculator.component.html | 5 +- .../fire-calculator.component.ts | 6 +- 9 files changed, 155 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 791ec78a9..f4c28f319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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 + +### Changed + +- Improved the language localization for German (`de`) + ## 1.181.2 - 21.08.2022 ### Added diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index 3aa112c7d..4cdb77ef8 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -122,7 +122,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { data: this.investments.map((position) => { return position.investment; }), - label: 'Investment', + label: $localize`Deposit`, segment: { borderColor: (context: unknown) => this.isInFuture( diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 9c60b4e13..d230331e9 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -54,8 +54,8 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { }; public period = 'current'; public periodOptions: ToggleOption[] = [ - { label: 'Initial', value: 'original' }, - { label: 'Current', value: 'current' } + { label: $localize`Initial`, value: 'original' }, + { label: $localize`Current`, value: 'current' } ]; public placeholder = ''; public portfolioDetails: PortfolioDetails; diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 1f52c8c84..36bab3523 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -26,8 +26,8 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { public investmentsByMonth: InvestmentItem[]; public mode: GroupBy; public modeOptions: ToggleOption[] = [ - { label: 'Monthly', value: 'month' }, - { label: 'Accumulating', value: undefined } + { label: $localize`Monthly`, value: 'month' }, + { label: $localize`Accumulating`, value: undefined } ]; public top3: Position[]; public user: User; diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html index 159cd5678..cad0f1179 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html @@ -52,7 +52,7 @@ Top 3Top @@ -88,7 +88,7 @@ Bottom 3Bottom diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 7d4e1983c..49a78aece 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1709,16 +1709,16 @@ 10 - - Top 3 + + Top Gewinner apps/client/src/app/pages/portfolio/analysis/analysis-page.html 55 - - Bottom 3 + + Bottom Verlierer apps/client/src/app/pages/portfolio/analysis/analysis-page.html @@ -2493,6 +2493,74 @@ 171 + + Projected Total Amount + Geschätzter Gesamtbetrag + + libs/ui/src/lib/fire-calculator/fire-calculator.component.html + 44 + + + + Initial + Beginn + + apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts + 57 + + + + Current + Aktuell + + apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts + 58 + + + + Monthly + Monatlich + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 29 + + + + Accumulating + Aufsummiert + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 30 + + + + Deposit + Einlage + + apps/client/src/app/components/investment-chart/investment-chart.component.ts + 125 + + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 276 + + + + Interest + Verzinsung + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 286 + + + + Savings + Ersparnisse + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 296 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 5aee9c4e6..6d840a92e 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1534,15 +1534,15 @@ 10 - - Top 3 + + Top apps/client/src/app/pages/portfolio/analysis/analysis-page.html 55 - - Bottom 3 + + Bottom apps/client/src/app/pages/portfolio/analysis/analysis-page.html 91 @@ -2227,6 +2227,66 @@ 145 + + Projected Total Amount + + libs/ui/src/lib/fire-calculator/fire-calculator.component.html + 44 + + + + Savings + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 296 + + + + Accumulating + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 30 + + + + Initial + + apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts + 57 + + + + Interest + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 286 + + + + Deposit + + apps/client/src/app/components/investment-chart/investment-chart.component.ts + 125 + + + libs/ui/src/lib/fire-calculator/fire-calculator.component.ts + 276 + + + + Current + + apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts + 58 + + + + Monthly + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 29 + + \ No newline at end of file diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.html b/libs/ui/src/lib/fire-calculator/fire-calculator.component.html index f992a9299..499f437e1 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.html +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.html @@ -35,13 +35,14 @@ + >Projected Total Amount
diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index 5bcd4a98b..b437f6b61 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -273,7 +273,7 @@ export class FireCalculatorComponent const datasetDeposit = { backgroundColor: `rgb(${primaryColorRgb.r}, ${primaryColorRgb.g}, ${primaryColorRgb.b})`, data: [], - label: 'Deposit' + label: $localize`Deposit` }; const datasetInterest = { @@ -283,7 +283,7 @@ export class FireCalculatorComponent .lighten(0.5) .hex(), data: [], - label: 'Interest' + label: $localize`Interest` }; const datasetSavings = { @@ -293,7 +293,7 @@ export class FireCalculatorComponent .lighten(0.25) .hex(), data: [], - label: 'Savings' + label: $localize`Savings` }; for (let period = 1; period <= t; period++) {