theme: arrr, warrrn about brrroken pirrrate pages globally and fix whitespace

This commit is contained in:
Sören Weber 2022-02-06 14:10:11 +01:00
parent 9c616364a9
commit ae700e465f
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
2 changed files with 14 additions and 12 deletions

View file

@ -1,9 +1,4 @@
+++ +++
title = "Relearrrn Theme fer Cap'n Hugo" title = "Relearrrn Theme fer Cap'n Hugo"
+++ +++
{{% notice warning %}}
Arrr fello pirrates, be awarrre some featurrres may not work fer us in this trrranslat'n. Like table of contents orrr seeing Merrrmaids.
{{% /notice %}}
{{< piratify >}} {{< piratify >}}

View file

@ -45,8 +45,8 @@
"load" "board" "load" "board"
"Loaded" "Boarded" "Loaded" "Boarded"
"loaded" "boarded" "loaded" "boarded"
"Content" "Rambling" "Content" "Rrrambling"
"content" "rambling" "content" "rrrambling"
"icon" "ay'con" "icon" "ay'con"
"Icon" "Ay'con" "Icon" "Ay'con"
"icons" "ay'cons" "icons" "ay'cons"
@ -61,7 +61,7 @@
"pages" "planks" "pages" "planks"
"Relearn" "Relearrrn" "Relearn" "Relearrrn"
"Learn" "Learrrn" "Learn" "Learrrn"
}} -}}
{{- $specials := dict {{- $specials := dict
"(\\w)ing([\\s\\n<.,;?!:])" "'n" "(\\w)ing([\\s\\n<.,;?!:])" "'n"
"(\\w)ings([\\s\\n<.,;?!:])" "'ns" "(\\w)ings([\\s\\n<.,;?!:])" "'ns"
@ -73,14 +73,14 @@
"(\\w)(?:[aeiou])nize([\\s\\n<.,;?!:])" "'nize" "(\\w)(?:[aeiou])nize([\\s\\n<.,;?!:])" "'nize"
"(\\w)(?:[aeiou])nizes([\\s\\n<.,;?!:])" "'nizes" "(\\w)(?:[aeiou])nizes([\\s\\n<.,;?!:])" "'nizes"
(printf "(.)=\"%s([^\"]*?\")" $baseURLpath) (printf "=\"%s%s/" $baseURLpath $langtrg) (printf "(.)=\"%s([^\"]*?\")" $baseURLpath) (printf "=\"%s%s/" $baseURLpath $langtrg)
}} -}}
{{- $fix := dict {{- $fix := dict
"warn'n" "warning" "warn'n" "warning"
"sect'n" "section" "sect'n" "section"
"n Cap'n" "n" "n Cap'n" "n"
"Documentat'n fer Cap'n Hugo Relearrrn Theme" "Documentation for Hugo Relearn Theme" "Documentat'n fer Cap'n Hugo Relearrrn Theme" "Documentation for Hugo Relearn Theme"
"Avast right o' John" "Note right of John" "Avast right o' John" "Note right of John"
}} -}}
{{- $c := "" }} {{- $c := "" }}
{{- range .Page.Translations }} {{- range .Page.Translations }}
{{- if eq .Language.Lang $langsrc }} {{- if eq .Language.Lang $langsrc }}
@ -93,10 +93,17 @@
{{- $c = replaceRE $from (printf "${1}%s${2}" $to) $c }} {{- $c = replaceRE $from (printf "${1}%s${2}" $to) $c }}
{{- end }} {{- end }}
{{- range $from, $to := $fix }} {{- range $from, $to := $fix }}
{{ $c = replace $c $from $to }} {{- $c = replace $c $from $to }}
{{- end }} {{- end }}
{{- $c = replaceRE "(src|href)=\"(images/[^\"]*?\")" (printf "${1}=\"%s${2}" $l) $c }} {{- $c = replaceRE "(src|href)=\"(images/[^\"]*?\")" (printf "${1}=\"%s${2}" $l) $c }}
{{- $c = replaceRE "(src|href)=\"([^\"]*?)/pir/([^\"]*?.files/[^\"]*?\")" "${1}=\"${2}/${3}" $c }} {{- $c = replaceRE "(src|href)=\"([^\"]*?)/pir/([^\"]*?.files/[^\"]*?\")" "${1}=\"${2}/${3}" $c }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- $c | safeHTML }} {{- $style := "warning" }}
{{- $title := "Arrr" }}
<div class="notices {{ $style }}">
<div class="label">{{ $title }}</div>
<p>Fello' pirrates, be awarrre some featurrres may not work fer us in this trrranslat'n. Like table of rrramblings and stuff.</p>
</div>
{{ $c | safeHTML }}