diff --git a/_includes/t-status.html b/_includes/t-status.html index 79b3854..6986748 100644 --- a/_includes/t-status.html +++ b/_includes/t-status.html @@ -1,8 +1,8 @@ {% assign versions=alldocs | where_exp:"item", "item.ref == include.page.url or item.url == include.page.url" %} {% assign original=versions | where_exp:"item", "item.lang == 'en' or item.lang == nil" | first %} -{% assign t=versions | where_exp:"item", "item.lang == page.tlang" | first %} +{% assign translation=versions | where_exp:"item", "item.lang == page.tlang" | first %} -{%- capture page_title -%} +{%- capture original-title -%} {%- if original.permalink != nil -%}

{{ original.title }}

{%- elsif original.permalink == nil and include.page.name.en != nil -%} @@ -12,31 +12,31 @@ {%- endif -%} {%- endcapture -%} -{% capture t-date %}{{t.last_updated | date: '%s' | plus: 0 }}{% endcapture %} -{% capture en-date %}{{original.last_updated | date: '%s' | plus: 0 }}{% endcapture %} -{%- capture t_status -%} - {%- if t == nil -%}none - {%- elsif t.size != 0 and t-date < en-date -%}outdated - {%- elsif t.size != 0 and t-date >= en-date -%}uptodate +{% capture translation-date %}{{ translation.last_updated | date: '%s' | plus: 0 }}{% endcapture %} +{% capture original-date %}{{ original.last_updated | date: '%s' | plus: 0 }}{% endcapture %} +{%- capture t-status -%} + {%- if translation == nil -%}none + {%- elsif translation.size != 0 and translation-date < original-date -%}outdated + {%- elsif translation.size != 0 and translation-date >= original-date -%}uptodate {%- endif -%} {%- endcapture -%} - {{ page_title }} + {{ original-title }} - {%- case t_status -%} + {%- case t-status -%} {%- when "none" -%} -

{% include_cached icon.html name="ex-circle" %} No translation available

+

{% include_cached icon.html name="ex-circle" %} No translation

{%- capture github-file-path -%}{% include_cached github-file-path.html p=original %}{%- endcapture -%} -

Volunteer to translate this page

+

Volunteer to translate this page

{%- when "outdated" -%}

{% include_cached icon.html name="warning" %} Translation needs update

-

{{ t.title }}

- {%- capture github-file-path -%}{% include_cached github-file-path.html p=t %}{%- endcapture -%} -

Volunteer to update the translation

+

{{ translation.title }}

+ {%- capture github-file-path -%}{% include_cached github-file-path.html p=translation %}{%- endcapture -%} +

Volunteer to update the translation

{%- when "uptodate" -%}

{% include_cached icon.html name="check-circle" %} Up-to-date

-

{{ t.title }}

+

{{ translation.title }}

{%- endcase -%} diff --git a/_layouts/translation-sitemap.html b/_layouts/translation-sitemap.html index d467763..dca7191 100755 --- a/_layouts/translation-sitemap.html +++ b/_layouts/translation-sitemap.html @@ -41,18 +41,6 @@
{% if page.sidebaricon %} - {% comment %} - This should be properly implemented in the styleguide, but it might be a one-off. - {% endcomment %} -
{% include_cached icon.html name=page.sidebaricon class="sidebaricon" %}
@@ -128,12 +116,6 @@

{% if page.title_icon %} {% else %}

- {% if page.title_icon %} - - {% endif %} - {% if page.title_image %} - - {% endif %} {% if page.title_html %} {{ page.title_html }} {% else %} @@ -152,14 +134,16 @@

{% endif %} {%- include doc-note-msg.html -%} - {%- include translation-note-msg.html -%} + {% assign tlangname=site.data.lang[page.tlang].name %} {% assign alldocs=site.documents | concat: site.pages %} {% include box.html type="start" h="2" title="Summary" class="full" %} - This page lists the status of {{ tlangname }} translations for most pages on the WAI website. +

This page lists the status of {{ tlangname }} translations, for WAI resources for which we welcome translations.

+ +

Learn how to use this translation sitemap in Translations Sitemaps page.

{% include box.html type="end" %} @@ -183,7 +167,7 @@

Priorities Status

{%- for prio in site.data.translations-priorities -%} {%- include t-status.html page=prio -%} {%- for priosub in prio.pages -%} - {%- include t-status.html page=priosub-%} + {%- include t-status.html page=priosub -%} {%- endfor -%} {%- endfor -%} @@ -205,7 +189,6 @@

{%- endif -%}

{% include excol.html type="middle" %} - {% assign pages=section.pages | where_exp:"item", "item.mainnav != false and item.hide != true and item.translate == true" -%} @@ -214,19 +197,29 @@

- {%- for p in pages -%} - {%- include t-status.html page=p lang=page.tlang -%} - {% assign subpages=p.pages | where_exp:"item", "item.mainnav != false and item.hide != true" -%} - {%- for subpage in subpages -%} - {%- include t-status.html page=subpage lang=page.tlang -%} - {% include box.html type="end" %} - {% endfor %} - {% include box.html type="end" %} - {% endfor %} + {%- assign pages=section.pages | where_exp:"item", "item.mainnav != false and item.hide != true" -%} + {%- for p in pages -%} + {% if p.translate == true %} + {%- include t-status.html page=p -%} + {% endif %} + {%- assign subpages=p.pages | where_exp:"item", "item.mainnav != false and item.hide != true" -%} + {%- for subpage in subpages -%} + {% if subpage.translate == true %} + {%- include t-status.html page=subpage -%} + {% endif %} + {%- assign subsubpages=subpage.pages | where_exp:"item", "item.mainnav != false and item.hide != true" -%} + {%- for subsubpage in subsubpages -%} + {% if subsubpage.translate == true %} + {%- include t-status.html page=subsubpage -%} + {% endif %} + {%- endfor -%} + {%- endfor -%} + {%- endfor -%}
{% include excol.html type="end" %} {% endfor %} + {%- if page.navigation -%} {%- include prevnext-navigation.html -%}