Browse Source

Merge cba653bb41 into 08816eb0f7

pull/8483/merge
Najeeb Jarrar 5 hours ago
committed by GitHub
parent
commit
7bee2f4967
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      CHANGELOG.md
  2. 1
      apps/api/src/services/subscription/subscription.service.ts
  3. 12
      apps/client/project.json
  4. 2
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss
  5. 7
      apps/client/src/app/components/footer/footer.component.html
  6. 4
      apps/client/src/app/components/home-overview/home-overview.scss
  7. 3
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html
  8. 6
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.scss
  9. 7
      apps/client/src/app/components/user-account-settings/user-account-settings.html
  10. 2
      apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.scss
  11. 1
      apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
  12. 9885
      apps/client/src/locales/messages.ar.xlf
  13. 12
      apps/client/src/styles.scss
  14. 54
      apps/client/src/styles/bootstrap.scss
  15. 1
      libs/common/src/lib/config.ts
  16. 5
      libs/common/src/lib/helper.ts
  17. 2
      libs/ui/src/lib/assistant/assistant.scss
  18. 4
      libs/ui/src/lib/carousel/carousel.component.html
  19. 3
      libs/ui/src/lib/carousel/carousel.component.scss
  20. 2
      libs/ui/src/lib/dialog-header/dialog-header.component.scss
  21. 2
      libs/ui/src/lib/fab/fab.component.scss
  22. 2
      libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss
  23. 2
      libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss
  24. 1
      libs/ui/src/lib/trend-indicator/trend-indicator.component.html
  25. 47
      libs/ui/src/lib/value/value.component.html

5
CHANGELOG.md

@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 3.101.0 - 2026-11-28 ## 3.101.0 - 2026-11-28
### Added
- Set up the language localization for Arabic (`ar`)
- Added support for right-to-left languages
### Changed ### Changed
- Improved the language localization for Chinese (`zh`) - Improved the language localization for Chinese (`zh`)

1
apps/api/src/services/subscription/subscription.service.ts

@ -291,6 +291,7 @@ export class SubscriptionService {
>, >,
true true
> = { > = {
ar: true,
ca: true, ca: true,
uk: true uk: true
}; };

12
apps/client/project.json

@ -6,6 +6,10 @@
"prefix": "gf", "prefix": "gf",
"i18n": { "i18n": {
"locales": { "locales": {
"ar": {
"baseHref": "/ar/",
"translation": "apps/client/src/locales/messages.ar.xlf"
},
"ca": { "ca": {
"baseHref": "/ca/", "baseHref": "/ca/",
"translation": "apps/client/src/locales/messages.ca.xlf" "translation": "apps/client/src/locales/messages.ca.xlf"
@ -94,6 +98,10 @@
] ]
}, },
"configurations": { "configurations": {
"development-ar": {
"baseHref": "/ar/",
"localize": ["ar"]
},
"development-ca": { "development-ca": {
"baseHref": "/ca/", "baseHref": "/ca/",
"localize": ["ca"] "localize": ["ca"]
@ -224,6 +232,9 @@
"sslKey": "apps/client/localhost.pem" "sslKey": "apps/client/localhost.pem"
}, },
"configurations": { "configurations": {
"development-ar": {
"buildTarget": "client:build:development-ar"
},
"development-ca": { "development-ca": {
"buildTarget": "client:build:development-ca" "buildTarget": "client:build:development-ca"
}, },
@ -279,6 +290,7 @@
"includeContext": true, "includeContext": true,
"outputPath": "src/locales", "outputPath": "src/locales",
"targetFiles": [ "targetFiles": [
"messages.ar.xlf",
"messages.ca.xlf", "messages.ca.xlf",
"messages.de.xlf", "messages.de.xlf",
"messages.es.xlf", "messages.es.xlf",

2
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss

@ -10,7 +10,7 @@
.edit-asset-profile-identifier-container { .edit-asset-profile-identifier-container {
bottom: 0; bottom: 0;
right: 1rem; inset-inline-end: 1rem;
top: 0; top: 0;
} }
} }

7
apps/client/src/app/components/footer/footer.component.html

@ -116,6 +116,13 @@
/></a> /></a>
</li> </li>
<li>&nbsp;</li> <li>&nbsp;</li>
<!--
<li>
<a href="../ar" title="Ghostfolio in Arabic (العربية)"
>Arabic (العربية)</a
>
</li>
-->
<!-- <!--
<li> <li>
<a href="../ca" title="Ghostfolio en català">Català</a> <a href="../ca" title="Ghostfolio en català">Català</a>

4
apps/client/src/app/components/home-overview/home-overview.scss

@ -38,12 +38,12 @@
a[mat-icon-button] { a[mat-icon-button] {
--mat-icon-button-icon-size: 1rem; --mat-icon-button-icon-size: 1rem;
margin-right: -0.125rem; margin-inline-end: -0.125rem;
margin-top: -0.5rem; margin-top: -0.5rem;
} }
mat-card-title { mat-card-title {
padding-left: 0.1875rem; padding-inline-start: 0.1875rem;
} }
} }

3
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html

@ -1,5 +1,6 @@
<div class="container p-0"> <div class="container p-0">
<div class="d-flex flex-wrap"> <!-- Keep value and unit in order in right-to-left languages -->
<div class="d-flex flex-wrap" dir="ltr">
<div class="px-1 status-container text-body-secondary text-end"> <div class="px-1 status-container text-body-secondary text-end">
@if ((errors()?.length ?? 0) > 0 && !isLoading()) { @if ((errors()?.length ?? 0) > 0 && !isLoading()) {
<ion-icon <ion-icon

6
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.scss

@ -2,7 +2,7 @@
display: block; display: block;
.caret-container { .caret-container {
margin-left: -1rem; margin-inline-start: -1rem;
width: 1rem; width: 1rem;
.caret { .caret {
@ -16,10 +16,10 @@
} }
.indent-1 { .indent-1 {
margin-left: 1rem; margin-inline-start: 1rem;
} }
.indent-2 { .indent-2 {
margin-left: 2rem; margin-inline-start: 2rem;
} }
} }

7
apps/client/src/app/components/user-account-settings/user-account-settings.html

@ -91,6 +91,13 @@
<mat-option [value]="null" /> <mat-option [value]="null" />
<mat-option value="de">Deutsch</mat-option> <mat-option value="de">Deutsch</mat-option>
<mat-option value="en">English</mat-option> <mat-option value="en">English</mat-option>
@if (user?.settings?.isExperimentalFeatures) {
<mat-option value="ar"
>Arabic / العربية (<ng-container i18n
>Community</ng-container
>)</mat-option
>
}
@if (user?.settings?.isExperimentalFeatures) { @if (user?.settings?.isExperimentalFeatures) {
<mat-option value="ca" <mat-option value="ca"
>Català (<ng-container i18n>Community</ng-container >Català (<ng-container i18n>Community</ng-container

2
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.scss

@ -23,7 +23,7 @@
.mat-mdc-form-field { .mat-mdc-form-field {
.mat-mdc-progress-spinner { .mat-mdc-progress-spinner {
right: 1.5rem; inset-inline-end: 1.5rem;
top: calc(50% - 10px); top: calc(50% - 10px);
} }
} }

1
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts

@ -42,6 +42,7 @@ export class GfProductPageComponent {
isOpenSource: true, isOpenSource: true,
key: 'ghostfolio', key: 'ghostfolio',
languages: [ languages: [
// 'Arabic (العربية)',
// 'Català', // 'Català',
'Chinese (简体中文)', 'Chinese (简体中文)',
'Deutsch', 'Deutsch',

9885
apps/client/src/locales/messages.ar.xlf

File diff suppressed because it is too large

12
apps/client/src/styles.scss

@ -294,6 +294,16 @@ button:focus {
outline: 0; outline: 0;
} }
.list-unstyled {
padding-inline-start: 0;
}
canvas {
// Keep the axis labels of charts (e.g. -0.02 %) readable in right-to-left
// languages
direction: ltr;
}
hr { hr {
border-top: 1px solid rgba(var(--dark-dividers)); border-top: 1px solid rgba(var(--dark-dividers));
} }
@ -467,7 +477,7 @@ ngx-skeleton-loader {
padding: 9px 24px !important; padding: 9px 24px !important;
button[mat-icon-button] { button[mat-icon-button] {
margin-right: -0.8125rem; margin-inline-end: -0.8125rem;
} }
} }

54
apps/client/src/styles/bootstrap.scss

@ -5,6 +5,7 @@
*/ */
@use 'sass:map'; @use 'sass:map';
@use 'sass:math';
// Configuration // Configuration
@import 'bootstrap/scss/functions'; @import 'bootstrap/scss/functions';
@ -105,6 +106,43 @@ $unused-utilities: (
$utilities: map.remove($utilities, $unused-utilities...); $utilities: map.remove($utilities, $unused-utilities...);
// Use logical properties so that the start and end utilities follow the text
// direction, e.g. in right-to-left languages like Arabic
$utilities: map.set(
$utilities,
'margin-start',
'property',
margin-inline-start
);
$utilities: map.set($utilities, 'margin-end', 'property', margin-inline-end);
$utilities: map.set(
$utilities,
'padding-start',
'property',
padding-inline-start
);
$utilities: map.set($utilities, 'padding-end', 'property', padding-inline-end);
$utilities: map.set(
$utilities,
'float',
'values',
(
start: inline-start,
end: inline-end,
none: none
)
);
$utilities: map.set(
$utilities,
'text-align',
'values',
(
start: start,
end: end,
center: center
)
);
$utilities: map.set( $utilities: map.set(
$utilities, $utilities,
'line-height', 'line-height',
@ -122,6 +160,22 @@ $utilities: map.set(
@import 'bootstrap/scss/images'; @import 'bootstrap/scss/images';
@import 'bootstrap/scss/containers'; @import 'bootstrap/scss/containers';
@import 'bootstrap/scss/grid'; @import 'bootstrap/scss/grid';
// Mirror the column offsets, which use margin-left, in right-to-left languages
[dir='rtl'] {
@each $breakpoint in map.keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@for $i from 0 through $grid-columns - 1 {
.offset#{$infix}-#{$i} {
margin-left: 0;
margin-right: math.percentage(math.div($i, $grid-columns));
}
}
}
}
}
// @import 'bootstrap/scss/tables'; // @import 'bootstrap/scss/tables';
// @import 'bootstrap/scss/forms'; // @import 'bootstrap/scss/forms';
// @import 'bootstrap/scss/buttons'; // @import 'bootstrap/scss/buttons';

1
libs/common/src/lib/config.ts

@ -402,6 +402,7 @@ export const SECTORS = [
export const STORYBOOK_PATH = '/development/storybook'; export const STORYBOOK_PATH = '/development/storybook';
export const SUPPORTED_LANGUAGE_CODES = [ export const SUPPORTED_LANGUAGE_CODES = [
'ar',
'ca', 'ca',
'de', 'de',
'en', 'en',

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

@ -28,6 +28,7 @@ import {
subDays subDays
} from 'date-fns'; } from 'date-fns';
import { import {
ar,
ca, ca,
de, de,
es, es,
@ -409,7 +410,9 @@ export function getCountryName({ code }: { code: string }): string {
} }
export function getDateFnsLocale(aLanguageCode?: string) { export function getDateFnsLocale(aLanguageCode?: string) {
if (aLanguageCode === 'ca') { if (aLanguageCode === 'ar') {
return ar;
} else if (aLanguageCode === 'ca') {
return ca; return ca;
} else if (aLanguageCode === 'de') { } else if (aLanguageCode === 'de') {
return de; return de;

2
libs/ui/src/lib/assistant/assistant.scss

@ -22,7 +22,7 @@
flex-grow: 1; flex-grow: 1;
height: 1px; height: 1px;
background: rgba(var(--dark-dividers)); background: rgba(var(--dark-dividers));
margin-left: 0.25rem; margin-inline-start: 0.25rem;
} }
} }
} }

4
libs/ui/src/lib/carousel/carousel.component.html

@ -7,7 +7,7 @@
tabindex="-1" tabindex="-1"
(click)="previous()" (click)="previous()"
> >
<ion-icon name="chevron-back-outline" /> <ion-icon name="chevron-back-outline" [flipRtl]="false" />
</button> </button>
} }
@ -26,6 +26,6 @@
tabindex="-1" tabindex="-1"
(click)="next()" (click)="next()"
> >
<ion-icon name="chevron-forward-outline" /> <ion-icon name="chevron-forward-outline" [flipRtl]="false" />
</button> </button>
} }

3
libs/ui/src/lib/carousel/carousel.component.scss

@ -1,4 +1,7 @@
:host { :host {
// The scroll offsets assume a left-to-right flow, also in right-to-left
// languages
direction: ltr;
display: block; display: block;
position: relative; position: relative;

2
libs/ui/src/lib/dialog-header/dialog-header.component.scss

@ -7,7 +7,7 @@
.with-close-button { .with-close-button {
.text-center { .text-center {
padding-left: 0.9375rem; padding-inline-start: 0.9375rem;
} }
} }
} }

2
libs/ui/src/lib/fab/fab.component.scss

@ -14,7 +14,7 @@
bottom: calc(constant(safe-area-inset-bottom) + 2rem); bottom: calc(constant(safe-area-inset-bottom) + 2rem);
bottom: calc(env(safe-area-inset-bottom) + 2rem); bottom: calc(env(safe-area-inset-bottom) + 2rem);
position: fixed; position: fixed;
right: 2rem; inset-inline-end: 2rem;
z-index: 999; z-index: 999;
} }
} }

2
libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss

@ -9,7 +9,7 @@
.day { .day {
height: 0.5rem; height: 0.5rem;
margin-right: 0.25rem; margin-inline-end: 0.25rem;
width: 0.5rem; width: 0.5rem;
&:hover { &:hover {

2
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss

@ -2,7 +2,7 @@
display: block; display: block;
.mat-mdc-progress-spinner { .mat-mdc-progress-spinner {
right: 0; inset-inline-end: 0;
top: calc(50% - 10px); top: calc(50% - 10px);
} }
} }

1
libs/ui/src/lib/trend-indicator/trend-indicator.component.html

@ -27,6 +27,7 @@
<ion-icon <ion-icon
class="text-body-secondary" class="text-body-secondary"
name="arrow-forward-circle-outline" name="arrow-forward-circle-outline"
[flipRtl]="false"
[size]="size" [size]="size"
/> />
} @else { } @else {

47
libs/ui/src/lib/value/value.component.html

@ -42,31 +42,34 @@
[class.justify-content-end]="position === 'end'" [class.justify-content-end]="position === 'end'"
> >
@if (isNumber || value === null) { @if (isNumber || value === null) {
@if (colorizeSign && !useAbsoluteValue && value !== null) { <!-- Keep sign, value and unit in order in right-to-left languages -->
@if (+value > 0) { <div class="align-items-center d-flex" dir="ltr">
<div class="me-1 text-success">+</div> @if (colorizeSign && !useAbsoluteValue && value !== null) {
@if (+value > 0) {
<div class="me-1 text-success">+</div>
}
@if (+value < 0) {
<div class="me-1 text-danger">-</div>
}
} }
@if (+value < 0) { <div
<div class="me-1 text-danger">-</div> class="mb-0 value"
} [class.fw-bold]="size === 'large'"
} [class.h2]="size === 'large'"
<div [class.h4]="size === 'medium'"
class="mb-0 value" >
[class.fw-bold]="size === 'large'" @if (value === null) {
[class.h2]="size === 'large'" <span class="font-monospace text-body-secondary">*****</span>
[class.h4]="size === 'medium'" } @else {
> {{ formattedValue }}
@if (value === null) { }
<span class="font-monospace text-body-secondary">*****</span> </div>
} @else { @if (isPercent || unit) {
{{ formattedValue }} <div class="ms-1">
{{ isPercent ? '%' : unit }}
</div>
} }
</div> </div>
@if (isPercent || unit) {
<div class="ms-1">
{{ isPercent ? '%' : unit }}
</div>
}
} }
@if (isString) { @if (isString) {
<div <div

Loading…
Cancel
Save