metadata101 / iso19139.ca.HNAP

ISO Harmonized North American Profile (HNAP)
GNU General Public License v2.0
4 stars 18 forks source link

Thesaurus titles are not translated in geonetwork 4.2 default view #384

Closed tylerjmchugh closed 2 weeks ago

tylerjmchugh commented 1 month ago

In the geonetwork 4.2 record "default view", the keywords thesaurus titles only show in the main language of the record regardless of the UI language.

Example scenario:

tylerjmchugh commented 1 month ago

This seems to be caused by the index using only gco:CharacterString without gmd:LocalisedCharacterString.

https://github.com/metadata101/iso19139.ca.HNAP/blob/133229ef1bf15b1a814af03462b09c65f2493ef0/src/main/plugin/iso19139.ca.HNAP/index-fields/index.xsl#L433-L436

I suspect that something similar to what is being done with the keyword values should also be done with the thesaurus title.

https://github.com/metadata101/iso19139.ca.HNAP/blob/133229ef1bf15b1a814af03462b09c65f2493ef0/src/main/plugin/iso19139.ca.HNAP/index-fields/index.xsl#L474-L477

But this seems like it would also require core-geonetwork changes as well to display the correct value. Is there a better solution without core changes?

josegar74 commented 1 month ago

A solution, not the most elegant, but that doesn't require code changes, is to add inLanguages & translations

https://SERVER/geonetwork/srv/eng/admin.console#/settings/languages

A translation with the key Government of Canada Core Subject Thesaurus, with these translations: