ec-jrc / re3gistry

Re3gistry is a reusable open source solution for managing and sharing ‘reference codes’, ensuring semantic interoperability across organisations.
European Union Public License 1.2
27 stars 21 forks source link

(Improvement) Wrong Registry Web page when Browser language is not an INSPIRE language #369

Closed arantzaetxebarria closed 3 months ago

arantzaetxebarria commented 4 months ago

This issue comes from the INPIRE registry repository, this ticket is created where development will take place to implement a solution.

When accessing http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations with a Browser that is not configured in an INSPIRE language (for instance, Catalan), the web page is wrong. It seems that is trying to recover the text in catalan and it does not exist: image

Our metadata are implemented in a Geonetwork catalog, therefore, when pressing this link in the catalog it goes to that wrong Web page, making our catalog to have an incorrect behaviour.

image

This happens with all the metadata codelist. Examples: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations https://inspire.ec.europa.eu/metadata-codelist/OnLineDescriptionCode/accessPoint http://inspire.ec.europa.eu/metadata-codelist/SpatialDataServiceCategory http://inspire.ec.europa.eu/metadata-codelist/SpatialDataServiceCategory/infoManagementService http://inspire.ec.europa.eu/metadata-codelist/SpatialDataServiceCategory/humanGeographicViewer

As an improvement, if the description in the registry does not exists in the language of the browser, at least return it in english, instead of returning a Web error message.

Thanks and best regards

Montse

iratigarzon commented 3 months ago

After analyzing the issue, we observed that the language selector detects if it's a language recognized by the European Union and sets it accordingly. However, the INSPIRE registry may not be available in that language. To address this, we have added a validation so that the language selector displays your browser's language if it is available in the system; otherwise, it defaults to the master language.