Corrected media collection create action label localization

This commit is contained in:
leekelleher
2024-07-17 10:09:25 +01:00
parent 1c26b33b8f
commit ccffee7e32

View File

@@ -106,7 +106,12 @@ export class UmbCreateMediaCollectionActionElement extends UmbLitElement {
if (this._allowedMediaTypes.length !== 1) return;
const item = this._allowedMediaTypes[0];
const label = (this.manifest?.meta.label ?? this.localize.term('general_create')) + ' ' + item.name;
const label =
(this.manifest?.meta.label
? this.localize.string(this.manifest?.meta.label)
: this.localize.term('general_create')) +
' ' +
item.name;
return html`<uui-button
color="default"
@@ -119,8 +124,8 @@ export class UmbCreateMediaCollectionActionElement extends UmbLitElement {
if (!this._allowedMediaTypes.length) return;
const label = this.manifest?.meta.label
? this.localize.string(this.manifest.meta.label)
: this.manifest?.name ?? '';
? this.localize.string(this.manifest?.meta.label)
: this.localize.term('general_create');
return html`
<uui-button popovertarget="collection-action-menu-popover" label=${label} color="default" look="outline">