Merge pull request #2119 from umbraco/v14/bugfix/section-header-localization
Bugfix: Localizes 'sectionSidebarApp' headers
This commit is contained in:
@@ -1875,6 +1875,8 @@ export default {
|
||||
settingsGroup: 'Settings',
|
||||
templatingGroup: 'Templating',
|
||||
thirdPartyGroup: 'Third Party',
|
||||
structureGroup: 'Structure',
|
||||
advancedGroup: 'Advanced',
|
||||
webhooks: 'Webhooks',
|
||||
},
|
||||
update: {
|
||||
|
||||
@@ -21,15 +21,17 @@ umbExtensionsRegistry.register(manifestWithEntityActions);
|
||||
@customElement('umb-section-sidebar-menu-with-entity-actions')
|
||||
export class UmbSectionSidebarMenuWithEntityActionsElement extends UmbSectionSidebarMenuElement<ManifestSectionSidebarAppMenuWithEntityActionsKind> {
|
||||
override renderHeader() {
|
||||
return html`<div id="header">
|
||||
<h3>${this.manifest?.meta?.label}</h3>
|
||||
<umb-entity-actions-bundle
|
||||
slot="actions"
|
||||
.unique=${null}
|
||||
.entityType=${this.manifest?.meta.entityType}
|
||||
.label=${this.manifest?.meta.label}>
|
||||
</umb-entity-actions-bundle>
|
||||
</div> `;
|
||||
return html`
|
||||
<div id="header">
|
||||
<h3>${this.localize.string(this.manifest?.meta?.label ?? '')}</h3>
|
||||
<umb-entity-actions-bundle
|
||||
slot="actions"
|
||||
.unique=${null}
|
||||
.entityType=${this.manifest?.meta.entityType}
|
||||
.label=${this.manifest?.meta.label}>
|
||||
</umb-entity-actions-bundle>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static override styles = [
|
||||
|
||||
@@ -30,15 +30,17 @@ export class UmbSectionSidebarMenuElement<
|
||||
manifest?: ManifestType;
|
||||
|
||||
renderHeader() {
|
||||
return html`<h3>${this.manifest?.meta?.label}</h3>`;
|
||||
return html`<h3>${this.localize.string(this.manifest?.meta?.label ?? '')}</h3>`;
|
||||
}
|
||||
|
||||
override render() {
|
||||
return html`${this.renderHeader()}
|
||||
return html`
|
||||
${this.renderHeader()}
|
||||
<umb-extension-slot
|
||||
type="menu"
|
||||
.filter="${(menu: ManifestMenu) => menu.alias === this.manifest?.meta?.menu}"
|
||||
default-element="umb-menu"></umb-extension-slot>`;
|
||||
default-element="umb-menu"></umb-extension-slot>
|
||||
`;
|
||||
}
|
||||
|
||||
static override styles = [
|
||||
|
||||
@@ -32,7 +32,7 @@ export const manifests: Array<ManifestTypes> = [
|
||||
name: 'Structure Settings Sidebar Menu',
|
||||
weight: 300,
|
||||
meta: {
|
||||
label: 'Structure',
|
||||
label: '#treeHeaders_structureGroup',
|
||||
menu: 'Umb.Menu.StructureSettings',
|
||||
},
|
||||
conditions: [
|
||||
@@ -54,7 +54,7 @@ export const manifests: Array<ManifestTypes> = [
|
||||
name: 'Advanced Settings Sidebar Menu',
|
||||
weight: 100,
|
||||
meta: {
|
||||
label: 'Advanced',
|
||||
label: '#treeHeaders_advancedGroup',
|
||||
menu: 'Umb.Menu.AdvancedSettings',
|
||||
},
|
||||
conditions: [
|
||||
|
||||
@@ -31,7 +31,7 @@ const menuSectionSidebarApp: ManifestSectionSidebarApp = {
|
||||
name: 'Dictionary Sidebar Menu',
|
||||
weight: 100,
|
||||
meta: {
|
||||
label: 'Dictionary',
|
||||
label: '#sections_translation',
|
||||
menu: UMB_DICTIONARY_MENU_ALIAS,
|
||||
entityType: UMB_DICTIONARY_ROOT_ENTITY_TYPE,
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@ const menuSectionSidebarApp: ManifestSectionSidebarAppMenuWithEntityActionsKind
|
||||
name: 'Content Sidebar Menu',
|
||||
weight: 100,
|
||||
meta: {
|
||||
label: 'Content',
|
||||
label: '#sections_content',
|
||||
menu: UMB_CONTENT_MENU_ALIAS,
|
||||
entityType: UMB_DOCUMENT_ROOT_ENTITY_TYPE,
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@ const menuSectionSidebarApp: ManifestSectionSidebarApp = {
|
||||
name: 'Media Section Sidebar Menu',
|
||||
weight: 100,
|
||||
meta: {
|
||||
label: 'Media',
|
||||
label: '#sections_media',
|
||||
menu: UMB_MEDIA_MENU_ALIAS,
|
||||
entityType: UMB_MEDIA_ROOT_ENTITY_TYPE,
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ const menuSectionSidebarApp: ManifestTypes = {
|
||||
name: 'Templating Section Sidebar Menu',
|
||||
weight: 200,
|
||||
meta: {
|
||||
label: 'Templating',
|
||||
label: '#treeHeaders_templatingGroup',
|
||||
menu: 'Umb.Menu.Templating',
|
||||
},
|
||||
conditions: [
|
||||
|
||||
Reference in New Issue
Block a user