> For the complete documentation index, see [llms.txt](https://summerain-1.gitbook.io/summerain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.13.md).

# V2.0.13

> 开发预发布版本。本版本从 `dev` 发布，可能快速跟进变更，不会被默认 `latest` 镜像选中。

## 概述

v2.0.13 将全部后端错误消息、通知与注释改为英文，并把用户可见的错误文案交给前端的 `code` 本地化映射；仅当错误码没有对应译文时，前端才回落到服务器消息。英文与日文界面中不再出现中文文案。

本版本不改变 API 契约或数据库结构。

## 变更

### 后端

* 将全部 `errcode` 消息、内联错误文案、通知标题与正文，以及源码注释翻译为英文；错误码与 HTTP 状态保持不变。
* 带数值的通知改为在结构化 metadata 中保存数值（配额预警的 `percent`、配额调整的 `quota`），以便客户端插值本地化。

### 前端

* 新增 `apiErrorMessage`：按 `errors.<code>` 解析 `ApiError` 错误码，未映射时回落到服务器消息。
* 将该助手应用于修改密码、删除图片与上传失败等界面；通知改为按 `type` 的本地化模板渲染并插值 metadata；后台语言选择器使用本地化标签。
* 三份 locale 新增 23 个错误码条目、6 个通知模板、4 条上传恢复兜底文案与语言名称标签。
* 翻译剩余的中文源码注释。

### 文档

* API 参考现在说明英文 `message` 兜底语义与前端 `code` 映射，三语同步更新。

## 验证

* 后端 `go build ./...`、`go vet ./...`、`go test ./...`：通过。
* 前端 `npm run lint`、`tsc -b` 与 Vite 生产构建：通过。
* 前端 Vitest：22 个测试文件、164 项测试通过，含错误消息助手的新增覆盖。
* Python requirements lock 校验与 GitBook 文档校验：三语各 36 页全部通过。

## 安装

开发镜像需显式拉取：

```bash
docker pull jaykserks/summerain:dev-v2.0.13
```

等效的精确开发标签：

```
jaykserks/summerain:dev-2.0.13
```

移动标签 `dev` 也指向最新的成功开发构建。本版本不会更新 `latest`、`main` 或稳定版语义化别名。

从 v2.0.12 升级无需数据库迁移或 API 迁移。

## 已知限制

* `type` 未知的通知会回落到其存储文本，可能来自更早版本。
* 上传恢复兜底文案在记录失败时本地化；之后切换界面语言不会重译已持久化的失败记录。
* 没有本地化条目的错误码会回落到英文服务器消息。

## 相关工作

本版本完成 v2 路线图的错误消息本地化阶段。后端现已仅使用英文，用户可见错误文案由前端负责。

**下一阶段**：后续版本计划完成 Docker 部署阶段。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.13.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
