Skip to content

Vocabulary list on landing page: fallback to any language#1846

Merged
osma merged 1 commit intomainfrom
issue1824-vocabulary-title-language-fallback
Dec 2, 2025
Merged

Vocabulary list on landing page: fallback to any language#1846
osma merged 1 commit intomainfrom
issue1824-vocabulary-title-language-fallback

Conversation

@osma
Copy link
Member

@osma osma commented Dec 2, 2025

Reasons for creating this PR

Vocabularies that didn't have a label in the current UI label were not visible on the landing page. See #1824

This PR fixes the problem by adding a fallback: if a vocabulary doesn't have a dcterms:title in the current UI language in the config.ttl file (and also doesn't have a title without a language tag), then Skosmos will just pick any title regardless of the language tag. This ensures that the vocabulary is visible, even though its name may not be in the expected language.

The change also affects the vocabulary dropdown list in the global search bar: now vocabularies without a title in the current language are also shown in that list. (This caused some breakage for Cypress tests that didn't expect this.)

Link to relevant issue(s), if any

Description of the changes in this PR

  • implement fallback for VocabularyConfig::getTitle
  • add a PHPUnit test that verifies that the fallback works
  • adjust some Cypress tests related to the global search bar that broke due to this change

Known problems or uncertainties in this PR

none

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@osma osma added this to the 3.0 milestone Dec 2, 2025
@osma osma self-assigned this Dec 2, 2025
@osma osma added the bug label Dec 2, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@osma osma moved this to Needs review in Skosmos 3.x Backlog Dec 2, 2025
@osma osma requested a review from joelit December 2, 2025 15:47
Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@osma osma merged commit dfc66ef into main Dec 2, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Issue/PR closed in Skosmos 3.x Backlog Dec 2, 2025
@osma osma deleted the issue1824-vocabulary-title-language-fallback branch December 2, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't hide vocabularies with missing title

2 participants