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

[VIVO-1909] Adjust SPARQL node logic so datatype not added if language tag included #175

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

gneissone
Copy link
Member

@gneissone gneissone commented Jul 18, 2020

VIVO-1909: 'Edit this Individual' form strips language tags and adds langString datatype

What does this pull request do?

Fixes a bug where labels edited via 'Edit this Individual' were being added with langString datatypes.

What's new?

Flips logic in the rdf creation logic such that literals provided with a language tag keep a language tag and ditch the datatype. The behavior was previously the opposite. Following discussion at https://wiki.lyrasis.org/display/VIVODOC111x/Data+types+for+string+and+language strings and langStrings datatypes are assumed in RDF 1.1 and don't have to be explicitly stated.

How should this be tested?

Confirm issue by editing a label via 'Edit this Individual' and observing that the langString datatype is added.

Screen Shot 2020-07-15 at 16 40 57

Deploy with changes, and do the same. It should now add a language tag instead of a datatype.

Additional Notes:

The label editing available via the 'Edit this Individual' interface is problematic since it does not account for multiple languages. It displays a single label, even if there are many. If you update the label via this form it removes all labels and replaces them with the new label, which is given the 'preferred' language tag, which is en-US.

preferredLanguages = Arrays.asList("en-US", "en", "EN");

An argument could be made for removing the 'Edit this Individual' editing interface completely, since I believe everything can be edited via the main UI anyway, and I don't think any of the i18n work touches it.

Interested parties

@hudajkhan @vivo-project/vivo-committers

@brianjlowe brianjlowe merged commit 1194134 into master Jul 21, 2020
@brianjlowe brianjlowe deleted the bugfix/VIVO-1909 branch July 21, 2020 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants