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

XSL / Utility / Add multilingual support to getIndexField #8042

Merged
merged 1 commit into from
May 17, 2024

Conversation

fxprunayre
Copy link
Member

The function is not much used but can be tested by configuring a multilingual metadata as CSW service.

Then the document title is the title of the metadata record and should match UI language or use default if not found.

image

It is also use in workflow message.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Funded by Vlaanderen

The function is not much used but can be tested by configuring a
multilingual metadata as CSW service.

Then the document title is the title of the metadata record and should
match UI language or use default if not found.
@fxprunayre fxprunayre added this to the 4.4.5 milestone May 15, 2024
Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Collaborator

@joachimnielandt joachimnielandt left a comment

Choose a reason for hiding this comment

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

My original issue with this was during sending mails, where I retrieve the language through the same method. I tested this now, which works fine.

I did not test multilingual csw's.

Copy link
Contributor

@tylerjmchugh tylerjmchugh left a comment

Choose a reason for hiding this comment

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

Tested as changes were similar to some I made for #8044. Tested in emails and csw service settings and it works fine.

@fxprunayre
Copy link
Member Author

Tested as changes were similar to some I made for #8044. Tested in emails and csw service settings and it works fine.

Indeed @tylerjmchugh, you made something similar. Here there is a bit more cleanup in RestClient https://github.com/geonetwork/core-geonetwork/pull/8042/files#diff-2911ebdff6a9a4bcaba28f4877e3c0bf4779845d46d2bc0eec919609acaafb9aL421-L450

How do we proceed - we merge first #8044 or you cherry-pick this one in #8044 ?

@ianwallen
Copy link
Contributor

How do we proceed - we merge first #8044 or you cherry-pick this one in #8044 ?

@fxprunayre, I think it would be nice if this PR is merged first and then Pr #8044 can merge main branch changes and do any required cleanup.

I took a quick scan of the changes in this PR and changes seem good. Hopefully this PR can be merged soon. :)

@fxprunayre fxprunayre merged commit e606996 into main May 17, 2024
8 of 9 checks passed
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 57436d36f6... XSL / Utility / Add multilingual support to getIndexField
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging core/src/main/java/org/fao/geonet/kernel/search/EsSearchManager.java
Auto-merging core/src/main/java/org/fao/geonet/util/XslUtil.java
Auto-merging index/src/main/java/org/fao/geonet/index/es/EsRestClient.java
CONFLICT (content): Merge conflict in index/src/main/java/org/fao/geonet/index/es/EsRestClient.java
Auto-merging web/src/main/webapp/WEB-INF/data/data/formatter/xslt/render-functions.xsl
Auto-merging web/src/main/webapp/xslt/base-layout.xsl

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-8042-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 57436d36f6ef361dd8b36a59ade861d1185a8321
# Push it to GitHub
git push --set-upstream origin backport-8042-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-8042-to-4.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants