From 98e9b5d895ba508f79e5a07e0f59157bb94899a4 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 22 Sep 2024 09:09:02 +0200 Subject: [PATCH] Feature/consider user language in sharable portfolio link (#3806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Consider user’s language in sharable portfolio link * Update changelog --- CHANGELOG.md | 6 ++++++ .../app/components/access-table/access-table.component.ts | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3797a071d..c7edd5207 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 + +- Considered the user’s language in the link of the access table to share the portfolio + ## 2.109.0 - 2024-09-17 ### Added diff --git a/apps/client/src/app/components/access-table/access-table.component.ts b/apps/client/src/app/components/access-table/access-table.component.ts index 94756634b..8b147fdd3 100644 --- a/apps/client/src/app/components/access-table/access-table.component.ts +++ b/apps/client/src/app/components/access-table/access-table.component.ts @@ -30,7 +30,6 @@ export class AccessTableComponent implements OnChanges, OnInit { public baseUrl = window.location.origin; public dataSource: MatTableDataSource; - public defaultLanguageCode = DEFAULT_LANGUAGE_CODE; public displayedColumns = []; public constructor( @@ -53,7 +52,9 @@ export class AccessTableComponent implements OnChanges, OnInit { } public getPublicUrl(aId: string): string { - return `${this.baseUrl}/${this.defaultLanguageCode}/p/${aId}`; + const languageCode = this.user?.settings?.language ?? DEFAULT_LANGUAGE_CODE; + + return `${this.baseUrl}/${languageCode}/p/${aId}`; } public onCopyToClipboard(aId: string): void {