You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VSB-TUO/CC licence section for the local CC legal tools CSV - #1714
The Creative Commons API (api.creativecommons.org) was shut down on 2026-11-02. The backend now serves the CC licences from a local CSV and sends i18n keys instead of localised texts, so the CC licence section has to translate them.
Not-reported issues
After a save or reopen, unticking the licence or choosing another option did not remove the stored dc.rights.uri (the REST API never returns accepted).
Analysis
Backport of the not-yet-merged upstream fix DSpace/dspace-angular#5735. The 3 upstream commits are cherry-picked with -x; the upstream template uses the new control-flow syntax, so the | translate change was applied to the VSB *ngIf template by hand, and the en.json5 keys of the PR head are appended in one commit.
the remove of a saved licence now follows upstream (hasValue(data.accepted)); while that remove is pending, accepting the same licence again still queues the add, otherwise the VSB-TUO/Fixed still loading of the Saving bar for the CC licenses #1009 duplicate filter dropped it and the save deleted the licence
Czech translations for all cc-license.* keys
Tested: submission-section-cc-licenses.component.spec.ts (21 tests, including untick/re-tick), type-check and lint, plus a local stack with the backend PR: new item, reopen restores the selection, Czech UI, and unticking the licence of an existing item with an http:// URI.
…is allows for adjusting the license based on what was previously provided between saves, fixed erroneous i18n message
(cherry picked from commit 20a50c1)
The cherry-picked commits could not apply their en.json5 hunks onto the
customer file, so the final set of keys from the PR head
(7562344) is appended here in one go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backend no longer localises the CC chooser (cc.license.locale is
gone), so the labels and hints now come from the UI translation files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The REST API never returns the accepted state, so after a save or reopen
this.data.accepted is undefined and the VSB guard (wasAccepted) never let
the remove through: unticking the licence, or picking another option, left
the old dc.rights.uri on the item. Take the upstream condition from
DSpace#5735 (250d6ba) and keep the VSB link filter on add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unticking a saved licence queues a remove, but data.uri still holds the
stored link, so ticking it again was dropped by the #1009 duplicate-add
filter and the save removed the licence the UI showed as accepted. Let the
add through while a remove of the stored uri is pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request updates the Creative Commons licence submission section for locally served CSV licence data, restores saved selections, translates licence metadata, and improves URI patch handling.
Changes:
Adds English and Czech translations for Creative Commons fields, options, descriptions, and hints.
Restores licence and option selections from saved Creative Commons URIs, including legacy HTTP and public-domain URLs.
Improves add/remove operation handling and expands component test coverage.
Updates the licence selector layout for responsive use.
Outstanding findings:
Critical (1 vote): Re-accepting an unticked licence can queue the add operation asynchronously, allowing a save to submit only the remove operation and permanently delete the licence. The stored URI must be queued synchronously or the save coordinated with the pending lookup.
Moderate (2 votes): CC translation keys are added only to the English and Czech catalogues; users of other active languages may see raw translation keys. Add the keys to each active catalogue or provide an explicit English fallback.
File
Description
src/assets/i18n/en.json5
Adds English Creative Commons licence translations.
When a saved licence is unticked and ticked again with the same selection,
add the stored uri synchronously instead of after the asynchronous link
lookup, so a save dispatched in between cannot send only the remove.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
An active moderate issue remains because an asynchronous URL lookup can use stale acceptance state and queue an add after the checkbox has been unticked.
This lookup subscription is not tied to the acceptance state that started it. For example, after a remove is queued, accepting a changed option starts an asynchronous URL lookup; unticking again before it completes leaves uriRemoveQueued true, so this predicate still accepts the stale result and queues an add even though the current checkbox is false. Cancel/invalidate the pending lookup when the selection or accepted state changes, or re-check the current state before adding the result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
Reported issues
The Creative Commons API (
api.creativecommons.org) was shut down on 2026-11-02. The backend now serves the CC licences from a local CSV and sends i18n keys instead of localised texts, so the CC licence section has to translate them.Not-reported issues
dc.rights.uri(the REST API never returnsaccepted).Analysis
Backport of the not-yet-merged upstream fix
DSpace/dspace-angular#5735. The 3 upstream commits are cherry-picked with-x; the upstream template uses the new control-flow syntax, so the| translatechange was applied to the VSB*ngIftemplate by hand, and the en.json5 keys of the PR head are appended in one commit.VSB-TUO specifics:
ccLicenseLinkTrigger$, VSB-TUO/Fixed still loading of theSavingbar for the CC licenses #1009) is kept where upstream assignsccLicenseLink$directlyhasValue(data.accepted)); while that remove is pending, accepting the same licence again still queues the add, otherwise the VSB-TUO/Fixed still loading of theSavingbar for the CC licenses #1009 duplicate filter dropped it and the save deleted the licencecc-license.*keysTested:
submission-section-cc-licenses.component.spec.ts(21 tests, including untick/re-tick), type-check and lint, plus a local stack with the backend PR: new item, reopen restores the selection, Czech UI, and unticking the licence of an existing item with anhttp://URI.Requires the backend PR: dataquest-dev/DSpace#1645
Problems
🤖 Generated with Claude Code