Skip to content

Commit 82d58e0

Browse files
authored
Merge pull request #5309 from oscar-escire/Issue/2672-DSpace-7.x
[Port dspace-7_x] fix(routes): set browser title for error pages using i18n translations
2 parents 8723aa9 + d42b954 commit 82d58e0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/app/app-routing.module.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import { notAuthenticatedGuard } from './core/auth/not-authenticated.guard';
4747
@NgModule({
4848
imports: [
4949
RouterModule.forRoot([
50-
{ path: INTERNAL_SERVER_ERROR, component: ThemedPageInternalServerErrorComponent },
50+
{ path: INTERNAL_SERVER_ERROR, component: ThemedPageInternalServerErrorComponent, data: { title: '500.page-internal-server-error' } },
5151
{ path: ERROR_PAGE , component: ThemedPageErrorComponent },
5252
{
5353
path: '',
@@ -226,7 +226,8 @@ import { notAuthenticatedGuard } from './core/auth/not-authenticated.guard';
226226
},
227227
{
228228
path: FORBIDDEN_PATH,
229-
component: ThemedForbiddenComponent
229+
component: ThemedForbiddenComponent,
230+
data: { title: '403.forbidden' },
230231
},
231232
{
232233
path: 'statistics',
@@ -250,7 +251,7 @@ import { notAuthenticatedGuard } from './core/auth/not-authenticated.guard';
250251
.then((m) => m.SubscriptionsPageRoutingModule),
251252
canActivate: [AuthenticatedGuard]
252253
},
253-
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent },
254+
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent, data: { title: '404.page-not-found' } },
254255
]
255256
}
256257
], {

0 commit comments

Comments
 (0)