Skip to content
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

Add support to enable multiple metadata value retreival #60

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

mejackreed
Copy link
Contributor

This pull request aims to add the ability to handle metadata entries that have multiple values. Probably needed to enable ProjectMirador/mirador#2591 .

There are some additional opportunities for a refactor but I held off for now.

@edsilv edsilv merged commit f5f792b into master Apr 28, 2020
@mejackreed mejackreed deleted the support-multiple-language-map-values branch April 28, 2020 16:53
jbaiter added a commit to dbmdz/manifesto that referenced this pull request Sep 28, 2020
This fixes a faulty heuristic introduced in IIIF-Commons#60, which would override
the default locale with the locale of the first label and then attempt
to fetch the value with that logic.
This heuristic breaks even in the simple case were labels are available
in multiple languages, but the values only available in one. If the
first language of the labels did not correspond to the language of the
value, the client would get no value back.
This is clearly in violation of the algorithm prescribed for IIIF
property values in the Presentation API spec[1], which states:

> If none of the values have a language associated with them, the client
> must display all of the values.

and

> If all of the values have a language associated with them, and none
> match the language preference, the client must select a language and
> display all of the values associated with that language.

as well as

> If some of the values have a language associated with them, but none
> match the language preference, the client must display all of the values
> that do not have a language associated with them.

[1] https://iiif.io/api/presentation/2.1/#language-of-property-values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants