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

Update index to use a key with translations defined for map resource types #8529

Merged

Conversation

tylerjmchugh
Copy link
Contributor

@tylerjmchugh tylerjmchugh commented Dec 2, 2024

Currently the keys used for the static and interactive map resource types do not seem to be consistent. The index stores the key as map-static but there is no translation for this key.

image

This PR aims to fix this issue by consistently using the staticMap which has an icon and translation defined.

image

Additionally 4.2.x uses map/static which does not have an icon or translation so I believe this PR and #8155 should be backported to ensure that a key that has a translation and icon is used.

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

@tylerjmchugh tylerjmchugh marked this pull request as ready for review December 2, 2024 20:06
@ianwallen ianwallen added this to the 4.4.7 milestone Dec 2, 2024
@fxprunayre
Copy link
Member

It relates to #8155 but was probably not properly translated before that PR. Maybe we can change codelist keys in https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19139/src/main/plugin/iso19139/loc/eng/codelists.xml#L1628-L1637 as they are only used for translationPacks (cf. https://github.com/geonetwork/core-geonetwork/blob/main/web/src/main/webResources/WEB-INF/config-spring-geonetwork.xml#L290)?

@tylerjmchugh
Copy link
Contributor Author

@fxprunayre Updated to use the original key map-static consistently including within the codelists

@ianwallen ianwallen merged commit 1b6d0fb into geonetwork:main Dec 5, 2024
7 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 26082a5fd6... Use correct key for map types
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 schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/config/associated-panel/default.json
CONFLICT (content): Merge conflict in schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/config/associated-panel/default.json
Auto-merging schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/index-fields/index.xsl
CONFLICT (content): Merge conflict in schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/index-fields/index.xsl
Auto-merging schemas/iso19139/src/main/plugin/iso19139/index-fields/index.xsl
CONFLICT (content): Merge conflict in schemas/iso19139/src/main/plugin/iso19139/index-fields/index.xsl
Auto-merging web-ui/src/main/resources/catalog/components/viewer/ViewerDirective.js
CONFLICT (content): Merge conflict in web-ui/src/main/resources/catalog/components/viewer/ViewerDirective.js
Auto-merging web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextDirective.js
CONFLICT (content): Merge conflict in web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextDirective.js
Auto-merging web-ui/src/main/resources/catalog/components/viewer/searchlayerformap/SearchLayerForMapDirective.js
CONFLICT (content): Merge conflict in web-ui/src/main/resources/catalog/components/viewer/searchlayerformap/SearchLayerForMapDirective.js
Auto-merging web-ui/src/main/resources/catalog/js/edit/NewMetadataController.js
Auto-merging web-ui/src/main/resources/catalog/views/default/module.js
CONFLICT (content): Merge conflict in web-ui/src/main/resources/catalog/views/default/module.js

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-8529-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 26082a5fd667f566bc0b978d745b0a21407da3b5,ab829fb7e975815236c56bb57c4217b2391ccc4c
# Push it to GitHub
git push --set-upstream origin backport-8529-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-8529-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.

4 participants