From bb4403719055d005ec78913cc547ec6c1206faf0 Mon Sep 17 00:00:00 2001 From: amadulhaxxani Date: Thu, 16 Jul 2026 11:51:01 +0200 Subject: [PATCH 1/2] fix(subject-badge): add text-wrap and text-left to prevent overflow (cherry picked from commit 5f5b9f44ad262621fe44b405a65f2d47b6a74584) --- .../clarin-generic-item-field.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.html b/src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.html index 7c55c4cb5a5..6750d62ae03 100644 --- a/src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.html +++ b/src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.html @@ -31,7 +31,7 @@ - {{subject}} From 1459f5f5ac92e818f88c685f79155f42567ba3b8 Mon Sep 17 00:00:00 2001 From: Amad Ul Hassan Date: Fri, 23 Oct 2026 13:07:47 +0200 Subject: [PATCH 2/2] fix(file-description): display "N/A" when file description is empty (ufal/dspace-angular PR 167) * fix(file-description): display "N/A" when file description is empty * chore: apply review fixes - restore missing i18n keys and use robust test selectors * chore(i18n): restore blank lines in cs.json5 removed by sync-i18n Keep the key moves and new translations from the sync, but put back the blank-line separators so the diff only shows real changes. * chore(i18n): restore cs.json5 values mangled by sync-i18n on duplicate keys sync-i18n mixes up keys that appear twice in en.json5/cs.json5 and put the first Czech translation on the second (effective) entry. Restore the clarin-v7 values for admin.update-config.file-info.modified, admin.update-config.success.save.title and admin.update-config.error.save.message, and drop the bogus TODOs. --------- Co-authored-by: Ondrej Kosarko (cherry picked from commit 3eaf3f468f9408b1fe165a11354d114eb867e7d4) --- .../file-description.component.html | 2 +- .../file-description.component.spec.ts | 22 ++++++ src/assets/i18n/cs.json5 | 69 ++++++++++++------- src/assets/i18n/en.json5 | 2 + 4 files changed, 70 insertions(+), 25 deletions(-) diff --git a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html index 91287138d49..a335cf98fbe 100644 --- a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html +++ b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html @@ -22,7 +22,7 @@
{{'item.file.description.description' | translate}}
- {{ fileInput.description }} + {{ (fileInput.description) || ('item.file.description.na' | translate) }}
{{'item.file.description.checksum' | translate}}
diff --git a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts index e4219b968db..1c089e1a1e5 100644 --- a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts +++ b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts @@ -99,4 +99,26 @@ describe('FileDescriptionComponent', () => { ).nativeElement; expect(fileNameElement.textContent).toContain('testFile'); }); + + it('should show the fallback translation key when description is empty', () => { + component.fileInput.description = ''; + fixture.detectChanges(); + + const descDt = fixture.debugElement.queryAll(By.css('.file-content dt')) + .find((de) => (de.nativeElement as HTMLElement).textContent?.includes('item.file.description.description')); + expect(descDt).toBeTruthy(); + const descElement = (descDt!.nativeElement as HTMLElement).nextElementSibling as HTMLElement; + expect(descElement.textContent).toContain('item.file.description.na'); + }); + + it('should show the description text when description is present', () => { + component.fileInput.description = 'This is a test description'; + fixture.detectChanges(); + + const descDt = fixture.debugElement.queryAll(By.css('.file-content dt')) + .find((de) => (de.nativeElement as HTMLElement).textContent?.includes('item.file.description.description')); + expect(descDt).toBeTruthy(); + const descElement = (descDt!.nativeElement as HTMLElement).nextElementSibling as HTMLElement; + expect(descElement.textContent).toContain('This is a test description'); + }); }); diff --git a/src/assets/i18n/cs.json5 b/src/assets/i18n/cs.json5 index 8d8c4a6035a..2f97446db6d 100644 --- a/src/assets/i18n/cs.json5 +++ b/src/assets/i18n/cs.json5 @@ -527,6 +527,18 @@ // "admin.access-control.epeople.form.notification.deleted.failure": "Failed to delete EPerson \"{{name}}\"", "admin.access-control.epeople.form.notification.deleted.failure": "Nepodařilo se smazat uživatele \"{{name}}\"", + // "admin.access-control.epeople.notification.deleted.forbidden.self": "You cannot delete your own EPerson account.", + "admin.access-control.epeople.notification.deleted.forbidden.self": "Nemůžete smazat svůj vlastní účet uživatele.", + + // "admin.access-control.epeople.delete.warning.submitter": "Warning: this user has submitted items. Deleting this EPerson may affect submission ownership and related repository records.", + "admin.access-control.epeople.delete.warning.submitter": "Upozornění: Tento uživatel odeslal položky. Smazání tohoto uživatele může ovlivnit vlastnictví příspěvků a související záznamy v repozitáři.", + + // "admin.access-control.epeople.delete.warning.admin": "Warning: this user has administrator privileges. Deleting this EPerson will remove an administrator account.", + "admin.access-control.epeople.delete.warning.admin": "Upozornění: Tento uživatel má oprávnění správce. Smazání tohoto uživatele odebere účet správce.", + + // "admin.access-control.epeople.delete.warning.submitterAndAdmin": "Warning: this user has submitted items and has administrator privileges. Deleting this EPerson may affect submission ownership and remove an administrator account.", + "admin.access-control.epeople.delete.warning.submitterAndAdmin": "Upozornění: Tento uživatel odeslal položky a má oprávnění správce. Smazání tohoto uživatele může ovlivnit vlastnictví příspěvků a odebrat účet správce.", + // "admin.access-control.epeople.form.groupsEPersonIsMemberOf": "Member of these groups:", "admin.access-control.epeople.form.groupsEPersonIsMemberOf": "Člen těchto skupin:", @@ -551,18 +563,6 @@ // "admin.access-control.epeople.notification.deleted.success": "Successfully deleted EPerson: \"{{name}}\"", "admin.access-control.epeople.notification.deleted.success": "Úspěšně odstraněn uživatel: \"{{name}}\"", - // "admin.access-control.epeople.notification.deleted.forbidden.self": "You cannot delete your own EPerson account.", - "admin.access-control.epeople.notification.deleted.forbidden.self": "Nemůžete smazat svůj vlastní účet uživatele.", - - // "admin.access-control.epeople.delete.warning.submitter": "Warning: this user has submitted items. Deleting this EPerson may affect submission ownership and related repository records.", - "admin.access-control.epeople.delete.warning.submitter": "Upozornění: Tento uživatel odeslal položky. Smazání tohoto uživatele může ovlivnit vlastnictví příspěvků a související záznamy v repozitáři.", - - // "admin.access-control.epeople.delete.warning.admin": "Warning: this user has administrator privileges. Deleting this EPerson will remove an administrator account.", - "admin.access-control.epeople.delete.warning.admin": "Upozornění: Tento uživatel má oprávnění správce. Smazání tohoto uživatele odebere účet správce.", - - // "admin.access-control.epeople.delete.warning.submitterAndAdmin": "Warning: this user has submitted items and has administrator privileges. Deleting this EPerson may affect submission ownership and remove an administrator account.", - "admin.access-control.epeople.delete.warning.submitterAndAdmin": "Upozornění: Tento uživatel odeslal položky a má oprávnění správce. Smazání tohoto uživatele může ovlivnit vlastnictví příspěvků a odebrat účet správce.", - // "admin.access-control.groups.title": "Groups", "admin.access-control.groups.title": "Skupiny", @@ -4632,6 +4632,10 @@ // "menu.section.icon.workflow": "Administer workflow menu section", "menu.section.icon.workflow": "Sekce menu pro administrativní workflow", + // "menu.section.icon.update_config": "Update Configuration menu section", + // TODO New key - Add a translation + "menu.section.icon.update_config": "Update Configuration menu section", + // "menu.section.icon.unpin": "Unpin sidebar", "menu.section.icon.unpin": "Odepnout postranní panel", @@ -8211,6 +8215,9 @@ // "menu.section.system-wide-alert": "System-wide Alert", "menu.section.system-wide-alert": "Systémová upozornění", + // "menu.section.update-config": "Update Config", + "menu.section.update-config": "Úprava konfigurace", + // "system-wide-alert.form.header": "System-wide Alert", "system-wide-alert.form.header": "Systémová upozornění", @@ -8259,12 +8266,6 @@ // "system-wide-alert.form.create.error": "Something went wrong when creating the system-wide alert", "system-wide-alert.form.create.error": "Něco se pokazilo při vytváření systémového upozornění", - // "admin.system-wide-alert.breadcrumbs": "System-wide Alerts", - "admin.system-wide-alert.breadcrumbs": "Systémová upozornění", - - // "admin.system-wide-alert.title": "System-wide Alerts", - "admin.system-wide-alert.title": "Systémová upozornění", - // "admin.update-config.title": "Update Configuration", "admin.update-config.title": "Aktualizace konfigurace", @@ -8419,8 +8420,9 @@ // "admin.update-config.help.allowed-files.title": "Editable Files", "admin.update-config.help.allowed-files.title": "Editovatelné soubory", - // "admin.update-config.help.allowed-files.description": "Only XML files in the config-be directory can be edited for security reasons:", - "admin.update-config.help.allowed-files.description": "Pouze XML soubory v adresáři config-be mohou být editovány z bezpečnostních důvodů:", + // "admin.update-config.help.allowed-files.description": "Only configuration files in the server configuration directory can be edited for security reasons:", + // TODO New key - Add a translation + "admin.update-config.help.allowed-files.description": "Only configuration files in the server configuration directory can be edited for security reasons:", // "admin.update-config.error.load-files.title": "Load Error", "admin.update-config.error.load-files.title": "Chyba načtení", @@ -8429,6 +8431,7 @@ "admin.update-config.error.load-files.message": "Nepodařilo se načíst seznam konfiguračních souborů", // Breadcrumb + // "admin.update-config.breadcrumbs": "Update Configuration", "admin.update-config.breadcrumbs": "Aktualizace konfigurace", // File Information @@ -8514,6 +8517,12 @@ // "admin.update-config.error.reload.message": "Could not reload original file", "admin.update-config.error.reload.message": "Nepodařilo se znovu načíst původní soubor", + // "admin.system-wide-alert.breadcrumbs": "System-wide Alerts", + "admin.system-wide-alert.breadcrumbs": "Systémová upozornění", + + // "admin.system-wide-alert.title": "System-wide Alerts", + "admin.system-wide-alert.title": "Systémová upozornění", + // "item-access-control-title": "This form allows you to perform changes to the access conditions of the item's metadata or its bitstreams.", "item-access-control-title": "Tento formulář umožňuje provést změny typu přístupu k metadatovému záznamu nebo souborům.", @@ -8605,16 +8614,25 @@ "access-control-option-end-date": "Povolit přístup do", // "access-control-option-end-date-note": "Select the date until which the related access condition is applied", + "access-control-option-end-date-note": "Vyberte datum, do kterého má být typ přístupu aktivován", + // "item.delete.virtual-metadata.info": "Show virtual metadata information", + // TODO Source message changed - Revise the translation "item.delete.virtual-metadata.info": "Zobrazit informace o virtuálních metadatech", + // "access-control.start-date.calendar-button": "Open start date calendar", "access-control.start-date.calendar-button": "Otevřít kalendář počátečního data", + // "access-control.end-date.calendar-button": "Open end date calendar", "access-control.end-date.calendar-button": "Otevřít kalendář koncového data", + // "form.remove-related-item": "Remove related item", "form.remove-related-item": "Odebrat související položku", + // "form.relation-group.save": "Save relation group", "form.relation-group.save": "Uložit skupinu vztahů", + // "form.relation-group.delete": "Delete relation group", "form.relation-group.delete": "Smazat skupinu vztahů", + // "form.relation-group.clear": "Clear relation group", "form.relation-group.clear": "Vyčistit skupinu vztahů", + // "submission.cc-license.field-info": "More information about this license field", "submission.cc-license.field-info": "Více informací o tomto licenčním poli", - "access-control-option-end-date-note": "Vyberte datum, do kterého má být typ přístupu aktivován", // "vocabulary-treeview.search.form.add": "Add", "vocabulary-treeview.search.form.add": "Přidat", @@ -9213,6 +9231,9 @@ // "item.file.description.description": "Description", "item.file.description.description": "Popis", + // "item.file.description.na": "N/A", + "item.file.description.na": "Neuvedeno", + // "item.file.description.checksum": "MD5", "item.file.description.checksum": "MD5", @@ -9230,8 +9251,11 @@ // "item.page.download.button.command.line": "Download instructions for command line", "item.page.download.button.command.line": "Instrukce pro stažení z příkazové řádky", + // "item.page.download.command.copy": "Copy to clipboard", "item.page.download.command.copy": "Kopírovat", + // "item.page.download.command.copied": "Copied!", "item.page.download.command.copied": "Zkopírováno!", + // "item.page.download.command.close": "Close", "item.page.download.command.close": "Zavřít", // "item.page.download.button.all.files.zip": "Download all files in item", @@ -9381,9 +9405,6 @@ // "menu.section.licenses": "License Administration", "menu.section.licenses": "Správa licencí", - // "menu.section.update-config": "Update Config", - "menu.section.update-config": "Úprava konfigurace", - // "menu.section.submissions": "Submissions", "menu.section.submissions": "Příspěvky", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 8def4121098..55d4b3faa93 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6108,6 +6108,8 @@ "item.file.description.description": "Description", + "item.file.description.na": "N/A", + "item.file.description.checksum": "MD5", "item.file.description.download.file": "Download file",