Gitea 1.27.1 fixed the mail template for push events (#38467) —
commit data must now be accessed via .UserCommit.GitCommit instead
of directly on the commit object.
Changed across all 10 themes:
- {{.ID}} → {{.UserCommit.GitCommit.ID}}
- {{.ID.String}} → {{.UserCommit.GitCommit.ID.String}}
- {{.MessageTitle}} → {{.UserCommit.GitCommit.MessageTitle}}
Verification:
- 3 mail-related files changed in Gitea v1.27.0→v1.27.1
- All 110 templates (10 themes × 11 types) render successfully
- No breaking changes — data structure unchanged, only access path
Co-Authored-By: Claude <noreply@anthropic.com>
themes/aurora/ (all 11 tmpl templates):
- Extract all reusable inline styles to CSS classes in <style> blocks
- Organize CSS with /* Section */ comment headers (Base, Header, Card, etc.)
- Clean HTML structure: <tr>/<td> on separate lines, consistent 2-space indent
- Replace all hardcoded English button text with locale.Tr keys
- Add mail.team_invite.text_3 disclaimer notice to team_invite
- Go variable assignments on dedicated lines with proper indentation
- Section comments in Title Case
tools/preview/locale.go:
- Replace LocaleEN with full 60-key official Gitea mail locale
- Add positional format specifier support (%[1]s, %[2]d) in Tr()
- All keys verified against official Gitea locale_en-US.json (100% match)
.gitignore:
- Add preview/rendered.js entry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aurora is a dark theme (bg #0a0815, card rgba(25,20,50,0.8)) but raw HTML
elements like h2/h4/li/a inside the card had no inline color — rendering
as browser-default black text and blue links, unreadable on dark backgrounds.
Fix: add .card-body CSS rules to all 11 Aurora templates covering h1-h6,
links, and li elements. Also add .aurora-content wrapper for user-generated
HTML (Release.RenderedNote, .Body, .RenderedContent) with full color
coverage for code, pre, blockquote, hr, img.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Fix INK theme: replace .ActiveCodeLives with correct field, remove from non-auth contexts (8 files)
- Fix hardcoded button text: use locale key mail.view_it_on in ember, heritage, ink, mono, terminal, terra (30+ files)
- Add missing {{if .CanReply}}mail.reply{{end}} block to all 10 themes default.tmpl
- Add missing mail.release.note locale label to all 10 themes release.tmpl
- Add missing mail.team_invite.text_3 to ink and terra team_invite.tmpl
- Add missing blockquote CSS to aurora, ink, mono, neon, terra default.tmpl
Verified: all 110 templates compile successfully with Go build-preview.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>