Open fjavierzaragoza opened 7 years ago
The problem seem the KeywordSearcher doesn't use the language send to the API service to retrieve the keywords to set the main language to set the value
field so takes english as default. The language is used to return it in values
element as translations:
[
{
"values": {
"eng": "Addresses",
"spa": "Direcciones"
},
"definitions": {
"eng": "Location of properties based on address identifiers, usually by road name, house number, postal code.",
"spa": "Localización de las propiedades, basada en identificadores de direcciones, por ejemplo, el nombre de la vÃa pública, el número de la finca, el código postal."
},
"coordEast": "",
"coordWest": "",
"coordSouth": "",
"coordNorth": "",
"thesaurusKey": "external.theme.inspire-theme",
"value": "Addresses",
"uri": "http://rdfdata.eionet.europa.eu/inspirethemes/themes/5",
"definition": "Location of properties based on address identifiers, usually by road name, house number, postal code."
},
An option is to change ThesaurusService.js
(https://github.com/geonetwork/core-geonetwork/blob/3.2.x/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusService.js#L40) to use values
element with the current UI language if available, otherwise take the value
element as actually.
@fxprunayre I have created a branch with a fix, it looks working fine at my end, but would like to double check with you in case you see any possible unwanted side effect, thanks.
Hi, I'm hitting the same problem. I added an INSPIRE keyword and a GEMET keyword in spanish. The UI is also in spanish. Both thesauri contain english and spanish translations for keywords.
The INSPIRE Data Theme thesaurus was loaded via the registry loader:
The GEMET thesauri was generated with https://github.com/geonetwork/util-gemet I also get similar errors:
The GEMET thesaurus was generated with https://github.com/geonetwork/util-gemet. The command used was ./gemet-to-simpleskos.sh en es
The keywords are written to the XML in english even if I selected them in spanish:
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
<gmd:keyword>
<gmx:Anchor xlink:href="http://inspire.ec.europa.eu/theme/am">Area management/restriction/regulation zones and reporting units</gmx:Anchor>
</gmd:keyword>
<gmd:type>
<gmd:MD_KeywordTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode"
codeListValue="theme"/>
</gmd:type>
<gmd:thesaurusName>
<gmd:CI_Citation>
<gmd:title>
<gmx:Anchor xlink:href="http://inspire.ec.europa.eu/theme#">GEMET - INSPIRE themes, version 1.0</gmx:Anchor>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2008-06-01</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode"
codeListValue="publication"/>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gmx:Anchor xlink:href="https://sigappsdesa.mapama.es:/ide/geonetwork3/srv/eng/thesaurus.download?ref=external.theme.httpinspireeceuropaeutheme-theme">geonetwork.thesaurus.external.theme.httpinspireeceuropaeutheme-theme</gmx:Anchor>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
</gmd:CI_Citation>
</gmd:thesaurusName>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
<gmd:keyword>
<gco:CharacterString>public domain</gco:CharacterString>
</gmd:keyword>
<gmd:type>
<gmd:MD_KeywordTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode"
codeListValue="theme"/>
</gmd:type>
<gmd:thesaurusName>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>GEMET</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2018-08-16</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode"
codeListValue="publication"/>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gmx:Anchor xlink:href="https://sigappsdesa.mapama.es:/ide/geonetwork3/srv/eng/thesaurus.download?ref=external.theme.gemet-en-es">geonetwork.thesaurus.external.theme.gemet-en-es</gmx:Anchor>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
</gmd:CI_Citation>
</gmd:thesaurusName>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
For INSPIRE compliance the Data Theme keyword should be encoded in the metadata language.
In our case we'd like to add both the metadata language (spanish) and the english keyword. Is that possible?
This issue might also be related to #2916
The GEMET-INSPIRE thesaurus keywords are not recognized to be added in the Spanish language. It may be because the UI in Spanish, the language code is "spa" and in GEMET-INSPIRE is "es"
Link to geonetwork-user spanish group, in http://osgeo-org.1560.x6.nabble.com/Error-al-a-adir-palabras-clave-del-thesarus-GEMET-INSPIRE-themes-tt5293936.html ![Uploading errorGeonetworkGEMET.png…]()