Skip to content

Commit

Permalink
documents: fix form options label/value
Browse files Browse the repository at this point in the history
- Fixes the JSON schema, in the form options, when the label has a value
  in natural language instead of the code (as in the value of the value
  key) as specified in the guidelines¹.
- Replaces the title value that is in natural language by it's code in
  some oneOf sections of the document JSON schema, in order to avoid
  translating both the code and the natural language version. Removes
  the corresponding useless strings from the manual translations file.

¹ https://github.com/rero/developer-resources/blob/master/data/jsonschema.md#enum

Co-Authored-by: Igor Milhit <[email protected]>
  • Loading branch information
iGor milhit committed Feb 3, 2021
1 parent fc51cee commit 50c82ba
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 140 deletions.
40 changes: 0 additions & 40 deletions rero_ils/manual_translations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ _('patrons')
_('librarian')
_('staff')

_('article')
_('book')
_('ebook')
_('journal')
_('score')
_('sound')
_('video')
_('other')

_('gnd')
_('rero')
_('idref')
Expand All @@ -54,34 +45,3 @@ _('Date not available and automatically set to 2050')
# Harvested source
_('ebibliomedia')
_('mv-cantook')

# Issuance main type
_('rdami:1001')
_('rdami:1002')
_('rdami:1003')
_('rdami:1004')

# oneOff contribution types
_('Link to person entity')
_('Person')
_('Organisation')

# Document main types
_('docmaintype_archives')
_('docmaintype_article')
_('docmaintype_audio')
_('docmaintype_book')
_('docmaintype_children')
_('docmaintype_comic')
_('docmaintype_electronic')
_('docmaintype_game')
_('docmaintype_image')
_('docmaintype_language_method')
_('docmaintype_leaf')
_('docmaintype_map')
_('docmaintype_movie_series')
_('docmaintype_object')
_('docmaintype_other')
_('docmaintype_score')
_('docmaintype_serial')
_('docmaintype_series')
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"options": [
{
"value": "bf:Local",
"label": "Local"
"label": "bf:local"
}
],
"templateOptions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@
"Type": "selectWithSort",
"options": [
{
"label": "Resource",
"label": "resource",
"value": "resource"
},
{
"label": "Version of resource",
"label": "versionOfResource",
"value": "versionOfResource"
},
{
"label": "Related resource",
"label": "relatedResource",
"value": "relatedResource"
},
{
"label": "Hidden URL",
"label": "hiddenUrl",
"value": "hiddenUrl"
},
{
"label": "No info",
"label": "noInfo",
"value": "noInfo"
}
],
Expand Down Expand Up @@ -110,115 +110,115 @@
"type": "selectWithSort",
"options": [
{
"label": "Poster",
"label": "poster",
"value": "poster"
},
{
"label": "Audio",
"label": "audio",
"value": "audio"
},
{
"label": "Postcard",
"label": "postcard",
"value": "postcard"
},
{
"label": "Addition",
"label": "addition",
"value": "addition"
},
{
"label": "Debriefing",
"label": "debriefing",
"value": "debriefing"
},
{
"label": "Exhibition documentation",
"label": "exhibitionDocumentation",
"value": "exhibitionDocumentation"
},
{
"label": "Erratum",
"label": "erratum",
"value": "erratum"
},
{
"label": "Bookplate",
"label": "bookplate",
"value": "bookplate"
},
{
"label": "Extract",
"label": "extract",
"value": "extract"
},
{
"label": "Educational sheet",
"label": "educational sheet",
"value": "educationalSheet"
},
{
"label": "Illustrations",
"label": "illustrations",
"value": "illustrations"
},
{
"label": "Cover image",
"label": "coverImage",
"value": "coverImage"
},
{
"label": "Delivery information",
"label": "deliveryInformation",
"value": "deliveryInformation"
},
{
"label": "Biographical information",
"label": "biographicalInformation",
"value": "biographicalInformation"
},
{
"label": "Introduction/preface",
"label": "introductionPreface",
"value": "introductionPreface"
},
{
"label": "Class reading",
"label": "classReading",
"value": "classReading"
},
{
"label": "Teacher's kit",
"label": "teachersKit",
"value": "teachersKit"
},
{
"label": "Publisher's note",
"label": "publishersNote",
"value": "publishersNote"
},
{
"label": "Note on content",
"label": "noteOnContent",
"value": "noteOnContent"
},
{
"label": "Title page",
"label": "titlePage",
"value": "titlePage"
},
{
"label": "Photography",
"label": "photography",
"value": "photography"
},
{
"label": "Summarization",
"label": "summarization",
"value": "summarization"
},
{
"label": "Online resource via RERO DOC",
"label": "onlineResourceViaRERODOC",
"value": "onlineResourceViaRERODOC"
},
{
"label": "Press review",
"label": "pressReview",
"value": "pressReview"
},
{
"label": "Web site",
"label": "webSite",
"value": "webSite"
},
{
"label": "Table of contents",
"label": "tableOfContents",
"value": "tableOfContents"
},
{
"label": "Full text",
"label": "fullText",
"value": "fullText"
},
{
"label": "Video",
"label": "video",
"value": "video"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "object",
"oneOf": [
{
"title": "Single unit",
"title": "rdami:1001",
"additionalProperties": false,
"propertiesOrder": [
"main_type",
Expand All @@ -28,19 +28,19 @@
"form": {
"options": [
{
"label": "Article",
"label": "article",
"value": "article"
},
{
"label": "Material unit",
"label": "materialUnit",
"value": "materialUnit"
},
{
"label": "Private file",
"label": "privateFile",
"value": "privateFile"
},
{
"label": "Private subfile",
"label": "privateSubfile",
"value": "privateSubfile"
}
],
Expand Down Expand Up @@ -69,7 +69,7 @@
}
},
{
"title": "Multipart monograph",
"title": "rdami:1002",
"additionalProperties": false,
"propertiesOrder": [
"main_type",
Expand All @@ -96,11 +96,11 @@
"value": "set"
},
{
"label": "Independant title",
"label": "partIndependentTitle",
"value": "partIndependentTitle"
},
{
"label": "Dependant title",
"label": "partDependantTitle",
"value": "partDependantTitle"
}
],
Expand Down Expand Up @@ -129,7 +129,7 @@
}
},
{
"title": "Serial",
"title": "rdami:1003",
"additionalProperties": false,
"propertiesOrder": [
"main_type",
Expand All @@ -152,15 +152,15 @@
"form": {
"options": [
{
"label": "Serial in serial",
"label": "serialInSerial",
"value": "serialInSerial"
},
{
"label": "Monographic series",
"label": "monographicSeries",
"value": "monographicSeries"
},
{
"label": "Periodical",
"label": "periodical",
"value": "periodical"
}
],
Expand Down Expand Up @@ -189,7 +189,7 @@
}
},
{
"title": "Integrating resource",
"title": "rdami:1004",
"additionalProperties": false,
"propertiesOrder": [
"main_type",
Expand All @@ -211,11 +211,11 @@
"form": {
"options": [
{
"label": "Updating website",
"label": "updatingWebsite",
"value": "updatingWebsite"
},
{
"label": "Updating loose leaf",
"label": "updatingLoose-leaf",
"value": "updatingLoose-leaf"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"options": [
{
"label": "Language",
"label": "bf:Language",
"value": "bf:Language"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"type": "selectWithSort",
"options": [
{
"label": "Accompanying material",
"label": "accompanyingMaterial",
"value": "accompanyingMaterial"
},
{
"label": "General",
"label": "general",
"value": "general"
},
{
"label": "Other physical details",
"label": "otherPhysicalDetails",
"value": "otherPhysicalDetails"
}
],
Expand Down
Loading

0 comments on commit 50c82ba

Please sign in to comment.