From e14a4250efb828262347f5a4bbc4067cd71d885f Mon Sep 17 00:00:00 2001 From: grm Date: Mon, 14 Sep 2026 01:32:25 +0300 Subject: Add languages: English and Greek, chosen per blog on the Settings tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/templates/partials/mdhelp.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/web/templates/partials/mdhelp.html') diff --git a/internal/web/templates/partials/mdhelp.html b/internal/web/templates/partials/mdhelp.html index 3584025..748452e 100644 --- a/internal/web/templates/partials/mdhelp.html +++ b/internal/web/templates/partials/mdhelp.html @@ -1,9 +1,9 @@ {{define "mdhelp"}}
- Formatting cheat-sheet + {{t "Formatting cheat-sheet"}} - - - + + +
# Heading, ## Smaller heading**bold**, *italic*
[link text](https://example.org)![description](/media/…) — Insert image writes this for you
- list item / 1. numbered> quote, `code`, --- for a line
# {{t "Heading"}}, ## {{t "Smaller heading"}}**{{t "bold"}}**, *{{t "italic"}}*
[{{t "link text"}}](https://example.org)![{{t "description"}}](/media/…) — {{t "Insert image"}} {{t "writes this for you"}}
- {{t "list item"}} / 1. {{t "numbered"}}> {{t "quote"}}, `{{t "code"}}`, --- {{t "for a line"}}
-

Blank line = new paragraph. Press Enter once for a line break.

+

{{t "Blank line = new paragraph. Press Enter once for a line break."}}

{{end}} -- cgit v1.2.3