localize section views

This commit is contained in:
Mads Rasmussen
2024-04-08 20:55:57 +02:00
parent 71970c9f65
commit 510ca07bda
3 changed files with 4 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ export class UmbSectionMainViewElement extends UmbLitElement {
? html`
<uui-tab-group slot="navigation" id="views">
${this._views.map((view) => {
const viewName = view.meta.label ?? view.name;
const viewName = view.meta.label ? this.localize.string(view.meta.label) : view.name;
const viewPath = this.#constructViewPath(view);
return html`
<uui-tab

View File

@@ -8,7 +8,7 @@ const sectionsViews: Array<ManifestSectionView> = [
element: () => import('./media-section-view.element.js'),
weight: 200,
meta: {
label: 'Media',
label: '#general_media',
pathname: 'media',
icon: 'icon-user',
},

View File

@@ -45,7 +45,7 @@ const sectionsViews: Array<ManifestSectionView> = [
element: () => import('./views/installed/installed-packages-section-view.element.js'),
weight: 200,
meta: {
label: 'Installed',
label: '#packager_installed',
pathname: 'installed',
icon: 'icon-box',
},
@@ -63,7 +63,7 @@ const sectionsViews: Array<ManifestSectionView> = [
element: () => import('./views/created/created-packages-section-view.element.js'),
weight: 100,
meta: {
label: 'Created',
label: '#packager_created',
pathname: 'created',
icon: 'icon-files',
},