Block-grid, Block-list: Fix issue translation in clipboard is missing (#20756) (#20903)

Fix issue translation in clipboard

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
This commit is contained in:
NguyenThuyLan
2025-11-20 13:14:51 +07:00
committed by GitHub
parent 43bdad59b6
commit 2f6fb7e395
2 changed files with 7 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ import { UmbBlockEntryContext } from '@umbraco-cms/backoffice/block';
import { UMB_PROPERTY_CONTEXT, UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';
import { UMB_CLIPBOARD_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/clipboard';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
export class UmbBlockGridEntryContext
extends UmbBlockEntryContext<
@@ -59,6 +60,8 @@ export class UmbBlockGridEntryContext
return this.#relevantColumnSpanOptions.getValue();
}
#localize = new UmbLocalizationController(this);
#canScale = new UmbBooleanState(false);
readonly canScale = this.#canScale.asObservable();
@@ -297,8 +300,8 @@ export class UmbBlockGridEntryContext
throw new Error('No clipboard context found');
}
const workspaceName = propertyDatasetContext?.getName();
const propertyLabel = propertyContext?.getLabel();
const workspaceName = this.#localize.string(propertyDatasetContext?.getName());
const propertyLabel = this.#localize.string(propertyContext?.getLabel());
const blockLabel = this.getName();
const entryName = workspaceName

View File

@@ -307,8 +307,8 @@ export class UmbBlockListEntryElement extends UmbLitElement implements UmbProper
throw new Error('Could not get required contexts to copy.');
}
const workspaceName = propertyDatasetContext?.getName();
const propertyLabel = propertyContext?.getLabel();
const workspaceName = this.localize.string(propertyDatasetContext?.getName());
const propertyLabel = this.localize.string(propertyContext?.getLabel());
const blockLabel = this.#context.getName();
const entryName = workspaceName