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}} 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 7864017a024..e2d44eb9cea 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", @@ -4647,6 +4647,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", @@ -8233,6 +8237,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í", @@ -8281,12 +8288,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", @@ -8441,8 +8442,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í", @@ -8451,6 +8453,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 @@ -8536,6 +8539,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.", @@ -8627,16 +8636,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", @@ -9235,6 +9253,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", @@ -9252,8 +9273,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", @@ -9403,9 +9427,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 3949d4b0e4e..73f491501f0 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6120,6 +6120,8 @@ "item.file.description.description": "Description", + "item.file.description.na": "N/A", + "item.file.description.checksum": "MD5", "item.file.description.download.file": "Download file",