NatLibFi / Skosmos

Thesaurus and controlled vocabulary browser using SKOS and SPARQL
Other
225 stars 93 forks source link

Missing lang tag support for datatype labels #1217

Open miguelvaara opened 3 years ago

miguelvaara commented 3 years ago

What steps will reproduce the problem?

  1. Create a new datatype
  2. Add labels with lang tags for the datatype
  3. Use the defined datatype with skos:notation
  4. Set skosmos:showNotationAsProperty "true"; in the Skosmos configuration (config.ttl) for the vocabulary
  5. Go to the concept page showing the new datatype for the notation

What is the expected output? What do you see instead?

An enhancement for showing a datatype with a label if skos:notation is used, has been included in the minor version release 2.12 of Skosmos:

1087/#1198/#1212/#1213/#1216 Display skos notation with a data type and label in the properties on the concept page

The enhancement itself works but it shows a label for the datatype only in the default language of your configuration.

Post Scriptum: Created a duplicate issue: #1229

osma commented 3 years ago

it shows a label for a datatype only in the default language of your configuration.

More specifically, the code looks for a label in the current content language, but there is no fallback in case such a label doesn't exist:

https://github.com/NatLibFi/Skosmos/blob/47c93be8713257ce28bd5a416976139c4a7ac5a6/model/ConceptPropertyValueLiteral.php#L47-L51