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

JSON-LD language information incorrect for title field #401

Open
bseeger opened this issue Aug 9, 2021 · 1 comment
Open

JSON-LD language information incorrect for title field #401

bseeger opened this issue Aug 9, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@bseeger
Copy link

bseeger commented Aug 9, 2021

The JSON-LD for the title field is incorrect, when it's in a language other than English.

Here's an example of a title that's in French, where it renders incorrectly.

"http://purl.org/dc/terms/title":[{"@value":"Orgueil et Pr\u00e9jug\u00e9s","@language":"en"}]

The JSON-LD algorithm needs to consider the field_title_language when creating the JSON-LD for the title field.

The "en" above comes from Drupal directly, I think, as the site itself doesn't know about other languages. We can use hook_jsonld_alter_normalized_array to override this particular setup. For reference, here's a spot where it's used: https://github.com/Islandora/controlled_access_terms/blob/8.x-1.x/controlled_access_terms.module#L26

We could create this hook in the idc_defaults as well and make the title field render in JSON-LD correctly via that.

@bseeger
Copy link
Author

bseeger commented Aug 9, 2021

This might be a good candidate for fixing post-launch.

@htpvu htpvu added the wontfix This will not be worked on label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants