From b1b5408301cba36c70c159637628db116554e9d3 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 19 May 2026 17:55:22 -0700 Subject: [PATCH] Pull more text into translation Signed-off-by: Danila Fedorin --- i18n/en.toml | 27 ++++++++++++++++++++ layouts/_partials/linerangestr.html | 6 ++--- layouts/_partials/serieslink.html | 2 +- layouts/_partials/serieslinkplaceholder.html | 4 +-- layouts/_shortcodes/bergamot_exercise.html | 4 +-- layouts/_shortcodes/codeblock.html | 2 +- layouts/_shortcodes/rawblock.html | 2 +- 7 files changed, 37 insertions(+), 10 deletions(-) diff --git a/i18n/en.toml b/i18n/en.toml index b5cc333..25fea60 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -77,3 +77,30 @@ [ongoingSeries] other = "Ongoing" + +[nextInSeries] + other = "Next in Series" + +[previousInSeries] + other = "Previous in Series" + +[comingSoon] + other = "Coming soon!" + +[startBergamot] + other = "Start Bergamot" + +[closeBergamot] + other = "Close Bergamot" + +[lineX] + other = ", line {{ . }}" + +[aroundLineX] + other = ", around line {{ . }}" + +[linesXThroughY] + other = ", lines {{ .from }} through {{ .to }}" + +[entireFile] + other = ", entire file" diff --git a/layouts/_partials/linerangestr.html b/layouts/_partials/linerangestr.html index 9801517..8890d21 100644 --- a/layouts/_partials/linerangestr.html +++ b/layouts/_partials/linerangestr.html @@ -1,9 +1,9 @@ {{- $comment := "" -}} {{- if eq .from .to -}} -{{- $comment = printf ", line %d" .from -}} +{{- $comment = i18n "lineX" .to -}} {{- else if eq .from 0 -}} -{{- $comment = printf ", around line %d" .to -}} +{{- $comment = i18n "aroundLineX" .to -}} {{- else -}} -{{- $comment = printf ", lines %d through %d" .from .to -}} +{{- $comment = i18n "linesXThroughY" . -}} {{- end -}} {{- return $comment -}} diff --git a/layouts/_partials/serieslink.html b/layouts/_partials/serieslink.html index 40c0cf9..8fe84d2 100644 --- a/layouts/_partials/serieslink.html +++ b/layouts/_partials/serieslink.html @@ -2,7 +2,7 @@ {{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
- {{ title .direction }} in Series + {{ i18n (printf "%sInSeries" .direction) }}
{{ partial "nameinseries.html" (dict "page" .page) }}
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }} diff --git a/layouts/_partials/serieslinkplaceholder.html b/layouts/_partials/serieslinkplaceholder.html index 14a4066..4c0f508 100644 --- a/layouts/_partials/serieslinkplaceholder.html +++ b/layouts/_partials/serieslinkplaceholder.html @@ -2,8 +2,8 @@
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
- {{ title .direction }} in Series -
Coming soon!
+ {{ i18n (printf "%sInSeries" .direction) }} +
{{ i18n "comingSoon" }}
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
diff --git a/layouts/_shortcodes/bergamot_exercise.html b/layouts/_shortcodes/bergamot_exercise.html index 444406d..c744fcb 100644 --- a/layouts/_shortcodes/bergamot_exercise.html +++ b/layouts/_shortcodes/bergamot_exercise.html @@ -11,8 +11,8 @@
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }} {{ else }} - - + + {{ end }}
diff --git a/layouts/_shortcodes/codeblock.html b/layouts/_shortcodes/codeblock.html index 3a7d291..e7ed431 100644 --- a/layouts/_shortcodes/codeblock.html +++ b/layouts/_shortcodes/codeblock.html @@ -3,7 +3,7 @@ "url" $url.url "basePath" $url.basePath "path" (.Get 1) - "comment" ", entire file" + "comment" (i18n "entireFile") "code" (readFile (printf "code/%s" (.Get 1))) "language" (.Get 0) "opts" "linenos=table" diff --git a/layouts/_shortcodes/rawblock.html b/layouts/_shortcodes/rawblock.html index bda0515..8e93d85 100644 --- a/layouts/_shortcodes/rawblock.html +++ b/layouts/_shortcodes/rawblock.html @@ -3,7 +3,7 @@ "url" $url.url "basePath" $url.basePath "path" (.Get 0) - "comment" ", entire file" + "comment" (i18n "entireFile") "content" (safeHTML (printf "
%s
" (htmlEscape (readFile (printf "code/%s" (.Get 0)))))) -}} {{- partial "group.html" $groupconfig -}}