mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
24 lines
1.2 KiB
Markdown
24 lines
1.2 KiB
Markdown
# Message Language (i18n)
|
|
|
|
Messages are rendered in the language configured per group. WebHooker ships with **English** (default) and **Simplified Chinese** dictionaries.
|
|
|
|
## Per-Group Language
|
|
|
|
Set `Group.lang` (e.g. `"zh"`) to choose the message language for every route in a group — see [Groups → Group Schema](./groups#group-schema). The group's webhook log-channel summaries use the same language.
|
|
|
|
## Custom Overrides
|
|
|
|
Translation overrides are merged from KV under the key `i18n:<lang>` as a flat JSON object of key → text. Any key from the built-in dictionaries (en/zh) can be overridden; unknown keys fall back to English.
|
|
|
|
```jsonc
|
|
// KV key: i18n:zh
|
|
{
|
|
"events.push.title": "{repo}: 推送了 {count} 个提交到 {ref}",
|
|
}
|
|
```
|
|
|
|
Overrides apply to group messages (and console UI where applicable). To add a brand-new language, store a full dictionary at `i18n:<lang>` — every key you do not provide falls back to English.
|
|
|
|
## Emoji Toggle
|
|
|
|
`Group.emoji` (default `true`) controls whether event emoji appear in that group's messages. When disabled, all emoji are stripped from titles, descriptions, fields, and links. Milestone progress bars (🟢🟡🟠⬜) are data visualization and stay regardless of the toggle.
|