From 927c720dcbda1f0499cb6587209e51d22bc1ab6b Mon Sep 17 00:00:00 2001 From: Will Faught Date: Thu, 9 Feb 2023 18:27:27 -0800 Subject: [PATCH] Translate aria labels --- i18n/en.yaml | 6 ++++++ layouts/partials/paige/content.html | 2 +- layouts/partials/paige/metadata.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 50eabe4a..434d7c50 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,6 +1,12 @@ paige_figure: other: Figure +paige_aria_page_link: + other: Link to this page + +paige_aria_section_link: + other: Link to this section + paige_minutes: one: minute other: minutes diff --git a/layouts/partials/paige/content.html b/layouts/partials/paige/content.html index c85f7574..3222e218 100644 --- a/layouts/partials/paige/content.html +++ b/layouts/partials/paige/content.html @@ -4,7 +4,7 @@ {{ $content := "" }} {{ if $page.Param "paige.main.content.hide" | not }} - {{ $content = cond ($page.Scratch.Get "paige_list_show_content" | not) ($page.Content | replaceRE `()` `${1}#${3}` | safeHTML) $page.Content }} + {{ $content = cond ($page.Scratch.Get "paige_list_show_content" | not) ($page.Content | replaceRE `()` (printf `${1}#${3}` (i18n "paige_aria_section_link")) | safeHTML) $page.Content }} {{ end }} {{ with $content }} diff --git a/layouts/partials/paige/metadata.html b/layouts/partials/paige/metadata.html index 85c4bab0..4372393d 100644 --- a/layouts/partials/paige/metadata.html +++ b/layouts/partials/paige/metadata.html @@ -22,7 +22,7 @@
{{ with $title }} -

{{ with $titlelink }}{{ . }}{{ else }}{{ . }}{{ end }}{{ if $page.Scratch.Get "paige_list_show_content" }}#{{ end }}

+

{{ with $titlelink }}{{ . }}{{ else }}{{ . }}{{ end }}{{ if $page.Scratch.Get "paige_list_show_content" }}#{{ end }}

{{ end }} {{ with $description }}