Corrected media collection create action label localization
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user