miledrousset / Opentheso

Nouvelle version du logiciel Opentheso avec un nouveau design
Other
26 stars 11 forks source link

Importing SKOS does not respect dct:language #21

Closed adamretter closed 3 years ago

adamretter commented 3 years ago

We have a very small experimental taxonomy in SKOS. After importing an RDF Turtle file, the language in Opentheso2 always defaults to French and it doesn't seem possible to change it (see attached screenshot). However, our SKOS specifies a language on the ConceptScheme, e.g.:

@prefix schema:  <http://schema.org/> .
@prefix dct:     <http://purl.org/dc/terms/> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix tna:     <http://www.nationalarchives.gov.uk/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .

<http://www.nationalarchives.gov.uk/ont.taxonomy.tna> rdf:type skos:ConceptScheme;
  dct:title "TNA Taxonomy" ;
  dct:language "en" ;
  dct:creator "Evolved Binary" ;
  dct:created "2021-02-18T17:10:00+01:00"^^xsd:dateTime .

<http://www.nationalarchives.gov.uk/topic.31>
      a       skos:Concept ;
      skos:inScheme <http://www.nationalarchives.gov.uk/ont.taxonomy.tna> ;
      skos:prefLabel "Forestry" .

Is this a bug, or am I doing something wrong?

opentheso2-import-taxonomy-language-error

adamretter commented 3 years ago

Perhaps this is also related? opentheso2-import-taxonomy-language-error-2

miledrousset commented 3 years ago

There are 2 methods to solve this problem: pass the app parameter to English by default (pereferences.properties)

Preferred language

workLanguage = en

by

Preferred language

workLanguage = en

and / or

change the lines: dct: title "TNA Taxonomy"; dct: language "en"; by :

TNA Taxonomy I'll fix this little bug.
adamretter commented 3 years ago

pass the app parameter to English by default (pereferences.properties)

I had already set the workLanguage=en whilst installing the system, see here: https://github.com/miledrousset/Opentheso2/pull/20/files#diff-3a2b905feb762be991a26e8ea2ffa57e0906a1d658eafac285d637459ddcc856R2

xml: lang = "en"

Thanks, I will try the xml:lang suggestion for working around the issue :-)

miledrousset commented 3 years ago

I added a new war with the corrections https://github.com/miledrousset/Opentheso2/releases/tag/v21.02.1

adamretter commented 3 years ago

@miledrousset Thanks