diff --git a/web/src/lib/security-types.ts b/web/src/lib/security-types.ts index 7f397909..783b20f0 100644 --- a/web/src/lib/security-types.ts +++ b/web/src/lib/security-types.ts @@ -111,19 +111,13 @@ export interface SecurityRuleView { custom: boolean; /** English name. A custom rule's name, in no particular language. */ name: string; - /** Chinese name: every built-in rule has one; custom rules do not. */ - name_zh?: string; /** Why the rule is worth a look (English). Absent where the name says it, and on custom rules. */ why?: string; - /** The same, in Chinese. */ - why_zh?: string; /** * What a built-in redaction rule finds, as a sentence (English); text in * backticks is code. Absent on the other guards and on custom rules. */ about?: string; - /** The same, in Chinese. */ - about_zh?: string; /** * Group: the `slug` of one of the guard's `kinds`. Custom rules: `custom`. */ @@ -144,12 +138,11 @@ export interface SecurityRuleView { replacement?: string | null; } -/** A group of a guard's rule table, named in both languages. */ +/** A group of a guard's rule table, with its English name. */ export interface SecurityKindView { /** What a rule's `kind` says. */ slug: string; name: string; - name_zh: string; } export interface GuardDetail { diff --git a/web/src/routes/gateway/security/exceptions-panel.tsx b/web/src/routes/gateway/security/exceptions-panel.tsx index b2d41844..ffcfd61d 100644 --- a/web/src/routes/gateway/security/exceptions-panel.tsx +++ b/web/src/routes/gateway/security/exceptions-panel.tsx @@ -56,7 +56,7 @@ export function ExceptionsPanel({ detail, canWrite }: { detail: GuardDetail; can const max = query.data?.max ?? 500; const full = items.length >= max; const rule = (e: RedactException) => - e.rule ? ruleName(i18n.language, detail, e.rule, false, e.rule) : t('contentSecurity.exceptions.noRule'); + e.rule ? ruleName(i18n.language, 'redact', detail, e.rule, false, e.rule) : t('contentSecurity.exceptions.noRule'); const addButton = (