From f66dd5bf7eec289f0e9c517fec715b11f0a180b0 Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 19 Feb 2024 18:15:18 +0100 Subject: [PATCH] support other languages properly --- _layouts/tutorial_hands_on.html | 15 ++++++++++----- _plugins/gtn.rb | 26 ++++++++++++++++---------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/_layouts/tutorial_hands_on.html b/_layouts/tutorial_hands_on.html index a24f33bf3c52f7..f3f603070a7c4f 100644 --- a/_layouts/tutorial_hands_on.html +++ b/_layouts/tutorial_hands_on.html @@ -167,9 +167,14 @@

Under Development!

{% icon purl %} PURL: https://gxy.io/GTN:{{ page.short_id }}
{% endif %} - {% assign feedback_count = site | get_feedback_count: own_material.id %} + {% assign own_material_id = own_material.id %} + {% if page.lang %} + {% capture own_material_id %}{{ own_material.id }}:{{ page.lang }}{% endcapture %} + {% endif %} + + {% assign feedback_count = site | get_feedback_count: own_material_id %} {% if feedback_count > 0 %} -
{% icon rating %} Rating: {{ site | get_rating:own_material.id }} ({{ site | get_feedback_count: own_material.id }} ratings)
+
{% icon rating %} Rating: {{ site | get_rating:own_material_id }} ({{ site | get_feedback_count: own_material_id }} ratings)
{% endif %}
{% icon version %} Revision: {{ page | get_version_number }}
@@ -331,7 +336,7 @@

{{locale['feedback'] | default: "Feedback" }}


{{ locale['feedback-text-learner'] | default: "Did you use this material as a learner or student? Click the form below to leave feedback." }}

- + Preview of the google form @@ -463,7 +468,7 @@

{{locale['citing-tutorial'] | default: "Citing this Tutorial"}}

- {% assign feedback_histo = site | get_rating_histogram_chart:own_material.id %} + {% assign feedback_histo = site | get_rating_histogram_chart:own_material_id %} {% for hist in feedback_histo %} @@ -474,7 +479,7 @@

{{locale['citing-tutorial'] | default: "Citing this Tutorial"}}

{% endfor %}

- {% assign feedbacks = site | get_recent_feedbacks:own_material.id %} + {% assign feedbacks = site | get_recent_feedbacks:own_material_id %} {% for feedback in feedbacks %} {{ feedback[0] }}