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
408 stars 485 forks source link

Filter categories are rendered incorrectly on INSPIRE #6254

Open germangelv opened 2 years ago

germangelv commented 2 years ago

Describe the bug When loading the INSPIRE theme, filter categories are incorrectly represented

To Reproduce

  1. Load Filter Inspire
  2. Go to Main Search

Expected behavior I expected Filters to be rendered with their language mask

Screenshots Captura de pantalla de 2022-04-20 09-02-32

Desktop

Additional context I followed the steps commented here to solve the links but they don't work in Spanish https://github.com/geonetwork/core-geonetwork/issues/5862#issuecomment-894021440

Here are the search strings from the UI for the two samples above.

http://0.0.0.0:8080/GeoNetwork/srv/spa/catalog.search#/search?query_string=
{%22inspireThemeUri%22:%20{%22http://inspire.ec.europa.eu/theme/bu%22:%20true}%20}

http://0.0.0.0:8080/GeoNetwork/srv/spa/catalog.search#/search?query_string=
{%22inspireThemeUri%22:%20{%22http://inspire.ec.europa.eu/theme/lc%22:%20true}%20}

Maybe, In this line are resolving bad https://github.com/geonetwork/core-geonetwork/blob/6fae61a049e814614e785e3a5295f739e428ba54/web-ui/src/main/resources/catalog/components/elasticsearch/directives/partials/facet.html#L21

fxprunayre commented 2 years ago

Did you load the thesaurus from the INSPIRE registry in the languages you need ?

If yes, then a config like

            'th_httpinspireeceuropaeutheme-theme_tree.key': {
              'terms': {
                'field': 'th_httpinspireeceuropaeutheme-theme_tree.key',
                'size': 34
              }
            },

Should do eg. french image italiano image

germangelv commented 2 years ago

The language of GEMET - INSPIRE themes, version 1.0 loaded is es,en,pt.

Should I alter the JSON configuration?

        "inspireThemeUri": {
          "terms": {
            "field": "inspireThemeUri",
            "size": 10
          }
        },
germangelv commented 2 years ago

I modified the JSON configuration obtaining the titles in English but losing the translation capacity in the VEGA filters section

  "inspireTheme": {
    "terms": {
      "field": "inspireTheme",
      "size": 34
    },
    "meta": {
      "translateOnLoad": true
    }
  }

This error does not appear in .../catalog.search#/home but does appear in .../catalog.search#/search

Using GeoNetwork version: 4.0.7 the problem generalizes to home and search sections Captura de pantalla de 2022-04-25 09-16-26

germangelv commented 2 years ago

Did you load the thesaurus from the INSPIRE registry in the languages you need ?

If yes, then a config like

            'th_httpinspireeceuropaeutheme-theme_tree.key': {
              'terms': {
                'field': 'th_httpinspireeceuropaeutheme-theme_tree.key',
                'size': 34
              }
            },

Should do eg. french image italiano image

This configuration is valid to Milestone 4.0.7. https://github.com/geonetwork/core-geonetwork/commit/47601e61a284f5a34260bbd96e600a8cf56da838

What is the valid inspireTheme facet configuration for 4.0.5?