Add missing item.preview.* i18n keys + ensure consistency with existing i18n patterns#5149
Add missing item.preview.* i18n keys + ensure consistency with existing i18n patterns#5149MMilosz wants to merge 2 commits intoDSpace:mainfrom
item.preview.* i18n keys + ensure consistency with existing i18n patterns#5149Conversation
- 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:", |
There was a problem hiding this comment.
❗ 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):", |
There was a problem hiding this comment.
❗ Note: Unsure if this should stay as RID:, ResearcherID:, or ResearcherID (RID):
| "item.preview.dc.title.alternative": "Acronym:", | ||
| "item.preview.oaire.awardURI": "Award URI:", | ||
|
|
||
| "item.preview.dc.title.alternative": "Alternative Names:", |
There was a problem hiding this comment.
❗ 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:", |
There was a problem hiding this comment.
❗ 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>
| "item.preview.oairecerif.funding.startDate": "Funding Start Date:", | ||
|
|
||
| "item.preview.organization.identifier.ror": "ROR ID", | ||
| "item.preview.oairecerif.fundingParent": "Funding Program:", |
There was a problem hiding this comment.
❗ Note: I couldn't find any details in OpenAIRE docs regarding this field... however, I found one DSpace instance that uses this translation [source]
| "item.preview.organization.foundingDate": "Founding Date", | ||
| "item.preview.oairecerif.funding.endDate": "Funding End Date:", |
There was a problem hiding this comment.
Note for reviewer: foundingDate was moved to L3166, it's different key than endDate! (Same applies in other places!)
References
Description
This PR adds missing
item.preview.*translations for metadata fields in the Publication Preview section guaranteed by the existing*-integration.xmlbackend files.The second commit introduces consistency fixes with existing i18n patterns (see 'List of changes' below).
The missing fields were identified by comparing
*-integration.xmlfiles with existing i18n keys inen.json5file. I used the following Bash one-liner (replace[dspace-source-backend]and[dspace-source-frontend]with proper dirs):Instructions for Reviewers
This PR adds translations for missing metadata fields that appear in the
/import-externalview.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.00061v6Here's how it looks before this PR:
List of changes
item.preview.*entries alphabetically.Changes Summary
Major: Changes in translation
Major: Completely new key
Minor: Colon + Title Case
Minor: Colon + Plural
Minor: Colon
Checklist
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.