Skip to content

Commit

Permalink
translate timeline_edtf (CollectionBuilder#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
koilebeit authored Mar 8, 2024
1 parent 0348cb9 commit 2684761
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions _data/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,8 @@ _layouts:
en: "Years"
es: "Años"
de: "Jahre"
timeline_edtf.html:
years:
en: "Years"
es: "Años"
de: "Jahre"
5 changes: 3 additions & 2 deletions _layouts/timeline_edtf.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
custom-foot: js/timeline-js.html
---
{%- assign field = site.data.theme.timeline-field | default: "date" -%}
{%- assign years = site.data.translations['_layouts']['timeline_edtf.html']['years'][site.lang] | default: 'Years' -%}
{% if site.data.theme.timeline-child-objects == true %}
{%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' -%}
{% else %}
Expand All @@ -25,7 +26,7 @@
{%- if navYears -%}
<div class="dropdown float-end" id="year-nav">
<button class="btn btn-primary dropdown-toggle" type="button" id="yearButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Year
{{ years }}
</button>
<div class="dropdown-menu" aria-labelledby="yearButton">
{% for y in navYears %}
Expand All @@ -36,7 +37,7 @@

{{ content }}

<h3><a href="#y{{ uniqueYears | first }}">{{ uniqueYears | first }}</a> to <a href="#y{{ uniqueYears | last }}">{{ uniqueYears | last }}</a></h3>
<h3><a href="#y{{ uniqueYears | first }}">{{ uniqueYears | first }}</a> - <a href="#y{{ uniqueYears | last }}">{{ uniqueYears | last }}</a></h3>

<table id="timeline" class="table table-striped">
<tbody>
Expand Down

0 comments on commit 2684761

Please sign in to comment.