geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
412 stars 487 forks source link

Metadata editor - Extent region selector only works in english/french UI #2119

Open josegar74 opened 7 years ago

josegar74 commented 7 years ago

The widget for region selector in the metadata editor is fine in english and french:

extent-region-english

while in other languages is broken:

extent-region-german

The problem seem the regions thesaurus it's only in english and french: https://github.com/geonetwork/core-geonetwork/blob/develop/web/src/main/webapp/WEB-INF/data/config/codelist/external/thesauri/place/regions.rdf

An option is to fill for the other languages used in the UI, but a nicer solution would be to default to the default language if the UI language is not available.

josegar74 commented 7 years ago

@fxprunayre Does it sound a good solution?

fgravin commented 7 years ago

On develop we have improved the keyword api to get translations from keyword. Wouldn't be hard to modify the picker directive to request the translation languages and choose one from them, it's what is done in admin thesaurus manager.

But in 3.2.2 it's a different story, how could you know it's not translated ?

josegar74 commented 7 years ago

I have done some changes and seem working in 3.2.2, will do a pull request to review.

Also mention that the issue is also in develop branch.

josegar74 commented 6 years ago

This is still a issue in 3.4.x. The following code https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/api/regions/RegionsApi.java#L170 returns an exception if the keywords are not in the language provided in the thesaurus file.

Also with current code not possible to the default catalogue language (english usually) as ThesaurusBasedRegionsDAO.getRegionTopConcepts is couple with the ServiceContext, and uses the language from there, returning only the values for the requested language. For sure can be added a new method to send an specific language.

bchartier commented 6 years ago

The use of the language parameters in the XSL transformation is not clear in my mind (sorry I'm very familiar with XSL and the way the language is applied in the different parts of GN): https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/process/add-extent-from-geokeywords.xsl#L49-L51

The comment suggests that the langue of the GUI is used but the code seems to force the use of english. Am I wrong? Would it explain why I can't apply the extents from a french geographical thesaurus in my GeoNetwork with french GUI?

bchartier commented 6 years ago

Any idea about my concern? (see my previous comment)

pvgenuchten commented 4 years ago

what's the status of this? Got a similar issue with some of the inspire thesauri, not all of them are translated in all eu languages, in case the thesaurus does not have the ui-language the keyword-picker will not find any hits

amrtn commented 4 years ago

I´m considering replacing regions.rdf with extents pertinent to my organization. How is that file generated? Can I just delete the Places thesaurus and upload my regions.rdf file?

image