Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing lang tag support for datatype labels #1217

Open
miguelvaara opened this issue Oct 6, 2021 · 1 comment
Open

Missing lang tag support for datatype labels #1217

miguelvaara opened this issue Oct 6, 2021 · 1 comment

Comments

@miguelvaara
Copy link
Contributor

miguelvaara commented Oct 6, 2021

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

@miguelvaara miguelvaara added enhancement size-medium 2 hours to 2 days labels Oct 6, 2021
@miguelvaara miguelvaara added this to the Next Tasks milestone Oct 6, 2021
@osma
Copy link
Member

osma commented Oct 6, 2021

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:

if ($graph->resource($datatype)->label($this->clang)) {
$dtLabel = $graph->resource($datatype)->label($this->clang);
return $dtLabel->getValue();
}
return null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants