docs: align English compatibility guide with Chinese version
This commit is contained in:
1 parent
5f5ad058a8
commit
e51e2e9996
4 files changed
+100
-133
No files matched your search
+31
-130
@@ -1,23 +1,24 @@
|
||||
# Gitea Compatibility
|
||||
<!-- DOC-TAGS: {"TRACKER":["LATEST-VERIFIED","VERSION-MAP","HISTORY"]} -->
|
||||
---
|
||||
[简体中文](docs/COMPATIBILITY.zh-CN.md)
|
||||
|
||||
This document lists supported release combinations, known limitations and the checks used to assess compatibility.
|
||||
|
||||
[Project overview](README.md) · [Contributor guide](CONTRIBUTING.md) · [简体中文使用说明](docs/README.zh-CN.md)
|
||||
This document describes the compatibility of Gitea Mail Templates with different Gitea versions.
|
||||
|
||||
## Compatibility Matrix
|
||||
|
||||
Select a template release for the Gitea version you run. `[PASS]` records a compatible combination; `[PENDING]` means verification is incomplete. Legacy entries reflect the project's recorded compatibility assessments rather than a fresh test of every patch release.
|
||||
Select the recommended template release for the Gitea version you run. `[PASS]` identifies a combination recorded as compatible; `[PENDING]` means verification is incomplete.
|
||||
|
||||
> [!NOTE]
|
||||
> Historical entries reflect the project's existing compatibility assessments. They do not mean that every patch version is retested for each release.
|
||||
|
||||
<!-- TRACKER:VERSION-MAP -->
|
||||
| Gitea version | Recommended template release | Status | Notes |
|
||||
|---------------|------------------------------|--------|-------|
|
||||
|---|---|---|---|
|
||||
| 28.1.0 | — | [PENDING] | Compatibility verification pending |
|
||||
| 28.0.0 | **v28.0.0** | [PASS] | Earlier template releases use the removed `FileSize` mail function |
|
||||
| 1.27.3 | **v1.27.3** | [PASS] | Push-to-PR commit links fixed in every theme |
|
||||
| 1.27.2 | **v1.27.3** | [PASS] | Matching v1.27.2 has a push-notification defect in Bloom, Ember, and Heritage |
|
||||
| 1.27.1 | **v1.27.3** | [PASS] | Older v1.0.x templates use obsolete push-commit fields; v1.27.2 is only partially fixed |
|
||||
| 1.27.0 | — | [PENDING] | New commit data shape breaks older push templates; v1.27.3 is a plausible fix but was not release-tested here |
|
||||
| 28.0.0 | **v28.0.0** | [PASS] | Gitea replaced the mail function `FileSize` with `FormatByteSize` |
|
||||
| 1.27.3 | **v1.27.3** | [PASS] | Pull request push notification commit links fixed in every theme |
|
||||
| 1.27.2 | **v1.27.3** | [PASS] | The matching v1.27.2 template release has push notification defects in Bloom, Ember and Heritage |
|
||||
| 1.27.1 | **v1.27.3** | [PASS] | Older v1.0.x templates use obsolete push commit fields |
|
||||
| 1.27.0 | — | [PENDING] | Gitea uses a new commit data structure; v1.27.3 may be compatible but has not been verified against this version |
|
||||
| 1.26.4 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.3 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.2 | **v1.0.1** | [PASS] | — |
|
||||
@@ -25,141 +26,41 @@ Select a template release for the Gitea version you run. `[PASS]` records a comp
|
||||
| 1.26.0 | **v1.0.1** | [PASS] | — |
|
||||
| 1.25.5 | **v1.0.1** | [PASS] | — |
|
||||
| 1.25.0 | **v1.0.1** | [PASS] | — |
|
||||
<!-- /TRACKER:VERSION-MAP -->
|
||||
|
||||
v1.0.1 retains the pre-1.27 push-commit fields used by the listed Gitea 1.25/1.26 releases. Gitea 1.24.x and earlier use a different custom-mail-template layout and are [UNSUPPORTED]. The v1.0.0 template tag is superseded by v1.0.1; it is not a separate recommendation.
|
||||
|
||||
<!-- TRACKER:LATEST-VERIFIED -->
|
||||
> **Latest verified:** Release v28.0.0 passes the Gitea 28.0.0 mail-template, mailer-context, function, and translation-key source audit plus all-theme rendering tests. For other Gitea versions, follow the per-version matrix above.
|
||||
<!-- /TRACKER:LATEST-VERIFIED -->
|
||||
|
||||
## Snapshot-Driven Source Status
|
||||
|
||||
The source architecture on `main` is **unreleased**. Its lock pins Gitea **v28.0.0**, commit `15b8a5805adf57c5189602008d38cccfd3c795e0`, with 13 mail files (11 entrypoints and 2 shared partials) and 28 locale files. It targets Gitea 28 and later, with each new snapshot requiring review. Historical archives retain the compatibility recorded above.
|
||||
|
||||
Themes contain CSS and metadata. The shared framework adapts official templates into reusable headers, action buttons, fallback links and footers while preserving notification conditions, subjects and functional URLs. Official inputs are downloaded to `build/upstream/` and verified against the committed `gitea.lock.json`. Builds reject mismatched checksums, missing English keys, changed adapter references and unreviewed action anchors. New mail types require framework support and fixtures.
|
||||
|
||||
### Translation Behavior
|
||||
|
||||
Missing translations in other languages follow the official English fallback and are reported as `[FALLBACK]`. Gitea v28.0.0's Polish `mail.team_invite.text_1` starts with malformed `%[1]z…` instead of `%[1]s`; preview preserves this official defect and reports `[UPSTREAM-WARN]`. The exception matches the exact source text; other formatting defects fail rendering.
|
||||
|
||||
### Validation Scope
|
||||
|
||||
Source validation covers rendering and notification parity across all themes and languages. Optional browser checks cover static and HTTP previews, language switching and mobile layouts. An isolated Gitea smoke test checks template loading and captures a password-reset email. These checks do not establish rendering compatibility with Gmail, Outlook or Apple Mail; test those clients for your deployment. The release workflow does not automatically run the optional browser or real-Gitea suites.
|
||||
|
||||
Snapshot preparation, cache verification and version updates are separate operations. `upstream prepare` uses the root lock to create an absent cache; `upstream verify` checks an existing cache offline. `upstream sync --tag vX.Y.Z` explicitly replaces the snapshot and lock. A successful sync does not certify compatibility or update this matrix. See [command usage and cache recovery](CONTRIBUTING.md#official-snapshot-updates).
|
||||
|
||||
## Versioning and Known Exceptions
|
||||
|
||||
Release tags identify downloadable packages. Use the matrix to select a supported combination: v1.27.2 has a known defect despite its matching version number, and there is no v1.27.1 template tag. Changes on `main` become part of a release only when a new tag and archive are published.
|
||||
|
||||
- Gitea 1.27.0 changed the push-to-PR commit data shape. Gitea 1.27.1 fixed its **bundled** mail template, but custom overrides still need the new `.UserCommit.GitCommit` path. v1.27.2 updated seven themes; v1.27.3 completed the remaining three. Older v1.0.x templates use the pre-1.27 path. See the [upstream regression report](https://github.com/go-gitea/gitea/issues/38469), [upstream fix](https://github.com/go-gitea/gitea/pull/38467), and [v1.27.2 correction](.github/release-notes/v1.27.2.md).
|
||||
- Gitea 28.0.0 removed the mail-template `FileSize` function in favor of `FormatByteSize` ([mail function map](https://raw.githubusercontent.com/go-gitea/gitea/v28.0.0/modules/templates/mail.go)). v28.0.0 uses the new function; older template releases can fail when rendering release attachments. Conversely, v28.0.0 is not a drop-in replacement for earlier Gitea mail contexts.
|
||||
- A source-only fix is **unreleased** until its tag and downloadable archive exist. New upstream versions remain [PENDING] until their compatibility is checked.
|
||||
|
||||
## Check Your Gitea Version
|
||||
|
||||
```bash
|
||||
# On your Gitea server:
|
||||
gitea --version
|
||||
# Or check the web UI footer / Site Administration → Monitoring
|
||||
```
|
||||
> [!NOTE]
|
||||
> Gitea 1.24.x and earlier use a different mail template layout and are `[UNSUPPORTED]`; Gitea Mail Templates no longer provides separate support for them. The v1.0.0 template tag has been superseded by v1.0.1 and is no longer recommended separately.
|
||||
|
||||
## Gitea Version History — Mail Template Impact
|
||||
|
||||
This table describes changes in **Gitea**, not fixes in this template repository. `None` means no relevant new mail-template impact for that Gitea release; the recommended archive is listed in the matrix above.
|
||||
This table describes changes in **Gitea**, not fixes in this template repository. “None” means that the Gitea version introduces no relevant mail template changes; recommended archives are listed in the compatibility matrix above.
|
||||
|
||||
<!-- TRACKER:HISTORY -->
|
||||
| Gitea | Release Date | Mail Template Changes | Impact |
|
||||
|-------|-------------|-----------------------|--------|
|
||||
| **28.1.0** | 2026-10-06 | [PENDING] Review of mail-template changes | TBD |
|
||||
| **28.0.0** | 2026-09-29 | `FileSize` replaced by `FormatByteSize`; mail template internals reorganized | **Breaking:** legacy release-attachment templates can fail |
|
||||
| Gitea | Release date | Mail template changes | Impact |
|
||||
|---|---|---|---|
|
||||
| **28.1.0** | 2026-10-06 | [PENDING] | [PENDING] |
|
||||
| **28.0.0** | 2026-09-29 | Mail function `FileSize` renamed to `FormatByteSize` ([PR](https://github.com/go-gitea/gitea/pull/39083)) | **Breaking change:** old release attachment templates fail |
|
||||
| | | Introduced `templates/mail/base/` ([PR](https://github.com/go-gitea/gitea/pull/38396)) | **Breaking change:** older Gitea versions cannot directly use the new mail templates |
|
||||
| **1.27.3** | 2026-08-29 | None | None |
|
||||
| **1.27.2** | 2026-08-14 | None | None |
|
||||
| **1.27.1** | 2026-07-27 | Bundled push template updated to `.UserCommit.GitCommit` ([fix](https://github.com/go-gitea/gitea/pull/38467)) | **Existing incompatibility persists:** old custom push-to-PR templates can fail |
|
||||
| **1.27.0** | 2026-07-13 | Push commit data moved under `.UserCommit.GitCommit` ([report](https://github.com/go-gitea/gitea/issues/38469)) | **Breaking:** old push-to-PR templates can fail |
|
||||
| **1.27.1** | 2026-07-27 | Bundled push template updated to use `.UserCommit.GitCommit` ([PR](https://github.com/go-gitea/gitea/pull/38467)) | **Breaking change: an existing defect remains unresolved.** Old custom pull request push templates can fail |
|
||||
| **1.27.0** | 2026-07-13 | Push commit data moved under `.UserCommit.GitCommit` ([ISSUE](https://github.com/go-gitea/gitea/issues/38469)) | **Breaking change:** old pull request push templates fail |
|
||||
| **1.26.4** | 2026-06-21 | None | None |
|
||||
| **1.26.3** | 2026-06-20 | None | None |
|
||||
| **1.26.2** | 2026-05-20 | None | None |
|
||||
| **1.26.1** | 2026-04-22 | None | None |
|
||||
| **1.26.0** | 2026-04-19 | None | None |
|
||||
| **1.25.5** | 2026-03-10 | None | None |
|
||||
| **1.25.0** | 2025 | Custom-mail paths and subject/body format changed ([refactor](https://github.com/go-gitea/gitea/pull/35150)) | **Breaking:** older template layout is not supported |
|
||||
| **≤ 1.24.x** | — | Legacy custom-mail layout | [UNSUPPORTED] |
|
||||
<!-- /TRACKER:HISTORY -->
|
||||
| **1.25.0** | 2025 | Custom mail paths and subject/body format changed ([PR](https://github.com/go-gitea/gitea/pull/35150)) | **Breaking change:** older template layouts are unsupported |
|
||||
| **≤ 1.24.x** | — | Legacy custom mail layout | [UNSUPPORTED] |
|
||||
|
||||
## Template Variable Reference
|
||||
|
||||
Official templates define each mail context. The tables below summarize functions and example data relevant to development; they are not a complete API reference. Check the locked official sources and framework adapter when changing a template or fixture.
|
||||
Official templates define the context for each mail type. For specific mail templates, functions and variables used during development, refer to the official mail template documentation [1](#notes).
|
||||
|
||||
### Relevant Template Functions
|
||||
## Translation Keys
|
||||
|
||||
| Function | Gitea version | Notes |
|
||||
|----------|---------------|-------|
|
||||
| `AppName` | ≤ 1.21 | Application name |
|
||||
| `AppUrl` | ≤ 1.21 | Application base URL |
|
||||
| `AppDomain` | ≤ 1.21 | Server domain |
|
||||
| `DotEscape` | ≤ 1.21 | Prevents auto-linking of dotted text |
|
||||
| `QueryEscape` | ≤ 1.21 | URL query encoding |
|
||||
| `PathEscapeSegments` | ≤ 1.21 | Per-segment path encoding |
|
||||
| `ShortSha` | ≤ 1.21 | Truncated commit hash |
|
||||
| `FileSize` | Before 28.0.0 | Used by older template releases for attachment sizes; unavailable in Gitea 28 mail templates |
|
||||
| `FormatByteSize` | 28.0.0 | Used by v28.0.0 for attachment sizes; unavailable in earlier Gitea mail templates |
|
||||
| `HTMLFormat` | ≤ 1.21 | Render string as safe HTML |
|
||||
| `Iif` | ≤ 1.21 | Inline conditional |
|
||||
| `dict` | ≤ 1.21 | Build maps from key-value pairs |
|
||||
| `Eval` | ≤ 1.21 | Evaluate template tokens |
|
||||
| `StringUtils` | ≤ 1.21 | String manipulation helpers |
|
||||
| `SliceUtils` | ≤ 1.21 | Slice manipulation helpers |
|
||||
| `JsonUtils` | ≤ 1.21 | JSON helpers |
|
||||
| `DumpVar` | ≤ 1.21 | Debug variable dump |
|
||||
Official templates reference `mail.*` and `actions.runs.attempt`. AST-based checks cover `.locale.Tr`, `$.locale.Tr` and both plural keys in `TrN`, including nested pipelines. Every referenced key must exist in the locked English catalog.
|
||||
|
||||
### Data Contexts by Template
|
||||
---
|
||||
### Notes
|
||||
|
||||
| Template | Key Variables |
|
||||
|----------|--------------|
|
||||
| `user/auth/activate` | `DisplayName`, `Code`, `ActiveCodeLives` |
|
||||
| `user/auth/activate_email` | `DisplayName`, `Code`, `Email`, `ActiveCodeLives` |
|
||||
| `user/auth/register_notify` | `DisplayName`, `Username` |
|
||||
| `user/auth/reset_passwd` | `DisplayName`, `Code`, `ResetPwdCodeLives` |
|
||||
| `org/team_invite` | `Inviter`, `Team`, `Organization`, `InviteURL`, `Invite` |
|
||||
| `repo/collaborator` | `Subject`, `RepoName`, `Link` |
|
||||
| `repo/transfer` | `Subject`, `Repo`, `Link` |
|
||||
| `repo/release` | `Release` (with `Publisher`, `TagName`, `Title`, `RenderedNote`, `Attachments`), `Link` |
|
||||
| `repo/actions/workflow_run` | `Subject`, `Run` (with `WorkflowID`, `HTMLURL`), `Jobs` (with status class, icon CID/alt, attempt, URL and duration) |
|
||||
| `repo/issue/assigned` | `Subject`, `Doer`, `Issue`, `Link`, `IsPull`, `CanReply` |
|
||||
| `repo/issue/default` | `Doer`, `Issue`, `Link`, `Body`, `ActionName`, `Comment`, `IsPull`, `IsMention`, `ReviewComments`, `CanReply` |
|
||||
|
||||
`.DisplayName` is available in the authentication mail contexts. Collaborator, transfer, release, workflow, assignment and issue-update templates use the context-specific fields listed above.
|
||||
|
||||
### Translation Keys
|
||||
|
||||
Official templates reference `mail.*` keys and `actions.runs.attempt`. AST-based checks inspect `.locale.Tr`, `$.locale.Tr` and both plural keys in `TrN`, including nested pipelines. Every referenced key must exist in the locked English catalog. Preview loads full official locale JSON files rather than a copied Go dictionary; formatting, escaping and plural selection follow the reviewed Gitea adapter.
|
||||
|
||||
## How Compatibility Is Verified
|
||||
|
||||
1. **Locked input verification** — run `go run . upstream prepare` then `go run . upstream verify` from `tools/`; first preparation downloads missing cache files, verification checks hashes, adapter references and English keys offline.
|
||||
2. **Framework alignment** — `go test ./...` checks deterministic shared adaptation/generation and fails on changed primary-action anchors; theme sources cannot own business templates.
|
||||
3. **Notification semantics and controls** — tests compare subjects, notification text and functional links for every theme/language and critical branches, accounting explicitly for added controls/branding. Browser QA checks translated button labels, identical fallback targets, logos and mobile layout. `go run . preview all` builds all language bundles and reports fallback/upstream defects.
|
||||
4. **Matching-instance smoke test** — before publication, load generated overrides in an isolated Gitea matching the snapshot and capture a real notification or password-reset mail. The admin test email does not exercise custom templates.
|
||||
5. **Release identity** — the release tag must match the snapshot tag. Only mark the new release verified after its tests and smoke check; published tags/assets remain unchanged.
|
||||
|
||||
## Version Tracking
|
||||
|
||||
The [tracker workflow](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/src/branch/main/.github/workflows/gitea-tracker.yml) records upstream releases as pending. Snapshot updates and compatibility verification require a separate review.
|
||||
|
||||
Participating Markdown files declare managed subject/content pairs in a `DOC-TAGS` JSON comment. Each body is enclosed by `<!-- TRACKER:CONTENT -->` and `<!-- /TRACKER:CONTENT -->`, or the corresponding `RELEASE` pair. Only the first occurrence of a repeated pair in a document is processed. Undeclared, unknown or unclosed blocks, and missing declared blocks, cause validation to fail.
|
||||
|
||||
| Managed blocks | Update policy |
|
||||
|---|---|
|
||||
| `TRACKER:VERSION-MAP`, `TRACKER:HISTORY` | Add pending rows for new upstream releases |
|
||||
| `TRACKER:UPSTREAM` | Update the upstream version and pending status |
|
||||
| `TRACKER:BADGE` | Update the upstream version while retaining the last tested version |
|
||||
| `TRACKER:LATEST-TESTED`, `TRACKER:LATEST-VERIFIED` | Updated manually after verification |
|
||||
| `RELEASE:HEADER`, `RELEASE:SUMMARY`, `RELEASE:CURRENT` | Updated by the release workflow after publication; archive labels are prepared during packaging |
|
||||
|
||||
The [release workflow](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/src/branch/main/.github/workflows/release.yml) keeps release links at `/releases/latest` and leaves published tags unchanged. Actions execution and write permissions have not been verified on the configured Gitea host. Until confirmed, check [upstream releases](https://github.com/go-gitea/gitea/releases) and published assets manually. New template tags are published when template content changes; see [versioning and known exceptions](#versioning-and-known-exceptions).
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
Open an issue with the Gitea version, template release or source commit, affected theme and mail type, language, reproduction steps and error output. Include the mail client for display problems. See the [reporting guide](CONTRIBUTING.md#reporting-problems) for source-build diagnostics.
|
||||
[1](#notes): [Mail templates | Gitea Documentation](https://docs.gitea.com/administration/mail-templates/)
|
||||
@@ -53,7 +53,7 @@ go run . build all
|
||||
cd ..
|
||||
```
|
||||
|
||||
Building usable templates requires resources from the official Gitea repository to ensure consistent source inputs. The command automatically downloads the official files pinned by `gitea.lock.json`. Subsequent builds use the cached resources without downloading them again. For missing files or a damaged cache, see [official snapshot updates](CONTRIBUTING.md#official-snapshot-updates).
|
||||
Building usable templates requires resources from the official Gitea repository to ensure consistent source inputs. The command automatically downloads the official files pinned by `gitea.lock.json`. Subsequent builds use the cached resources without downloading them again. For missing files or a damaged cache, see [official snapshot updates](#official-snapshot-updates).
|
||||
|
||||
### Install a Theme
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# Gitea 兼容性
|
||||
---
|
||||
[English](../COMPATIBILITY.md)
|
||||
|
||||
此文件描述了 Gitea Mail Templates 与 Gitea 不同版本之间的兼容性。
|
||||
|
||||
## 兼容性表
|
||||
|
||||
根据所运行的 Gitea 版本选择对应推荐的模板版本。`[PASS]` 表示已记录为兼容的组合,`[PENDING]` 表示尚未完成验证。
|
||||
|
||||
> [!NOTE]
|
||||
> 历史条目仅反映项目已有的兼容性评估,不代表每次发布都重新测试了每一个补丁版本。
|
||||
|
||||
| Gitea 版本 | 推荐模板版本 | 状态 | 说明 |
|
||||
|---|---|---|---|
|
||||
| 28.1.0 | — | [PENDING] | 等待兼容性验证 |
|
||||
| 28.0.0 | **v28.0.0** | [PASS] | Gitea 将邮件函数 `FileSize` 替换为 `FormatByteSize` |
|
||||
| 1.27.3 | **v1.27.3** | [PASS] | 全部主题已修复拉取请求推送通知的提交链接 |
|
||||
| 1.27.2 | **v1.27.3** | [PASS] | 同号 v1.27.2 模板的 Bloom、Ember、Heritage 存在推送通知缺陷 |
|
||||
| 1.27.1 | **v1.27.3** | [PASS] | 较早 v1.0.x 模板使用过时的推送提交字段 |
|
||||
| 1.27.0 | — | [PENDING] | Gitea 使用了新的提交数据结构;v1.27.3 可能适用,但未在此版本上验证 |
|
||||
| 1.26.4 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.3 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.2 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.1 | **v1.0.1** | [PASS] | — |
|
||||
| 1.26.0 | **v1.0.1** | [PASS] | — |
|
||||
| 1.25.5 | **v1.0.1** | [PASS] | — |
|
||||
| 1.25.0 | **v1.0.1** | [PASS] | — |
|
||||
|
||||
> [!NOTE]
|
||||
> Gitea 1.24.x 及更早版本使用不同的邮件模板布局,属于 `[UNSUPPORTED]`,Gitea Mail Templates 不再另外支持。v1.0.0 模板标签已由 v1.0.1 替代,不再单独推荐。
|
||||
|
||||
## Gitea 历版本对邮件模板影响
|
||||
|
||||
此表描述 **Gitea** 的变化,不是本模板仓库的修复记录。“无”表示该 Gitea 版本没有新增相关邮件模板影响;推荐归档见上方兼容性表。
|
||||
|
||||
| Gitea | 发布日期 | 邮件模板变化 | 影响 |
|
||||
|---|---|---|---|
|
||||
| **28.1.0** | 2026-10-06 | [PENDING] | [PENDING] |
|
||||
| **28.0.0** | 2026-09-29 | 邮件函数 `FileSize` 改为 `FormatByteSize` ([PR](https://github.com/go-gitea/gitea/pull/#39083)) | **不兼容变更:** 旧的发布附件模板失效 |
|
||||
|||引入 templates/mail/base/ ([PR](https://github.com/go-gitea/gitea/pull/#38396))| **不兼容变更:**旧版本 Gitea 无法直接使用新版本邮件模板 |
|
||||
| **1.27.3** | 2026-08-29 | 无 | 无 |
|
||||
| **1.27.2** | 2026-08-14 | 无 | 无 |
|
||||
| **1.27.1** | 2026-07-27 | 内置推送模板改用 `.UserCommit.GitCommit`([PR](https://github.com/go-gitea/gitea/pull/38467)) | **不兼容变更:存在既有未修复缺陷** 旧的自定义拉取请求推送模板可能失效 |
|
||||
| **1.27.0** | 2026-07-13 | 推送提交数据移至 `.UserCommit.GitCommit`([ISSUE](https://github.com/go-gitea/gitea/issues/38469)) | **不兼容变更:** 旧的拉取请求推送模板失效 |
|
||||
| **1.26.4** | 2026-06-21 | 无 | 无 |
|
||||
| **1.26.3** | 2026-06-20 | 无 | 无 |
|
||||
| **1.26.2** | 2026-05-20 | 无 | 无 |
|
||||
| **1.26.1** | 2026-04-22 | 无 | 无 |
|
||||
| **1.26.0** | 2026-04-19 | 无 | 无 |
|
||||
| **1.25.5** | 2026-03-10 | 无 | 无 |
|
||||
| **1.25.0** | 2025 | 自定义邮件路径及主题和正文格式变化([PR](https://github.com/go-gitea/gitea/pull/35150)) | **不兼容变更:** 不支持更早的模板布局 |
|
||||
| **≤ 1.24.x** | — | 旧的自定义邮件布局 | [UNSUPPORTED] |
|
||||
|
||||
## 模板变量参考
|
||||
|
||||
各类邮件上下文由官方模板定义。开发时具体的邮件模板和函数和变量请参考官方邮件模板文档 [1](#注释)。
|
||||
|
||||
## 翻译键
|
||||
|
||||
官方模板引用 `mail.*` 和 `actions.runs.attempt`。基于 AST 的检查覆盖 `.locale.Tr`、`$.locale.Tr` 和 `TrN` 的两个复数键,包括嵌套管道。所有引用键必须存在于锁定的英文目录。
|
||||
|
||||
---
|
||||
### 注释
|
||||
|
||||
[1](#注释): [Mail templates | Gitea Documentation](https://docs.gitea.com/administration/mail-templates/)
|
||||
@@ -32,7 +32,7 @@ Gitea Mail Template 为自托管的 [Gitea](https://about.gitea.com) 提供多
|
||||
|
||||
### 选择安装来源
|
||||
|
||||
运行 `gitea --version` 确认部署的 Gitea 实例版本,再按照[兼容矩阵](../COMPATIBILITY.md#compatibility-matrix)选择模板版本。
|
||||
运行 `gitea --version` 确认部署的 Gitea 实例版本,再按照[兼容性表](COMPATIBILITY.zh-CN.md#兼容性表)选择模板版本。
|
||||
|
||||
> [!WARNING]
|
||||
> 我们不建议直接从源码仓库拉取并构建,因为这些版本还未经过完全测试达到发行可用的水平。如果存在未知的模板参数过时或遗漏可能导致 Gitea 实例启动异常。
|
||||
@@ -52,7 +52,7 @@ cd tools
|
||||
go run . build all
|
||||
cd ..
|
||||
```
|
||||
构建可用模板时需要依赖于 Gitea 官方仓库的资源文件,以确保来源的一致性。因此该命令会自动下载由`gitea.lock.json` 文件锁定的官方文件,后续构建无需再次下载,使用缓存目录资源即可运行。文件缺失或缓存损坏的处理方式见[更新官方快照](CONTRIBUTING.zh-CN.md#更新官方快照)。
|
||||
构建可用模板时需要依赖于 Gitea 官方仓库的资源文件,以确保来源的一致性。因此该命令会自动下载由`gitea.lock.json` 文件锁定的官方文件,后续构建无需再次下载,使用缓存目录资源即可运行。文件缺失或缓存损坏的处理方式见[更新官方快照](#更新官方快照)。
|
||||
|
||||
### 安装主题
|
||||
|
||||
|
||||
Reference in new issue
Block a user