aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates/dashboard/confirm.html
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-14 01:32:25 +0300
committergrm <grm@eyesin.space>2026-09-14 01:32:25 +0300
commite14a4250efb828262347f5a4bbc4067cd71d885f (patch)
tree3fcf6512f3b030b06c818ff4a224677a026d3b1b /internal/web/templates/dashboard/confirm.html
parent282d2ab3e0fb3a74f32160a231225773001acd14 (diff)
downloadblogspace-e14a4250efb828262347f5a4bbc4067cd71d885f.tar.gz
blogspace-e14a4250efb828262347f5a4bbc4067cd71d885f.tar.bz2
blogspace-e14a4250efb828262347f5a4bbc4067cd71d885f.zip
Add languages: English and Greek, chosen per blog on the Settings tab
Every blog and its dashboard were hard-wired to English. A blogger can now pick the language of their blog; it switches the whole dashboard and the blog's fixed text — post dates, archive months, the RSS link, the pager, the 404 page — while what the blogger wrote is left alone. The new internal/i18n package keys translations by the English string, so an untranslated key renders as English rather than blank, and TestGreekCatalogComplete scans the templates and handlers to fail when the Greek catalog misses a key or keeps a stale one. Templates are compiled once per language with t/tf/date/postdate/month closed over the language, so they need no data plumbing. The language lives in settings.language (blog migration 00002), not in the theme, so "Reset design" does not touch it. Public pages use the blog's language; management pages use the logged-in user's own blog's, so a superadmin editing someone else's blog keeps theirs; the login page follows Accept-Language. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/templates/dashboard/confirm.html')
-rw-r--r--internal/web/templates/dashboard/confirm.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/web/templates/dashboard/confirm.html b/internal/web/templates/dashboard/confirm.html
index 8dd0b3a..62bf4a4 100644
--- a/internal/web/templates/dashboard/confirm.html
+++ b/internal/web/templates/dashboard/confirm.html
@@ -1,16 +1,16 @@
-{{define "title"}}Confirm · Blogspace{{end}}
+{{define "title"}}{{t "Confirm"}} · Blogspace{{end}}
{{define "content"}}
<div class="card narrow">
- <h1>Are you sure?</h1>
+ <h1>{{t "Are you sure?"}}</h1>
{{if .Data.isHome}}
- <p>This is the home page; it cannot be deleted. Make another page the home page first.</p>
- <p><a class="btn secondary" href="{{.Data.back}}">Back</a></p>
+ <p>{{t "This is the home page; it cannot be deleted. Make another page the home page first."}}</p>
+ <p><a class="btn secondary" href="{{.Data.back}}">{{t "Back"}}</a></p>
{{else}}
- <p>You are about to permanently delete {{.Data.what}}. This cannot be undone.</p>
+ <p>{{tf "You are about to permanently delete %s. This cannot be undone." .Data.what}}</p>
<form method="post" action="{{.Data.action}}">
<input type="hidden" name="_csrf" value="{{.CSRF}}">
- <p class="actionrow"><button type="submit" class="danger">Yes, delete</button>
- <a class="btn secondary" href="{{.Data.back}}">Cancel</a></p>
+ <p class="actionrow"><button type="submit" class="danger">{{t "Yes, delete"}}</button>
+ <a class="btn secondary" href="{{.Data.back}}">{{t "Cancel"}}</a></p>
</form>
{{end}}
</div>