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

fix: retain language tags on editing data properties with backend editor #315

Merged
merged 2 commits into from Jul 7, 2022

Conversation

litvinovg
Copy link
Contributor

@litvinovg litvinovg commented Jul 5, 2022

VIVO GitHub issue: (please link to issue)

What does this pull request do?

Added fixes to retain language tags while editing data properties
Added fix for editing label with backend editor

How should this be tested?

  1. Create individual with data properties containing strings with language tags.
  2. Create multiple labels with language tags
  3. Edit individual with "Edit this individual"
  4. Verify that data properties didn't loose it's language tags.
  5. Verify that only label in en-US has changed, other labels shouldn't be changed.

Interested parties

@gneissone

@litvinovg litvinovg requested a review from gneissone July 5, 2022 11:26
@litvinovg litvinovg self-assigned this Jul 5, 2022
Copy link
Contributor

@bkampe bkampe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as promised. Multilingual labels/language tags are retained after edition of individual with "Edit this individual"

Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litvinovg please check my comment

}

public void setLanguage(String language) {
if (language != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if clause is a little bit strange here. I understand that null value might include some issue later, but I think you used StringUtils.isNotBlank wherever you invoked this method. I believe this might be removed.

@chenejac chenejac merged commit 6c95f5a into vivo-project:main Jul 7, 2022
ghost pushed a commit that referenced this pull request Feb 23, 2023
…tor (#315)

* fix: retain language tags on editing data properties with backend editor

* fix: replace label in backend editor in default language. Avoid side effect of removing all other labels.
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