Skip to content

Commit 59f913b

Browse files
Made dso-selector placeholder types translatable
1 parent 0ba1b26 commit 59f913b

5 files changed

Lines changed: 30 additions & 14 deletions

File tree

src/app/item-page/edit-item-page/item-move/item-move.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>{{'item.edit.move.head' | translate: {id: (itemRD$ | async)?.payload?.handle
66
<div class="row">
77
<div class="col-12">
88
<div class="card mb-3">
9-
<div class="card-header">{{'dso-selector.placeholder' | translate: { type: 'collection' } }}</div>
9+
<div class="card-header">{{'dso-selector.placeholder' | translate: { type: 'dso-selector.placeholder.type.collection' | translate } }}</div>
1010
<div class="card-body">
1111
<ds-authorized-collection-selector [types]="COLLECTIONS"
1212
[currentDSOId]="selectedCollection ? selectedCollection.id : originalCollection.id"

src/app/shared/dso-selector/dso-selector/dso-selector.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
185185
* The search will always start with the initial currentDSOId value
186186
*/
187187
ngOnInit(): void {
188-
this.typesString = this.types.map((type: string) => type.toString().toLowerCase()).join(', ');
188+
this.typesString = this.types.map((type: string) => this.translate.instant(`dso-selector.placeholder.type.${type.toString().toLowerCase()}`)).join(', ');
189189

190190
// Create an observable searching for the current DSO (return empty list if there's no current DSO)
191191
let currentDSOResult$: Observable<PaginatedList<SearchResult<DSpaceObject>>>;

src/assets/i18n/en.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,12 @@
17181718

17191719
"dso-selector.placeholder": "Search for a {{ type }}",
17201720

1721+
"dso-selector.placeholder.type.community": "community",
1722+
1723+
"dso-selector.placeholder.type.collection": "collection",
1724+
1725+
"dso-selector.placeholder.type.item": "item",
1726+
17211727
"dso-selector.select.collection.head": "Select a collection",
17221728

17231729
"dso-selector.set-scope.community.head": "Select a search scope",

src/assets/i18n/fr.json5

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@
176176

177177
// "admin.registries.bitstream-formats.table.name": "Name",
178178
"admin.registries.bitstream-formats.table.name": "Nom",
179-
// TODO New key - Add a translation
179+
180+
// "admin.registries.bitstream-formats.table.id": "ID",
180181
"admin.registries.bitstream-formats.table.id": "ID",
181182

182183
// "admin.registries.bitstream-formats.table.return": "Back",
@@ -253,7 +254,8 @@
253254

254255
// "admin.registries.schema.fields.table.field": "Field",
255256
"admin.registries.schema.fields.table.field": "Champ",
256-
// TODO New key - Add a translation
257+
258+
// "admin.registries.schema.fields.table.id": "ID",
257259
"admin.registries.schema.fields.table.id": "ID",
258260

259261
// "admin.registries.schema.fields.table.scopenote": "Scope Note",
@@ -749,9 +751,6 @@
749751
"admin.reports.collections.match_all_selected_filters": "Correspondant à tous les filtres sélectionnés",
750752

751753

752-
//"admin.reports.items.title": "Metadata Query Report",
753-
"admin.reports.items.title": "Rapport de requête de métadonnées",
754-
755754
//"admin.reports.items.breadcrumbs": "Metadata Query Report",
756755
"admin.reports.items.breadcrumbs": "Requête de métadonnées",
757756

@@ -2187,6 +2186,15 @@
21872186
// "dso-selector.placeholder": "Search for a {{ type }}",
21882187
"dso-selector.placeholder": "Rechercher un(e) {{ type }}",
21892188

2189+
// "dso-selector.placeholder.type.community": "community",
2190+
"dso-selector.placeholder.type.community": "communauté",
2191+
2192+
// "dso-selector.placeholder.type.collection": "collection",
2193+
"dso-selector.placeholder.type.collection": "collection",
2194+
2195+
// "dso-selector.placeholder.type.item": "item",
2196+
"dso-selector.placeholder.type.item": "item",
2197+
21902198
// "dso-selector.select.collection.head": "Select a collection",
21912199
"dso-selector.select.collection.head": "Sélectionner une collection",
21922200

@@ -6402,9 +6410,6 @@
64026410
//"workspace.search.results.head": "Your submissions",
64036411
"workspace.search.results.head": "Vos dépôts",
64046412

6405-
// "workspace.search.results.head": "Your submissions",
6406-
"workspace.search.results.head": "Vos dépôts",
6407-
64086413
// "workflowAdmin.search.results.head": "Administer Workflow",
64096414
"workflowAdmin.search.results.head": "Workflow Administrateur",
64106415

src/assets/i18n/nl.json5

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -839,10 +839,6 @@
839839
"admin.reports.collections.match_all_selected_filters": "Matching all selected filters",
840840

841841

842-
//"admin.reports.items.title": "Metadata Query Report",
843-
// TODO New key - Add a translation
844-
"admin.reports.items.title": "Metadata Query Report",
845-
846842
//"admin.reports.items.breadcrumbs": "Metadata Query Report",
847843
// TODO New key - Add a translation
848844
"admin.reports.items.breadcrumbs": "Metadata Query Report",
@@ -2377,6 +2373,15 @@
23772373
// "dso-selector.placeholder": "Search for a {{ type }}",
23782374
"dso-selector.placeholder": "Zoek een {{ type }}",
23792375

2376+
// "dso-selector.placeholder.type.community": "community",
2377+
"dso-selector.placeholder.type.community": "community",
2378+
2379+
// "dso-selector.placeholder.type.collection": "collection",
2380+
"dso-selector.placeholder.type.collection": "collectie",
2381+
2382+
// "dso-selector.placeholder.type.item": "item",
2383+
"dso-selector.placeholder.type.item": "item",
2384+
23802385

23812386

23822387
// "confirmation-modal.export-metadata.header": "Export metadata for {{ dsoName }}",

0 commit comments

Comments
 (0)