mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat(groups): configure message language per group instead of per route
Route.lang is removed; Group.lang now drives the message language for every route in the group (default en, custom via KV i18n:<lang>). dispatch.ts loads translations per group and falls back to en for groups without a lang. Admin UI: GroupEditor gains the language field, RouteEditor/RouteCard drop theirs; docs and config example updated.
This commit is contained in:
parent
c73b642504
commit
7e45b0a09c
12 changed files with 114 additions and 40 deletions
|
|
@ -58,7 +58,6 @@ export interface Route {
|
|||
enabled: boolean;
|
||||
filters: Filter[];
|
||||
targets: RouteTarget[];
|
||||
lang?: string;
|
||||
groupId?: string;
|
||||
/**
|
||||
* Fallback route: only fires when no other (non-fallback) route matched the
|
||||
|
|
@ -120,6 +119,11 @@ export interface Group {
|
|||
* Defaults to true when omitted.
|
||||
*/
|
||||
emoji?: boolean;
|
||||
/**
|
||||
* Message language for every route in this group (e.g. "en", "zh"; custom
|
||||
* via KV i18n:<lang>). Defaults to "en" when omitted.
|
||||
*/
|
||||
lang?: string;
|
||||
}
|
||||
|
||||
export interface Filter {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue