feat: display multilingual release notes in version management
- Support Simplified Chinese, Traditional Chinese, English, and Japanese - Follow the UI language and show a notice when notes are unavailable - Avoid language and content fallbacks - Generate Release bodies and update manifests from per-version Markdown - Add collapsible notes, publication dates, and links to full releases - Test publishing, legacy manifest compatibility, and localized rendering
This commit is contained in:
1 parent
c9c0c4cf1c
commit
bac67c1524
25 files changed
+888
-9
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# 维护更新说明
|
||||
|
||||
每个版本建立与发布 tag 同名的目录,分别维护四份 Markdown:
|
||||
|
||||
```text
|
||||
docs/release-notes/v0.2.98/
|
||||
zh-CN.md # 简体中文
|
||||
zh-TW.md # 繁體中文
|
||||
en.md # English
|
||||
ja.md # 日本語
|
||||
```
|
||||
|
||||
发布新版本时,创建对应目录并为每种语言编写正文和分类标题。版本号和日期由页面自动展示,不需要重复写入正文。支持标题、列表、加粗、代码和 HTTP/HTTPS 链接;应用内不加载图片或原始 HTML。简体中文格式示例:
|
||||
|
||||
```markdown
|
||||
## 新增
|
||||
|
||||
- 描述新增的功能。
|
||||
|
||||
## 优化
|
||||
|
||||
- 描述体验上的改进。
|
||||
|
||||
## 修复
|
||||
|
||||
- 描述修复的问题。
|
||||
```
|
||||
|
||||
将说明文件随代码提交到运行发布工作流的提交中,再发布对应 tag。不要把文案写进 CI YAML。当前的 `v0.2.98/` 是本次功能的待发布说明,实际发布其他版本时请同步调整目录名。
|
||||
|
||||
发布流程读取这些文件后生成两份输出:GitHub Release 正文按语言分节展示;Windows、Linux、macOS 更新清单的 `releaseNotes` 保存语言到 Markdown 的映射,例如 `{"zh-CN":"## 新增\n…","en":"## Added\n…"}`。应用检查版本时一并获取,切换界面语言会立即切换到对应正文,无需额外请求。清单中的发布日期使用本次生成清单的时间。
|
||||
|
||||
**不做语言或内容回退。** 文件不存在或只有空白时,清单不包含该语言的正文,应用直接提示“暂未获取到当前语言的更新说明”。即使其他语言有内容,也不会代替显示。GitHub Release 对应语言一节同样显示缺失提示。不会读取旧的单文件正文、已有 Release 文本或 GitHub 自动生成内容来补齐。
|
||||
|
||||
旧清单没有按语言组织的 `releaseNotes` 时,同样显示提示,不影响版本检查和升级。已经更新到最新版也能继续查看当前语言的说明。
|
||||
|
||||
重新运行发布工作流会同步更新 Release 正文和清单;仅在 GitHub 网页修改正文不会改变已经上传的清单。说明文件的权限或读取错误会使 CI 报错,以免静默发布错误内容。
|
||||
@@ -0,0 +1,5 @@
|
||||
## Added
|
||||
|
||||
- The version management page now shows software release notes and the latest version's publication date.
|
||||
- Release notes can be expanded or collapsed, with a link to the full release page.
|
||||
- Release notes follow the interface language. A message is shown when notes in that language are unavailable.
|
||||
@@ -0,0 +1,5 @@
|
||||
## 新機能
|
||||
|
||||
- バージョン管理ページに更新内容を追加しました。最新版の変更点と公開日を確認できます。
|
||||
- 更新内容の展開と折りたたみに対応し、リリースページへのリンクを追加しました。
|
||||
- 更新内容は画面の言語に合わせて表示されます。その言語の内容がない場合はメッセージを表示します。
|
||||
@@ -0,0 +1,5 @@
|
||||
## 新增
|
||||
|
||||
- 版本管理页新增软件更新说明,可直接查看最新版的更新内容和发布日期。
|
||||
- 更新说明支持展开与收起,并提供完整发布说明入口。
|
||||
- 更新说明随界面语言切换;当前语言的内容暂缺时直接显示提示。
|
||||
@@ -0,0 +1,5 @@
|
||||
## 新增
|
||||
|
||||
- 版本管理頁新增軟體更新說明,可直接查看最新版的更新內容和發布日期。
|
||||
- 更新說明支援展開與收合,並提供完整發布說明入口。
|
||||
- 更新說明隨介面語言切換;缺少目前語言的內容時會直接顯示提示。
|
||||
Reference in new issue
Block a user