Block Catalogue: Localizes block-type name/description before render Fixes #20890.
This commit is contained in:
@@ -104,7 +104,11 @@ export class UmbBlockCatalogueModalElement extends UmbModalBaseElement<
|
|||||||
|
|
||||||
const lookup = items.reduce(
|
const lookup = items.reduce(
|
||||||
(acc, item) => {
|
(acc, item) => {
|
||||||
acc[item.unique] = item;
|
acc[item.unique] = {
|
||||||
|
...item,
|
||||||
|
name: this.localize.string(item.name),
|
||||||
|
description: this.localize.string(item.description),
|
||||||
|
};
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
{} as { [key: string]: UmbDocumentTypeItemModel },
|
{} as { [key: string]: UmbDocumentTypeItemModel },
|
||||||
@@ -244,8 +248,8 @@ export class UmbBlockCatalogueModalElement extends UmbModalBaseElement<
|
|||||||
return html`
|
return html`
|
||||||
<uui-card-block-type
|
<uui-card-block-type
|
||||||
href=${ifDefined(href)}
|
href=${ifDefined(href)}
|
||||||
name=${this.localize.string(block.name)}
|
name=${block.name}
|
||||||
description=${this.localize.string(block.description)}
|
description=${ifDefined(block.description)}
|
||||||
.background=${block.backgroundColor}
|
.background=${block.backgroundColor}
|
||||||
@open=${() => this.#chooseBlock(block.contentElementTypeKey)}>
|
@open=${() => this.#chooseBlock(block.contentElementTypeKey)}>
|
||||||
${when(
|
${when(
|
||||||
|
|||||||
Reference in New Issue
Block a user