From 2545d4ed9650fca1958cdb43f03035874339ed06 Mon Sep 17 00:00:00 2001
From: kouralex <1723419+kouralex@users.noreply.github.com>
Date: Mon, 2 Dec 2019 09:39:50 +0200
Subject: [PATCH] adds the missing explicit language tags, fixes #903
---
view/concept-shared.twig | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/view/concept-shared.twig b/view/concept-shared.twig
index a66509f60..bb85f26d2 100644
--- a/view/concept-shared.twig
+++ b/view/concept-shared.twig
@@ -78,14 +78,12 @@
{% if propval.uri and propval.type != 'rdf:type' %} {# resources with URI #}
{% if propval.label %}
{% if propval.isExternal %}
- {{ propval.label }}{% if propval.exvocab %} ({{ propval.vocabname }}){% endif %}
+ {{ propval.label }}{% if propval.exvocab %} ({{ propval.vocabname }}){% endif %}
+ {% elseif propval.isReified %} {# e.g. skos:definition's with resource values #}
+ {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }}
+
{% else %}
- {% if propval.isReified %} {# e.g. skos:definition's with resource values #}
- {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }}
-
- {% else %}
- {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }}
- {% endif %}
+ {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }}
{% endif %}
{% if propval.label.lang and (propval.label.lang != request.contentLang or explicit_langcodes) %} ({{ propval.label(request.contentLang).lang }}){% endif %}
{% if propval.SubMembers %} {# if property is a group concept that has sub properties #}
@@ -118,6 +116,7 @@
{% for group in grouppath %}
{% if group.notation %}{{ group.notation }}{% endif %}{{ group.label(request.contentLang) }}
+ {% if group.label.lang and (group.label.lang != request.contentLang or explicit_langcodes) %} ({{ group.label(request.contentLang).lang }}){% endif %}
{% if not loop.last %} > {% endif %}
{% endfor %}
@@ -134,7 +133,10 @@
{% for grouppath in concept.arrayProperties %}
{% for group in grouppath %}
{% if group.type == 'skosmos:memberOfArray' %}
-
{% if group.notation %}{{ group.notation }}{% endif %}{{ group.label(request.contentLang) }}
+
+ {% if group.notation %}{{ group.notation }}{% endif %}{{ group.label(request.contentLang) }}
+ {% if group.label.lang and (group.label.lang != request.contentLang or explicit_langcodes) %} ({{ group.label(request.contentLang).lang }}){% endif %}
+
{% else %}
{% endif %}
{% endfor %}
@@ -191,7 +193,7 @@
{% if propval.notation %}
{{ propval.notation }}{% endif %}
{{ propval.label(request.contentLang) }}
- {% if propval.label.lang and (propval.label(request.contentLang).lang != request.contentLang) or (explicit_langcodes and propval.label.lang) %}
({{ propval.label(request.contentLang).lang }}){% endif %}
+ {% if propval.label.lang and (propval.label(request.contentLang).lang != request.contentLang) or (explicit_langcodes and propval.label.lang) %}
({{ propval.label(request.contentLang).lang }}){% endif %}
{% set vocabname = propval.vocabname %}
{% if vocabname %}