Skip to content

Comments

Add missing item.preview.* i18n keys + ensure consistency with existing i18n patterns#5149

Open
MMilosz wants to merge 2 commits intoDSpace:mainfrom
MMilosz:i18n/en-keys-item-preview
Open

Add missing item.preview.* i18n keys + ensure consistency with existing i18n patterns#5149
MMilosz wants to merge 2 commits intoDSpace:mainfrom
MMilosz:i18n/en-keys-item-preview

Conversation

@MMilosz
Copy link
Contributor

@MMilosz MMilosz commented Feb 23, 2026

References

Description

This PR adds missing item.preview.* translations for metadata fields in the Publication Preview section guaranteed by the existing *-integration.xml backend files.

The second commit introduces consistency fixes with existing i18n patterns (see 'List of changes' below).

The missing fields were identified by comparing *-integration.xml files with existing i18n keys in en.json5 file. I used the following Bash one-liner (replace [dspace-source-backend] and [dspace-source-frontend] with proper dirs):

$ LC_ALL=C grep -hPo '(?<=<constructor-arg value=")[^"]+' [dspace-source-backend]/dspace/config/spring/api/*integration.xml | sort -u | sed 's/^/item.preview./' | LC_ALL=C comm -23 - <(jq -r 'keys[]' <(json5 [dspace-source-frontend]/src/assets/i18n/en.json5) | sort)

Instructions for Reviewers

This PR adds translations for missing metadata fields that appear in the /import-external view.

To test this, go to the MyDSpace -> Import metadata from external source (icon) -> select any entity type. Then, search the external source & preview any item before pressing the 'Start submission'.

One of the missing keys was item.preview.dc.source. You can verify it's working properly by navigating to this URL (arXiv requires no API key):
/import-external?entity=Publication&sourceId=arxiv&query=1802.00061v6

Here's how it looks before this PR:

image

List of changes

  • Kept plural form where applicable (e.g., "Contributors", "Other Identifiers") to match existing patterns.
  • Maintained Title Case for all labels for consistency.
  • Sorted item.preview.* entries alphabetically.
  • Added colons at the end of labels to match the pattern used in latest translations (vide: audit trails, quality assurance, submission.sections.*)
  • Added comments in the PR for a few fields where the appropriate translation wasn't entirely clear (needs reviewer input)

Changes Summary

Major: Changes in translation

KEY BEFORE AFTER
item.preview.dc.date.issued Published date: Publication Date:
item.preview.dc.title.alternative Acronym: Alternative Names:

Major: Completely new key

KEY BEFORE AFTER
item.preview.dc.contributor   Contributors:
item.preview.dc.contributor.editor   Editors:
item.preview.dc.contributor.other   Other Contributors:
item.preview.dc.date.submitted   Submission Date:
item.preview.dc.identifier.mag   Microsoft Academic Graph (MAG) ID:
item.preview.dc.identifier.rid   ResearcherID (RID):
item.preview.dc.identifier.scopus-author-id   Scopus Author ID:
item.preview.dc.rights.license   License:
item.preview.dc.source   Source:
item.preview.oaire.awardURI   Award URI:
item.preview.oaire.citation.edition   Edition:
item.preview.oairecerif.acronym   Acronym:
item.preview.oairecerif.funder   Funder:
item.preview.oairecerif.funding.endDate   Funding End Date:
item.preview.oairecerif.funding.identifier   Funding Identifier:
item.preview.oairecerif.funding.startDate   Funding Start Date:
item.preview.oairecerif.fundingParent   Funding Program:
item.preview.oairecerif.oamandate   OA Mandate:
item.preview.organization.parentOrganization   Parent Organization:
item.preview.person.identifier.rid   ResearcherID (RID):
item.preview.person.identifier.scopus-author-id   Scopus Author ID:

Minor: Colon + Title Case

KEY BEFORE AFTER
item.preview.dc.relation.ispartofseries Is part of series Is Part of Series:
item.preview.oaire.citation.endPage Citation end page Citation End Page:
item.preview.oaire.citation.startPage Citation start page Citation Start Page:
item.preview.oaire.citation.title Citation container Citation Container:

Minor: Colon + Plural

KEY BEFORE AFTER
item.preview.dc.identifier.other Other Identifier Other Identifiers:
item.preview.organization.alternateName Alternative name Alternative Names:
item.preview.project.investigator Project Investigator Project Investigators:

Minor: Colon

KEY BEFORE AFTER
item.preview.creativework.publisher Publisher Publisher:
item.preview.creativeworkseries.issn ISSN ISSN:
item.preview.dc.description Description Description:
item.preview.dc.identifier.doi DOI DOI:
item.preview.dc.identifier.isbn ISBN ISBN:
item.preview.dc.identifier.isni ISSN ISNI:
item.preview.dc.identifier.issn ISSN ISSN:
item.preview.dc.identifier.openalex OpenAlex Identifier OpenAlex Identifier:
item.preview.dc.relation.hasversion Has version Has Version:
item.preview.dc.relation.ispartof Journal or Series Journal or Series:
item.preview.dc.relation.issn ISSN ISSN:
item.preview.dc.rights Rights Rights:
item.preview.oaire.citation.issue Issue Issue:
item.preview.oaire.citation.volume Volume Volume:
item.preview.oaire.version Version Version:
item.preview.oairecerif.identifier.url URL URL:
item.preview.organization.address.addressCountry Country Country:
item.preview.organization.address.addressLocality City City:
item.preview.organization.foundingDate Founding Date Founding Date:
item.preview.organization.identifier.crossrefid Crossref ID Crossref ID:
item.preview.organization.identifier.isni ISNI ISNI:
item.preview.organization.identifier.ror ROR ID ROR ID:
item.preview.organization.legalName Legal Name Legal Name:
item.preview.organization.url URL URL:

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

- Extracted strings from `<constructor-arg value=".*"` in [dspace-source-backend]/dspace/config/spring/api/*-integration.xml
- Compared against existing keys in [dspace-source-frontend]/src/assets/i18n/en.json5

See DSpace/DSpace#5148 for details
- standardize all item.preview.* labels with colons & Title Case Capitalization & singular/plural forms for consistency
- move item.preview.organization.url & item.preview.organization.address.{addressLocality,legalName} closer to other item.preview.organization.*
- change 'Published date' -> 'Publication Date' for consistent '[Action] Date' format
- change 'Acronym' -> 'Alternative Names:' for consistency with the metadatum field name: dc.title.alternative
- remove duplicates
"item.preview.dc.identifier.isbn": "ISBN",
"item.preview.dc.identifier.isni": "ISNI:",

"item.preview.dc.identifier.mag": "Microsoft Academic Graph (MAG) ID:",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Note: Unsure if this should stay as MAG:, MAG ID:, MAG Identifier:, or Microsoft Academic Graph (MAG) ID:


"item.preview.dc.identifier.mag": "Microsoft Academic Graph (MAG) ID:",

"item.preview.dc.identifier.rid": "ResearcherID (RID):",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Note: Unsure if this should stay as RID:, ResearcherID:, or ResearcherID (RID):

Comment on lines -3112 to +3138
"item.preview.dc.title.alternative": "Acronym:",
"item.preview.oaire.awardURI": "Award URI:",

"item.preview.dc.title.alternative": "Alternative Names:",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Note: the change Acronym: -> Alternative Names: is to better reflect that it uses the dc.title.alternative metadatum (NOT dc.title.abbreviated)

(Needs approval)

"item.preview.oaire.citation.volume": "Volume:",

"item.preview.oaire.citation.volume": "Volume",
"item.preview.oaire.citation.title": "Citation Container:",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Note: Unsure if Citation Container: is understandable. What about... Source Title, Appears In, Parent Title, Source Work, Journal/Book Title?

Per oaire:citationTitle definition:

The title name of the container (e.g. journal, book, conference) this work is published in. This property is considered to be part of the bibliographic citation.
[...]
24.3. Example
oaire:citationTitlesome Journal Title</oaire:citationTitle>

Source: https://openaire-guidelines-for-literature-repository-managers.readthedocs.io/en/v4.0.0/field_citationtitle.html#citation-title-r

"item.preview.oairecerif.funding.startDate": "Funding Start Date:",

"item.preview.organization.identifier.ror": "ROR ID",
"item.preview.oairecerif.fundingParent": "Funding Program:",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Note: I couldn't find any details in OpenAIRE docs regarding this field... however, I found one DSpace instance that uses this translation [source]

@lgeggleston lgeggleston added bug i18n / l10n Internationalisation and localisation, related to message catalogs labels Feb 23, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Feb 23, 2026
@lgeggleston lgeggleston added the 1 APPROVAL pull request only requires a single approval to merge label Feb 23, 2026
Comment on lines -3122 to +3148
"item.preview.organization.foundingDate": "Founding Date",
"item.preview.oairecerif.funding.endDate": "Funding End Date:",
Copy link
Contributor Author

@MMilosz MMilosz Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewer: foundingDate was moved to L3166, it's different key than endDate! (Same applies in other places!)

@MMilosz MMilosz marked this pull request as ready for review February 23, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug i18n / l10n Internationalisation and localisation, related to message catalogs

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Missing item.preview.* i18n keys

2 participants