Skip to content

Commit 9c62160

Browse files
authored
Fix: #17676 (#18298)
* fix 17676 * localize
1 parent 3d84003 commit 9c62160

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ export default {
873873
unknown: 'Ukendt',
874874
unknownUser: 'Ukendt bruger',
875875
under: 'under',
876+
unnamed: 'Unavngivet',
876877
up: 'Op',
877878
update: 'Opdatér',
878879
upgrade: 'Opdatér',

src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ export default {
911911
unknown: 'Unknown',
912912
unknownUser: 'Unknown user',
913913
under: 'under',
914+
unnamed: 'Unnamed',
914915
up: 'Up',
915916
update: 'Update',
916917
upgrade: 'Upgrade',

src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor.element.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ import './content-editor-tab.element.js';
1616

1717
@customElement('umb-content-workspace-view-edit')
1818
export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements UmbWorkspaceViewElement {
19-
//@state()
20-
//private _hasRootProperties = false;
19+
/*
20+
// root properties is a possible feature with Bellissima, but as it is new its not fully implemented yet [NL]
21+
@state()
22+
private _hasRootProperties = false;
23+
*/
2124

2225
@state()
2326
private _hasRootGroups = false;
@@ -78,6 +81,16 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
7881
if (!this._tabs || !this.#structureManager) return;
7982
const routes: UmbRoute[] = [];
8083

84+
if (this._hasRootGroups) {
85+
routes.push({
86+
path: `root`,
87+
component: () => import('./content-editor-tab.element.js'),
88+
setup: (component) => {
89+
(component as UmbContentWorkspaceViewEditTabElement).containerId = null;
90+
},
91+
});
92+
}
93+
8194
if (this._tabs.length > 0) {
8295
this._tabs?.forEach((tab) => {
8396
const tabName = tab.name ?? '';
@@ -91,23 +104,11 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
91104
});
92105
}
93106

94-
if (this._hasRootGroups) {
107+
if (routes.length !== 0) {
95108
routes.push({
96109
path: '',
97-
component: () => import('./content-editor-tab.element.js'),
98-
setup: (component) => {
99-
(component as UmbContentWorkspaceViewEditTabElement).containerId = null;
100-
},
110+
redirectTo: routes[0].path,
101111
});
102-
}
103-
104-
if (routes.length !== 0) {
105-
if (!this._hasRootGroups) {
106-
routes.push({
107-
path: '',
108-
redirectTo: routes[0]?.path,
109-
});
110-
}
111112

112113
routes.push({
113114
path: `**`,
@@ -127,21 +128,20 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
127128
${this._hasRootGroups && this._tabs.length > 0
128129
? html`
129130
<uui-tab
130-
label="Content"
131-
.active=${this._routerPath + '/' === this._activePath}
132-
href=${this._routerPath + '/'}
133-
>Content</uui-tab
134-
>
131+
.label=${this.localize.term('general_generic')}
132+
.active=${this._routerPath + '/root' === this._activePath}
133+
.href=${this._routerPath + '/root'}></uui-tab>
135134
`
136135
: ''}
137136
${repeat(
138137
this._tabs,
139138
(tab) => tab.name,
140139
(tab) => {
141140
const path = this._routerPath + '/tab/' + encodeFolderName(tab.name || '');
142-
return html`<uui-tab label=${tab.name ?? 'Unnamed'} .active=${path === this._activePath} href=${path}
143-
>${this.localize.string(tab.name)}</uui-tab
144-
>`;
141+
return html`<uui-tab
142+
.label=${this.localize.string(tab.name ?? '#general_unnamed')}
143+
.active=${path === this._activePath}
144+
.href=${path}></uui-tab>`;
145145
},
146146
)}
147147
</uui-tab-group>`

src/Umbraco.Web.UI.Client/src/packages/core/router/components/not-found/route-not-found.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class UmbRouteNotFoundElement extends UmbLitElement {
3434
align-items: center;
3535
height: 100%;
3636
opacity: 0;
37-
animation: fadeIn 4s 0.2s forwards;
37+
animation: fadeIn 6s 0.2s forwards;
3838
}
3939
4040
@keyframes fadeIn {

0 commit comments

Comments
 (0)