Browse Source

Merge branch 'main' into bugfix/improve-handling-of-derived-currencies

pull/2604/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
34ebda2704
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      CHANGELOG.md
  2. 24
      README.md
  3. 5
      apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.ts
  4. 2
      apps/client/src/app/pages/blog/2023/11/hacktoberfest-2023/hacktoberfest-2023-debriefing-page.html
  5. 1078
      apps/client/src/locales/messages.de.xlf
  6. 1078
      apps/client/src/locales/messages.es.xlf
  7. 1078
      apps/client/src/locales/messages.fr.xlf
  8. 1078
      apps/client/src/locales/messages.it.xlf
  9. 1078
      apps/client/src/locales/messages.nl.xlf
  10. 1078
      apps/client/src/locales/messages.pt.xlf
  11. 1070
      apps/client/src/locales/messages.tr.xlf
  12. 1062
      apps/client/src/locales/messages.xlf
  13. 10
      libs/common/src/lib/helper.ts
  14. 9
      libs/ui/src/lib/i18n.ts

5
CHANGELOG.md

@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a data migration to set `accountType` to `NULL` in the account database table - Added a data migration to set `accountType` to `NULL` in the account database table
### Changed
- Improved the language localization for the _Fear & Greed Index_ (market mood)
- Improved the language localization for German (`de`)
### Fixed ### Fixed
- Improved the handling of derived currencies (`GBp`, `ILA`, `ZAc`) - Improved the handling of derived currencies (`GBp`, `ILA`, `ZAc`)

24
README.md

@ -230,18 +230,18 @@ Deprecated: `GET http://localhost:3333/api/v1/auth/anonymous/<INSERT_SECURITY_TO
} }
``` ```
| Field | Type | Description | | Field | Type | Description |
| ---------- | ------------------- | -------------------------------------------------- | | ---------- | ------------------- | ---------------------------------------------------- |
| accountId | string (`optional`) | Id of the account | | accountId | string (`optional`) | Id of the account |
| comment | string (`optional`) | Comment of the activity | | comment | string (`optional`) | Comment of the activity |
| currency | string | `CHF` \| `EUR` \| `USD` etc. | | currency | string | `CHF` \| `EUR` \| `USD` etc. |
| dataSource | string | `MANUAL` (for type `ITEM`) \| `YAHOO` | | dataSource | string | `COINGECKO` \| `MANUAL` (for type `ITEM`) \| `YAHOO` |
| date | string | Date in the format `ISO-8601` | | date | string | Date in the format `ISO-8601` |
| fee | number | Fee of the activity | | fee | number | Fee of the activity |
| quantity | number | Quantity of the activity | | quantity | number | Quantity of the activity |
| symbol | string | Symbol of the activity (suitable for `dataSource`) | | symbol | string | Symbol of the activity (suitable for `dataSource`) |
| type | string | `BUY` \| `DIVIDEND` \| `ITEM` \| `SELL` | | type | string | `BUY` \| `DIVIDEND` \| `ITEM` \| `SELL` |
| unitPrice | number | Price per unit of the activity | | unitPrice | number | Price per unit of the activity |
#### Response #### Response

5
apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.ts

@ -6,6 +6,7 @@ import {
OnInit OnInit
} from '@angular/core'; } from '@angular/core';
import { resolveFearAndGreedIndex } from '@ghostfolio/common/helper'; import { resolveFearAndGreedIndex } from '@ghostfolio/common/helper';
import { translate } from '@ghostfolio/ui/i18n';
@Component({ @Component({
selector: 'gf-fear-and-greed-index', selector: 'gf-fear-and-greed-index',
@ -24,9 +25,9 @@ export class FearAndGreedIndexComponent implements OnChanges, OnInit {
public ngOnInit() {} public ngOnInit() {}
public ngOnChanges() { public ngOnChanges() {
const { emoji, text } = resolveFearAndGreedIndex(this.fearAndGreedIndex); const { emoji, key } = resolveFearAndGreedIndex(this.fearAndGreedIndex);
this.fearAndGreedIndexEmoji = emoji; this.fearAndGreedIndexEmoji = emoji;
this.fearAndGreedIndexText = text; this.fearAndGreedIndexText = translate(key);
} }
} }

2
apps/client/src/app/pages/blog/2023/11/hacktoberfest-2023/hacktoberfest-2023-debriefing-page.html

@ -28,7 +28,7 @@
year. year.
</p> </p>
<p> <p>
In this debrief, we’ll take a closer look at our journey during In this debriefing, we’ll take a closer look at our journey during
Hacktoberfest, exploring the facts and figures, key takeaways, and Hacktoberfest, exploring the facts and figures, key takeaways, and
the impact on Ghostfolio. the impact on Ghostfolio.
</p> </p>

1078
apps/client/src/locales/messages.de.xlf

File diff suppressed because it is too large

1078
apps/client/src/locales/messages.es.xlf

File diff suppressed because it is too large

1078
apps/client/src/locales/messages.fr.xlf

File diff suppressed because it is too large

1078
apps/client/src/locales/messages.it.xlf

File diff suppressed because it is too large

1078
apps/client/src/locales/messages.nl.xlf

File diff suppressed because it is too large

1078
apps/client/src/locales/messages.pt.xlf

File diff suppressed because it is too large

1070
apps/client/src/locales/messages.tr.xlf

File diff suppressed because it is too large

1062
apps/client/src/locales/messages.xlf

File diff suppressed because it is too large

10
libs/common/src/lib/helper.ts

@ -311,15 +311,15 @@ export function resetHours(aDate: Date) {
export function resolveFearAndGreedIndex(aValue: number) { export function resolveFearAndGreedIndex(aValue: number) {
if (aValue <= 25) { if (aValue <= 25) {
return { emoji: '🥵', text: 'Extreme Fear' }; return { emoji: '🥵', key: 'EXTREME_FEAR', text: 'Extreme Fear' };
} else if (aValue <= 45) { } else if (aValue <= 45) {
return { emoji: '😨', text: 'Fear' }; return { emoji: '😨', key: 'FEAR', text: 'Fear' };
} else if (aValue <= 55) { } else if (aValue <= 55) {
return { emoji: '😐', text: 'Neutral' }; return { emoji: '😐', key: 'NEUTRAL', text: 'Neutral' };
} else if (aValue < 75) { } else if (aValue < 75) {
return { emoji: '😜', text: 'Greed' }; return { emoji: '😜', key: 'GREED', text: 'Greed' };
} else { } else {
return { emoji: '🤪', text: 'Extreme Greed' }; return { emoji: '🤪', key: 'EXTREME_GREED', text: 'Extreme Greed' };
} }
} }

9
libs/ui/src/lib/i18n.ts

@ -57,7 +57,14 @@ const locales = {
Europe: $localize`Europe`, Europe: $localize`Europe`,
'North America': $localize`North America`, 'North America': $localize`North America`,
Oceania: $localize`Oceania`, Oceania: $localize`Oceania`,
'South America': $localize`South America` 'South America': $localize`South America`,
// Fear and Greed Index
EXTREME_FEAR: $localize`Extreme Fear`,
EXTREME_GREED: $localize`Extreme Greed`,
FEAR: $localize`Fear`,
GREED: $localize`Greed`,
NEUTRAL: $localize`Neutral`
}; };
export function translate(aKey: string): string { export function translate(aKey: string): string {

Loading…
Cancel
Save