diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5
index 5ff51a4619..c2ec3cbf30 100644
--- a/resources/i18n/en.json5
+++ b/resources/i18n/en.json5
@@ -1629,6 +1629,10 @@
"search.filters.entityType.JournalIssue": "Journal Issue",
+ "search.filters.entityType.JournalVolume": "Journal Volume",
+
+ "search.filters.entityType.OrgUnit": "Organizational Unit",
+
"search.filters.has_content_in_original_bundle.true": "Yes",
"search.filters.has_content_in_original_bundle.false": "No",
diff --git a/src/app/+search-page/search-page.module.ts b/src/app/+search-page/search-page.module.ts
index 456446781c..b69dcaf935 100644
--- a/src/app/+search-page/search-page.module.ts
+++ b/src/app/+search-page/search-page.module.ts
@@ -14,6 +14,7 @@ import { SearchPageComponent } from './search-page.component';
import { SidebarFilterService } from '../shared/sidebar/filter/sidebar-filter.service';
import { SearchFilterService } from '../core/shared/search/search-filter.service';
import { SearchConfigurationService } from '../core/shared/search/search-configuration.service';
+import { TranslateModule } from '@ngx-translate/core';
const components = [
SearchPageComponent,
@@ -28,7 +29,7 @@ const components = [
CommonModule,
SharedModule,
CoreModule.forRoot(),
- StatisticsModule.forRoot(),
+ StatisticsModule.forRoot()
],
declarations: components,
providers: [
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 0735e44978..aaad66adf6 100755
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -8,7 +8,7 @@ import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router
import { MetaReducer, StoreModule, USER_PROVIDED_META_REDUCERS } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { DYNAMIC_MATCHER_PROVIDERS } from '@ng-dynamic-forms/core';
-import { MissingTranslationHandler, TranslateModule } from '@ngx-translate/core';
+import { TranslateModule } from '@ngx-translate/core';
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
import { ENV_CONFIG, GLOBAL_CONFIG, GlobalConfig } from '../config';
@@ -39,7 +39,6 @@ import { NotificationComponent } from './shared/notifications/notification/notif
import { NotificationsBoardComponent } from './shared/notifications/notifications-board/notifications-board.component';
import { SharedModule } from './shared/shared.module';
import { BreadcrumbsComponent } from './breadcrumbs/breadcrumbs.component';
-import { MissingTranslationHelper } from './shared/translate/missing-translation.helper';
export function getConfig() {
return ENV_CONFIG;
@@ -62,6 +61,7 @@ const IMPORTS = [
CoreModule.forRoot(),
ScrollToModule.forRoot(),
NgbModule,
+ TranslateModule.forRoot(),
EffectsModule.forRoot(appEffects),
StoreModule.forRoot(appReducers),
StoreRouterConnectingModule.forRoot(),
diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.html b/src/app/shared/search/search-labels/search-label/search-label.component.html
index dcb0a1fd88..bffb7f9329 100644
--- a/src/app/shared/search/search-labels/search-label/search-label.component.html
+++ b/src/app/shared/search/search-labels/search-label/search-label.component.html
@@ -1,6 +1,6 @@
- {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + key + '.' + value | translate: {default: normalizeFilterValue(value)} }}
+ {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}
×
diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts
index 956b5b81de..2203f73a75 100644
--- a/src/app/shared/search/search-labels/search-label/search-label.component.ts
+++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts
@@ -22,6 +22,11 @@ export class SearchLabelComponent implements OnInit {
searchLink: string;
removeParameters: Observable;
+ /**
+ * The name of the filter without the f. prefix
+ */
+ filterName: string;
+
/**
* Initialize the instance variable
*/
@@ -33,6 +38,7 @@ export class SearchLabelComponent implements OnInit {
ngOnInit(): void {
this.searchLink = this.getSearchLink();
this.removeParameters = this.getRemoveParams();
+ this.filterName = this.getFilterName();
}
/**
@@ -74,4 +80,8 @@ export class SearchLabelComponent implements OnInit {
const pattern = /,authority*$/g;
return value.replace(pattern, '');
}
+
+ private getFilterName(): string {
+ return this.key.startsWith('f.') ? this.key.substring(2) : this.key;
+ }
}
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index f799984545..c5bfb4e81a 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -206,11 +206,11 @@ const MODULES = [
];
const ROOT_MODULES = [
- TooltipModule.forRoot(),
- TranslateModule.forRoot({
+ TranslateModule.forChild({
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper },
useDefaultLang: true
- })
+ }),
+ TooltipModule.forRoot(),
];
const PIPES = [
@@ -349,7 +349,9 @@ const COMPONENTS = [
ExistingMetadataListElementComponent,
ItemAdminSearchResultListElementComponent,
CommunityAdminSearchResultListElementComponent,
- CollectionAdminSearchResultListElementComponent
+ CollectionAdminSearchResultListElementComponent,
+ PublicationSearchResultListElementComponent,
+ ExistingMetadataListElementComponent
];
const ENTRY_COMPONENTS = [
@@ -415,7 +417,7 @@ const ENTRY_COMPONENTS = [
ExternalSourceEntryImportModalComponent,
ItemAdminSearchResultListElementComponent,
CommunityAdminSearchResultListElementComponent,
- CollectionAdminSearchResultListElementComponent
+ CollectionAdminSearchResultListElementComponent,
];
const SHARED_ITEM_PAGE_COMPONENTS = [
@@ -448,8 +450,8 @@ const DIRECTIVES = [
@NgModule({
imports: [
+ ...ROOT_MODULES,
...MODULES,
- ...ROOT_MODULES
],
declarations: [
...PIPES,
@@ -457,8 +459,7 @@ const DIRECTIVES = [
...DIRECTIVES,
...ENTRY_COMPONENTS,
...SHARED_ITEM_PAGE_COMPONENTS,
- PublicationSearchResultListElementComponent,
- ExistingMetadataListElementComponent
+
],
providers: [
...PROVIDERS
diff --git a/src/app/shared/translate/missing-translation.helper.ts b/src/app/shared/translate/missing-translation.helper.ts
index 3995d4e5aa..cac984ecd5 100644
--- a/src/app/shared/translate/missing-translation.helper.ts
+++ b/src/app/shared/translate/missing-translation.helper.ts
@@ -2,7 +2,6 @@ import {MissingTranslationHandler, MissingTranslationHandlerParams} from '@ngx-t
export class MissingTranslationHelper implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
- console.log('bla', params);
if (params.interpolateParams) {
return (params.interpolateParams as any).default || params.key;
}