From b44a83f21a610e1624b5bb452b1f2d7ebdd6d8be Mon Sep 17 00:00:00 2001 From: njarrar Date: Sat, 28 Nov 2026 14:35:41 +0400 Subject: [PATCH 1/2] Feature/add support for right-to-left languages Use CSS logical properties for the start and end utilities of Bootstrap and for the component styles that were tied to the left or right side, mirror the column offsets, keep numbers, signs and units in numeric order and keep the chart labels readable in right-to-left languages. The layout of left-to-right languages stays the same. --- .../asset-profile-dialog.component.scss | 2 +- .../home-overview/home-overview.scss | 4 +- .../portfolio-performance.component.html | 3 +- .../portfolio-summary.component.scss | 6 +-- .../import-activities-dialog.scss | 2 +- apps/client/src/styles.scss | 12 ++++- apps/client/src/styles/bootstrap.scss | 54 +++++++++++++++++++ libs/ui/src/lib/assistant/assistant.scss | 2 +- .../src/lib/carousel/carousel.component.html | 4 +- .../src/lib/carousel/carousel.component.scss | 3 ++ .../dialog-header.component.scss | 2 +- libs/ui/src/lib/fab/fab.component.scss | 2 +- ...storical-market-data-editor.component.scss | 2 +- .../symbol-autocomplete.component.scss | 2 +- .../trend-indicator.component.html | 1 + libs/ui/src/lib/value/value.component.html | 47 ++++++++-------- 16 files changed, 110 insertions(+), 38 deletions(-) diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss index fbc938c9c7..b0b0989164 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss +++ b/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 { bottom: 0; - right: 1rem; + inset-inline-end: 1rem; top: 0; } } diff --git a/apps/client/src/app/components/home-overview/home-overview.scss b/apps/client/src/app/components/home-overview/home-overview.scss index b074bc6261..1d1fec0217 100644 --- a/apps/client/src/app/components/home-overview/home-overview.scss +++ b/apps/client/src/app/components/home-overview/home-overview.scss @@ -38,12 +38,12 @@ a[mat-icon-button] { --mat-icon-button-icon-size: 1rem; - margin-right: -0.125rem; + margin-inline-end: -0.125rem; margin-top: -0.5rem; } mat-card-title { - padding-left: 0.1875rem; + padding-inline-start: 0.1875rem; } } diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html index c458080e3c..3902b1c57f 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html @@ -1,5 +1,6 @@
-
+ +
@if ((errors()?.length ?? 0) > 0 && !isLoading()) { - + } @@ -26,6 +26,6 @@ tabindex="-1" (click)="next()" > - + } diff --git a/libs/ui/src/lib/carousel/carousel.component.scss b/libs/ui/src/lib/carousel/carousel.component.scss index 05ab9ff935..fe4493b448 100644 --- a/libs/ui/src/lib/carousel/carousel.component.scss +++ b/libs/ui/src/lib/carousel/carousel.component.scss @@ -1,4 +1,7 @@ :host { + // The scroll offsets assume a left-to-right flow, also in right-to-left + // languages + direction: ltr; display: block; position: relative; diff --git a/libs/ui/src/lib/dialog-header/dialog-header.component.scss b/libs/ui/src/lib/dialog-header/dialog-header.component.scss index bbf29d27e8..450270a0ff 100644 --- a/libs/ui/src/lib/dialog-header/dialog-header.component.scss +++ b/libs/ui/src/lib/dialog-header/dialog-header.component.scss @@ -7,7 +7,7 @@ .with-close-button { .text-center { - padding-left: 0.9375rem; + padding-inline-start: 0.9375rem; } } } diff --git a/libs/ui/src/lib/fab/fab.component.scss b/libs/ui/src/lib/fab/fab.component.scss index 78cfe47e2b..910fe1b10f 100644 --- a/libs/ui/src/lib/fab/fab.component.scss +++ b/libs/ui/src/lib/fab/fab.component.scss @@ -14,7 +14,7 @@ bottom: calc(constant(safe-area-inset-bottom) + 2rem); bottom: calc(env(safe-area-inset-bottom) + 2rem); position: fixed; - right: 2rem; + inset-inline-end: 2rem; z-index: 999; } } diff --git a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss index cfeb30c8f9..1eec6041b2 100644 --- a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss +++ b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.scss @@ -9,7 +9,7 @@ .day { height: 0.5rem; - margin-right: 0.25rem; + margin-inline-end: 0.25rem; width: 0.5rem; &:hover { diff --git a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss index 71c06f26ee..5d85165ac9 100644 --- a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss +++ b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.scss @@ -2,7 +2,7 @@ display: block; .mat-mdc-progress-spinner { - right: 0; + inset-inline-end: 0; top: calc(50% - 10px); } } diff --git a/libs/ui/src/lib/trend-indicator/trend-indicator.component.html b/libs/ui/src/lib/trend-indicator/trend-indicator.component.html index ef7e1fc4ea..0e251df773 100644 --- a/libs/ui/src/lib/trend-indicator/trend-indicator.component.html +++ b/libs/ui/src/lib/trend-indicator/trend-indicator.component.html @@ -27,6 +27,7 @@ } @else { diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html index 066599a5d9..0e7da1899a 100644 --- a/libs/ui/src/lib/value/value.component.html +++ b/libs/ui/src/lib/value/value.component.html @@ -42,31 +42,34 @@ [class.justify-content-end]="position === 'end'" > @if (isNumber || value === null) { - @if (colorizeSign && !useAbsoluteValue && value !== null) { - @if (+value > 0) { -
+
+ +
+ @if (colorizeSign && !useAbsoluteValue && value !== null) { + @if (+value > 0) { +
+
+ } + @if (+value < 0) { +
-
+ } } - @if (+value < 0) { -
-
- } - } -
- @if (value === null) { - ***** - } @else { - {{ formattedValue }} +
+ @if (value === null) { + ***** + } @else { + {{ formattedValue }} + } +
+ @if (isPercent || unit) { +
+ {{ isPercent ? '%' : unit }} +
}
- @if (isPercent || unit) { -
- {{ isPercent ? '%' : unit }} -
- } } @if (isString) {
Date: Sat, 28 Nov 2026 14:35:55 +0400 Subject: [PATCH 2/2] Feature/set up language localization for Arabic (ar) Add the Arabic translation of all strings, the build configurations, the date-fns locale and the language option, which is available with the experimental features for now. --- CHANGELOG.md | 5 + .../subscription/subscription.service.ts | 1 + apps/client/project.json | 12 + .../components/footer/footer.component.html | 7 + .../user-account-settings.html | 7 + .../product-page.component.ts | 1 + apps/client/src/locales/messages.ar.xlf | 9885 +++++++++++++++++ libs/common/src/lib/config.ts | 1 + libs/common/src/lib/helper.ts | 5 +- 9 files changed, 9923 insertions(+), 1 deletion(-) create mode 100644 apps/client/src/locales/messages.ar.xlf diff --git a/CHANGELOG.md b/CHANGELOG.md index a047138575..63641f7a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Set up the language localization for Arabic (`ar`) +- Added support for right-to-left languages + ### Changed - Upgraded `dotenv` from version `18.0.9` to `18.0.10` diff --git a/apps/api/src/services/subscription/subscription.service.ts b/apps/api/src/services/subscription/subscription.service.ts index b27a66a3b6..a273feb8f2 100644 --- a/apps/api/src/services/subscription/subscription.service.ts +++ b/apps/api/src/services/subscription/subscription.service.ts @@ -291,6 +291,7 @@ export class SubscriptionService { >, true > = { + ar: true, ca: true, uk: true }; diff --git a/apps/client/project.json b/apps/client/project.json index 30b2e7a010..5ed81caefd 100644 --- a/apps/client/project.json +++ b/apps/client/project.json @@ -6,6 +6,10 @@ "prefix": "gf", "i18n": { "locales": { + "ar": { + "baseHref": "/ar/", + "translation": "apps/client/src/locales/messages.ar.xlf" + }, "ca": { "baseHref": "/ca/", "translation": "apps/client/src/locales/messages.ca.xlf" @@ -94,6 +98,10 @@ ] }, "configurations": { + "development-ar": { + "baseHref": "/ar/", + "localize": ["ar"] + }, "development-ca": { "baseHref": "/ca/", "localize": ["ca"] @@ -224,6 +232,9 @@ "sslKey": "apps/client/localhost.pem" }, "configurations": { + "development-ar": { + "buildTarget": "client:build:development-ar" + }, "development-ca": { "buildTarget": "client:build:development-ca" }, @@ -279,6 +290,7 @@ "includeContext": true, "outputPath": "src/locales", "targetFiles": [ + "messages.ar.xlf", "messages.ca.xlf", "messages.de.xlf", "messages.es.xlf", diff --git a/apps/client/src/app/components/footer/footer.component.html b/apps/client/src/app/components/footer/footer.component.html index 143fe27a7a..94218de483 100644 --- a/apps/client/src/app/components/footer/footer.component.html +++ b/apps/client/src/app/components/footer/footer.component.html @@ -116,6 +116,13 @@ />
  •  
  • +