mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
docs: fix factual errors, fill coverage gaps and align zh mirror
This commit is contained in:
parent
41ad1a036b
commit
db49e1f01c
35 changed files with 912 additions and 316 deletions
24
docs/zh/guide/i18n.md
Normal file
24
docs/zh/guide/i18n.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# 消息语言(i18n)
|
||||
|
||||
消息按每个分组配置的语言渲染。WebHooker 内置**英文**(默认)与**简体中文**两套字典。
|
||||
|
||||
## 分组语言
|
||||
|
||||
设置 `Group.lang`(如 `"zh"`)可为分组内所有路由选择消息语言——见[分组 → 分组模式](./configuration#分组模式)。分组的 webhook 日志频道摘要使用相同的语言。
|
||||
|
||||
## 自定义覆盖
|
||||
|
||||
翻译覆盖从 KV 键 `i18n:<lang>` 读取,值为扁平的「键 → 文本」JSON 对象。内置字典(en/zh)中的任意键都可覆盖;未提供的键回退为英文。
|
||||
|
||||
```jsonc
|
||||
// KV 键:i18n:zh
|
||||
{
|
||||
"events.push.title": "{repo}: 推送了 {count} 个提交到 {ref}"
|
||||
}
|
||||
```
|
||||
|
||||
覆盖对分组消息(以及适用的控制台界面)生效。要新增一种语言,可在 `i18n:<lang>` 存放完整字典——未提供的键都会回退为英文。
|
||||
|
||||
## 表情开关
|
||||
|
||||
`Group.emoji`(默认 `true`)控制该分组消息中是否显示事件表情。关闭后,标题、描述、字段与链接中的所有表情都会被去除。里程碑进度条(🟢🟡🟠⬜)属于数据可视化,不受该开关影响。
|
||||
Loading…
Add table
Add a link
Reference in a new issue