Skip to content

Commit 2f2e488

Browse files
authored
Merge pull request #1910 from NatLibFi/issue1902-concept-page-translate-type
Translate concept/collection types on concept page
2 parents 6d6781c + a489f9a commit 2f2e488

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/view/concept-card.inc.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
</ul>
9595
{% endif %}
9696
</li>
97+
{% elseif property.type == 'rdf:type' %}<li>{{ propval.label|trans }}</li>
9798
{% else %} {# literals, e.g. altLabels #}
9899
<li>
99100
{%- apply spaceless %}

tests/cypress/template/concept.cy.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ describe('Concept page', () => {
154154
// the tooltip should now be visible
155155
cy.get('#concept-label .tooltip-html-content').should('be.visible')
156156
})
157-
it('contains concept type', () => {
157+
it('contains concept type (skos:Collection and iso-thes)', () => {
158+
cy.visit('/groups/en/page/fish') // go to "Fish" ConceptGroup page
159+
160+
// check the property name
161+
cy.get('.prop-rdf_type .property-label').invoke('text').should('equal', 'Type')
162+
163+
// check the concept type
164+
cy.get('.prop-rdf_type .property-value li').invoke('text').should('contain', 'Collection')
165+
cy.get('.prop-rdf_type .property-value li').invoke('text').should('contain', 'Array of sibling concepts')
166+
})
167+
it('contains concept type (vocabulary-specific type)', () => {
158168
cy.visit('/yso/en/page/p21685') // go to "music research" concept page
159169

160170
// check the property name

tests/testconfig.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
dc:subject :cat_general ;
231231
void:dataDump <http://skosmos.skos/dump/test/groups.ttl>,
232232
<http://skosmos.skos/dump/test/groups> ;
233-
void:uriSpace "http://www.skosmos.skos/onto/groups/";
233+
void:uriSpace "http://www.skosmos.skos/groups/";
234234
skosmos:arrayClass isothes:ThesaurusArray ;
235235
skosmos:groupClass skos:Collection ;
236236
skosmos:defaultConceptSidebarView "groups" ;

0 commit comments

Comments
 (0)