-
Notifications
You must be signed in to change notification settings - Fork 508
[DSpace-CRIS] Creation of a custom URL for Items #4814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi @FrancescoMolinaro, |
|
Hi @FrancescoMolinaro, |
src/app/submission/sections/custom-url/submission-section-custom-url.component.ts
Outdated
Show resolved
Hide resolved
src/assets/i18n/de.json5
Outdated
| "error.validation.license.notgranted": "Um die Veröffentlichung abzuschließen, müssen Sie die Lizenzbedingungen akzeptieren. Wenn Sie zur Zeit dazu nicht in der Lage sind, können Sie Ihre Arbeit sichern und später dazu zurückkehren, um zuzustimmen oder die Einreichung zu löschen.", | ||
| // "error.validation.license.required": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.", | ||
| // TODO New key - Add a translation | ||
| "error.validation.license.required": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old translation from error.validation.license.notgranted does also work for the new key error.validation.license.required:
"error.validation.license.required": "Um die Veröffentlichung abzuschließen, müssen Sie die Lizenzbedingungen akzeptieren. Wenn Sie zur Zeit dazu nicht in der Lage sind, können Sie Ihre Arbeit sichern und später dazu zurückkehren, um zuzustimmen oder die Einreichung zu löschen.",
src/assets/i18n/de.json5
Outdated
|
|
||
| // "error.validation.custom-url.conflict": "The custom url has been already used, please try with a new one.", | ||
| // TODO New key - Add a translation | ||
| "error.validation.custom-url.conflict": "The custom url has been already used, please try with a new one.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"error.validation.custom-url.conflict": "Die sprechende URL wird bereits andersweitig genutzt. Bitte versuchen Sie es mit einer anderen URL."
src/assets/i18n/de.json5
Outdated
|
|
||
| // "error.validation.custom-url.empty": "The custom url is required and cannot be empty.", | ||
| // TODO New key - Add a translation | ||
| "error.validation.custom-url.empty": "The custom url is required and cannot be empty.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"error.validation.custom-url.empty": "Die sprechende URL ist erforderlich und darf nicht leer sein."
src/assets/i18n/de.json5
Outdated
|
|
||
| // "error.validation.custom-url.invalid-characters": "The custom url contains invalid characters.", | ||
| // TODO New key - Add a translation | ||
| "error.validation.custom-url.invalid-characters": "The custom url contains invalid characters.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"error.validation.custom-url.invalid-characters": "Die sprechende URL enthält ungültige Zeichen.",
src/assets/i18n/de.json5
Outdated
|
|
||
| // "submission.sections.submit.progressbar.CustomUrlStep": "Custom Url", | ||
| // TODO New key - Add a translation | ||
| "submission.sections.submit.progressbar.CustomUrlStep": "Custom Url", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"submission.sections.progressbar.CustomUrlStep": "Sprechende URL",
src/assets/i18n/de.json5
Outdated
|
|
||
| // "submission.sections.custom-url.alert.info": "Define here a custom URL which will be used to reach the item instead of using an internal randomly generated UUID identifier. ", | ||
| // TODO New key - Add a translation | ||
| "submission.sections.custom-url.alert.info": "Define here a custom URL which will be used to reach the item instead of using an internal randomly generated UUID identifier. ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"submission.sections.custom-url.alert.info": "Legen Sie hier eine sprechende URL fest, über die das Item anstelle eines zufällig generierten internen UUID Identifiers erreichbar ist. ",
src/assets/i18n/de.json5
Outdated
|
|
||
| // "submission.sections.custom-url.url.placeholder": "Custom URL", | ||
| // TODO New key - Add a translation | ||
| "submission.sections.custom-url.url.placeholder": "Custom URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"submission.sections.custom-url.url.placeholder": "Sprechende URL",
|
|
||
| // "item.preview.organization.url": "URL", | ||
| // TODO New key - Add a translation | ||
| "item.preview.organization.url": "URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
src/assets/i18n/de.json5
Outdated
|
|
||
| // "item.preview.organization.address.addressLocality": "City", | ||
| // TODO New key - Add a translation | ||
| "item.preview.organization.address.addressLocality": "City", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"item.preview.organization.address.addressLocality": "Stadt",
|
|
||
| // "item.preview.organization.alternateName": "Alternative name", | ||
| // TODO New key - Add a translation | ||
| "item.preview.organization.alternateName": "Alternative name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"item.preview.organization.alternateName": "Alternativer Name",
|
We have found several places in the Angular code that cannot handle the case where a custom URL is used in the URL instead of an item’s UUID. For example, when a custom URL exists, no bundle can be created (in the file administration of the item). The corresponding component assumes that a UUID is present in the URL: There was also a bug in DSpace CRIS 7 and 8 when accessing the item administration if a custom URL existed (4Science#124). This bug was fixed in the latest DSpace CRIS 8 release. Before merging this PR, the frontend should be systematically tested with items that have a custom URL. |
|
A code search for |
|
Hi @saschaszott , thanks for the feedback, I have pushed some changes to the item page resolver so to enforce the uuid in case of an administrative view (also bitstreams upload). In this way we should keep all the older behaviours and mechanisms active; I have also checked the other occurencies of "params.id" and they would seem covered by the change to the item data service or not affected by the custom url (e.g. access control, workspace, etc.) If this would be approved I will propagate the change aslo on the CRIS codebase. I wanted also to inform that this feature is used on CRIS only on Person items and that is most likely the reason why certain aspect weren't considered, nevertheless I agree that the introduction of the feature shouldn't compromise existing behaviours. |
References
Related to DSpace/RestContract#318
Related to DSpace/DSpace#11549
##Description
This PR migrates the custom URL feature from DSpace-CRIS to core DSpace, allowing to define a custom url of item in submission.
##Instructions for Reviewers
The custom URL feature allows items to have human-friendly URLs instead of UUID-based paths.
To test it a rest config for the newly introduced section must be in place.
ref: DSpace/DSpace#11549 (comment)
Once the section is configured the user can provide a value for the custom url in submission.
After the item has been deposited it will be possible to access it via the custom url, e.g. /entities/person/customUrlValue
List of changes in this PR:
Adapted item resolver.
New submission section for custom url.
Additional change:
Fixed sync-i18n script (broken after latest updates on main)
Executed sync on labels.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.